finished adding required fields to all the add funtions
This commit is contained in:
parent
63be4b124d
commit
70cde05d55
@ -120,6 +120,9 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
Dosage = txtDosage.Text;
|
||||
|
||||
if (Dosage.Length > 30)
|
||||
{
|
||||
throw new Exception();
|
||||
} else if (Dosage.Length < 1)
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
@ -162,6 +165,9 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
{
|
||||
MedicationName = txtName.Text;
|
||||
if (MedicationName.Length>60)
|
||||
{
|
||||
throw new Exception();
|
||||
}else if (MedicationName.Length < 1)
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
@ -420,8 +420,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
if (txtMaxRefills.Text.Length > 0)
|
||||
{
|
||||
numRefills = int.Parse(txtMaxRefills.Text);
|
||||
}
|
||||
if (numRefills < 0)
|
||||
}else
|
||||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user