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();
|
medicationID = txtMedicationID.Text.Trim();
|
||||||
rxNum = txtRxNumber.Text.Trim();
|
rxNum = txtRxNumber.Text.Trim();
|
||||||
|
|
||||||
|
frmRefill refill = new frmRefill(0);
|
||||||
|
|
||||||
PharmacyDataTier.UpdateRefill(refillID, date, patientID, medicationID, rxNum);
|
PharmacyDataTier.UpdateRefill(refillID, date, patientID, medicationID, rxNum);
|
||||||
|
refill.Controls.Clear();
|
||||||
|
refill.Activate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (numRefills == pastNumRefills)
|
//if (numRefills == pastNumRefills)
|
||||||
{
|
//{
|
||||||
MessageBox.Show("This prescription has reached the maximum number of refills.", "Max Refill", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
// MessageBox.Show("This prescription has reached the maximum number of refills.", "Max Refill", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
if (isAdd)
|
// if (isAdd)
|
||||||
{
|
// {
|
||||||
refillID = txtRefillID.Text.Trim();
|
// refillID = txtRefillID.Text.Trim();
|
||||||
date = DateTime.Parse(txtRefillDate.Text.Trim());
|
// date = DateTime.Parse(txtRefillDate.Text.Trim());
|
||||||
patientID = txtPatientID.Text.Trim();
|
// patientID = txtPatientID.Text.Trim();
|
||||||
medicationID = txtMedicationID.Text.Trim();
|
// medicationID = txtMedicationID.Text.Trim();
|
||||||
|
|
||||||
PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum);
|
// PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum);
|
||||||
PharmacyDataTier.PastRefills(rxNum);
|
// PharmacyDataTier.PastRefills(rxNum);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
|
Loading…
Reference in New Issue
Block a user