diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs index f98aa09..89a6b80 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs @@ -128,7 +128,7 @@ namespace Louis__Pharmacy_CNSA212_FP // if data grid view is not focused, run the search function if (e.KeyCode == Keys.Enter && medicationIsActive && !dgvPrescription.Focused) { - btnPrescriptionSearch_Click(sender,e); + btnRxSearch_Click(sender,e); } // if data grid view is focused, run the edit function else if (e.KeyCode == Keys.Enter && medicationIsActive && dgvPrescription.Focused) @@ -601,7 +601,7 @@ namespace Louis__Pharmacy_CNSA212_FP { PharmacyDataTier.DeleteMedication(medID); } - btnPrescriptionSearch_Click(sender, e); + btnRxSearch_Click(sender, e); } } @@ -645,13 +645,13 @@ namespace Louis__Pharmacy_CNSA212_FP try { - medID = txtRxNum.Text; + rxNum = txtRxPrescriptionID.Text; try { - ds = PharmacyDataTier.MedicationInfoSearch(medID, medicationName); + ds = PharmacyDataTier.PrescriptionInfoSearch(rxNum, medID, physID, patID); if (ds.Tables[0].Rows.Count > 0) // There is a record. @@ -680,15 +680,6 @@ namespace Louis__Pharmacy_CNSA212_FP } - - } - catch (Exception exception) - { - - ep1.SetError(txtRxNumber, "Invalid Value"); - - } - } catch (Exception exception) { diff --git a/Louis'-Pharmacy_CNSA212-FP/frmMedication.cs b/Louis'-Pharmacy_CNSA212-FP/frmMedication.cs index f611939..cf78fa4 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmMedication.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmMedication.cs @@ -214,7 +214,7 @@ namespace Louis__Pharmacy_CNSA212_FP } SourceForm.txtRxNumber.Text = Medication_id; - SourceForm.btnPrescriptionSearch_Click(sender, e); + //SourceForm.btnPrescriptionSearch_Click(sender, e); Close(); diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs b/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs index 89fe9eb..aa53b3d 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs @@ -51,12 +51,12 @@ namespace Louis__Pharmacy_CNSA212_FP if (e.KeyCode == Keys.Enter) btnGO_Click(sender, e); } - public void FillPrescription(string rxID, string medID, string physID, string patID) + public void FillPrescription(string rxNum, string medID, string physID, string patID) { var ds = new DataSet(); var data = new PharmacyDataTier(); - ds = PharmacyDataTier.PrescriptionInfoSearch(rxID,medID,physID,patID); + ds = PharmacyDataTier.PrescriptionInfoSearch(rxNum,medID,physID,patID); txtRxNum.Text = ds.Tables[0].Rows[0]["RxNum"].ToString(); txtPatID.Text = ds.Tables[0].Rows[0]["Patient_id"].ToString(); txtMedID.Text = ds.Tables[0].Rows[0]["Medication_id"].ToString(); @@ -179,7 +179,7 @@ namespace Louis__Pharmacy_CNSA212_FP } SourceForm.txtRxNumber.Text = RxNum; - SourceForm.btnPrescriptionSearch_Click(sender, e); + //SourceForm.btnRxSearch_Click(sender, e); Close();