From 63be4b124d8b549693a4b2c537c2542837e14f33 Mon Sep 17 00:00:00 2001 From: EggMan20339 <99349302+EggMan20339@users.noreply.github.com> Date: Wed, 21 Feb 2024 08:07:37 -0500 Subject: [PATCH] added required fields to addpatient --- Louis'-Pharmacy_CNSA212-FP/frmPatient.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs b/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs index f9eaaae..5008a09 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs @@ -123,12 +123,27 @@ namespace Louis__Pharmacy_CNSA212_FP epLocal.SetError(txtLname, "Invalid Value"); parseHasFailed = true; } + + if (LastName.Length < 1) + { + epLocal.SetError(txtLname, "Must Enter A Last Name"); + parseHasFailed = true; + } + { + + } if (FirstName.Length > 30) { epLocal.SetError(txtFname, "Invalid Value"); parseHasFailed = true; } + if (FirstName.Length < 1) + { + epLocal.SetError(txtFname, "Must Enter A First Name"); + parseHasFailed = true; + } + if (Patient_id.Length > 8) { epLocal.SetError(txtPatientID, "Invalid Value");