From 847ed02d24d6961fe7747aa58f3961b3a434357b Mon Sep 17 00:00:00 2001 From: Adam McCane Date: Fri, 9 Feb 2024 12:15:31 -0500 Subject: [PATCH] Added code on mnuNavigationAUpres click to open frmPrescription. --- .../frmMain.Designer.cs | 1 + Louis'-Pharmacy_CNSA212-FP/frmMain.cs | 22 ++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Louis'-Pharmacy_CNSA212-FP/frmMain.Designer.cs b/Louis'-Pharmacy_CNSA212-FP/frmMain.Designer.cs index cfa845d..69974cd 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmMain.Designer.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmMain.Designer.cs @@ -87,6 +87,7 @@ this.mnuNavigationAUPres.Name = "mnuNavigationAUPres"; this.mnuNavigationAUPres.Size = new System.Drawing.Size(286, 22); this.mnuNavigationAUPres.Text = "Add/Update Prescription"; + this.mnuNavigationAUPres.Click += new System.EventHandler(this.mnuNavigationAUPres_Click); // // mnuNavigationAURRefill // diff --git a/Louis'-Pharmacy_CNSA212-FP/frmMain.cs b/Louis'-Pharmacy_CNSA212-FP/frmMain.cs index 6891372..792950c 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmMain.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmMain.cs @@ -41,14 +41,26 @@ namespace Louis__Pharmacy_CNSA212_FP private void mnuNavigationAUPaPh_Click(object sender, EventArgs e) { - frmPatientPhysician formAdd = new frmPatientPhysician(); + frmPatientPhysician formPaPh = new frmPatientPhysician(); - formAdd.MdiParent = this; - formAdd.StartPosition = FormStartPosition.CenterScreen; - formAdd.Show(); - formAdd.Focus(); + formPaPh.MdiParent = this; + formPaPh.StartPosition = FormStartPosition.CenterScreen; + formPaPh.Show(); + formPaPh.Focus(); mnuNavigationAUPaPh.Checked = true; } + + private void mnuNavigationAUPres_Click(object sender, EventArgs e) + { + frmPrescription formPrescription = new frmPrescription(); + + formPrescription.MdiParent = this; + formPrescription.StartPosition = FormStartPosition.CenterScreen; + formPrescription.Show(); + formPrescription.Focus(); + + mnuNavigationAUPres.Checked = true; + } } }