added catches for when someone tries to delete a forign hey referenced in a prescription
This commit is contained in:
@@ -344,7 +344,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
MessageBox.Show(Patient_id + " Has an Associated Prescriptions. Could Not Delete", "Error", MessageBoxButtons.OK);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -374,7 +374,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
MessageBox.Show(Physician_id + " Has an Associated Prescriptions. Could Not Delete", "Error", MessageBoxButtons.OK);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -404,7 +404,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
MessageBox.Show(medID + " Has an Associated Prescriptions. Could Not Delete", "Error", MessageBoxButtons.OK);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -434,7 +434,7 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException(ex.Message);
|
||||
MessageBox.Show(precID + " Has an Associated Prescriptions. Could Not Delete", "Error", MessageBoxButtons.OK);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Reference in New Issue
Block a user