added catches for when someone tries to delete a forign hey referenced in a prescription

This commit is contained in:
EggMan20339 2024-02-21 08:32:03 -05:00
parent 0d463f2d5c
commit 7c7629b4ef

View File

@ -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
{