From 22bb09981abdf62a42e8329b52d525893f3f4edd Mon Sep 17 00:00:00 2001 From: EggMan20339 <99349302+EggMan20339@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:12:36 -0500 Subject: [PATCH] added breakage back --- Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs | 3 ++- Louis'-Pharmacy_CNSA212-FP/frmInfo.cs | 17 +++++++++++++---- Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs | 3 +-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs index b1da08d..2a84bbf 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs @@ -303,6 +303,7 @@ namespace Louis__Pharmacy_CNSA212_FP this.dgvPatient.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvPatient.Size = new System.Drawing.Size(869, 270); this.dgvPatient.TabIndex = 0; + this.dgvPatient.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPatient_CellContentClick); // // pat_id // @@ -971,7 +972,7 @@ namespace Louis__Pharmacy_CNSA212_FP private System.Windows.Forms.Button btnPhysicianSearch; private System.Windows.Forms.TextBox txtPatientLast; private System.Windows.Forms.TextBox txtPatientFirst; - private System.Windows.Forms.DataGridView dgvPatient; + public System.Windows.Forms.DataGridView dgvPatient; private System.Windows.Forms.TextBox txtPhysicianLast; private System.Windows.Forms.TextBox txtPhysicianFirst; private System.Windows.Forms.DataGridView dgvPhysician; diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs index cc6d5a6..80ee9e2 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs @@ -322,16 +322,25 @@ namespace Louis__Pharmacy_CNSA212_FP { if (dgvPatient.Rows.Count > 0) { + // Console.WriteLine( dgvPatient.SelectedRows.Count); + DataGridViewRow row = dgvPatient.SelectedRows[0]; + string patid = ""; + patid = (row.Cells[0].Value).ToString(); frmPatientAdd PatientAdd = new frmPatientAdd(false); PatientAdd.MdiParent = MdiParent; PatientAdd.StartPosition = FormStartPosition.CenterScreen; PatientAdd.Show(); PatientAdd.Focus(); - // Console.WriteLine( dgvPatient.SelectedRows.Count); - // DataGridViewRow row = dgvPatient.SelectedRows[0]; - // string patid = dgvPatient.SelectedRows[0].Cells[0].Value.ToString(); - // PatientAdd.FillPatient(patid); + PatientAdd.FillPatient(patid); + } + + + } + + private void dgvPatient_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + } } } diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs b/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs index 677c094..7ec95db 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs @@ -46,8 +46,7 @@ namespace Louis__Pharmacy_CNSA212_FP else { - - + } }