Created delete functionality for view refill form.
This commit is contained in:
parent
d40a4b0acb
commit
03e7185225
@ -91,27 +91,31 @@ namespace Louis__Pharmacy_CNSA212_FP
|
||||
medicationID = txtMedicationID.Text.Trim();
|
||||
rxNum = txtRxNumber.Text.Trim();
|
||||
|
||||
PharmacyDataTier.UpdateRefill(refillID, date, patientID, medicationID, rxNum);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (numRefills == pastNumRefills)
|
||||
{
|
||||
MessageBox.Show("This prescription has reached the maximum number of refills.", "Max Refill", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isAdd)
|
||||
{
|
||||
refillID = txtRefillID.Text.Trim();
|
||||
date = DateTime.Parse(txtRefillDate.Text.Trim());
|
||||
patientID = txtPatientID.Text.Trim();
|
||||
medicationID = txtMedicationID.Text.Trim();
|
||||
frmRefill refill = new frmRefill(0);
|
||||
|
||||
PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum);
|
||||
PharmacyDataTier.PastRefills(rxNum);
|
||||
}
|
||||
PharmacyDataTier.UpdateRefill(refillID, date, patientID, medicationID, rxNum);
|
||||
refill.Controls.Clear();
|
||||
refill.Activate();
|
||||
}
|
||||
else
|
||||
{
|
||||
//if (numRefills == pastNumRefills)
|
||||
//{
|
||||
// MessageBox.Show("This prescription has reached the maximum number of refills.", "Max Refill", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (isAdd)
|
||||
// {
|
||||
// refillID = txtRefillID.Text.Trim();
|
||||
// date = DateTime.Parse(txtRefillDate.Text.Trim());
|
||||
// patientID = txtPatientID.Text.Trim();
|
||||
// medicationID = txtMedicationID.Text.Trim();
|
||||
|
||||
// PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum);
|
||||
// PharmacyDataTier.PastRefills(rxNum);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
|
Loading…
Reference in New Issue
Block a user