From 28286960c5423ee8b8f633cddc47b816aee1e78a Mon Sep 17 00:00:00 2001 From: EggMan20339 <99349302+EggMan20339@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:32:00 -0500 Subject: [PATCH] search work --- .../PharmacyDataTier.cs | 10 +- .../frmInfo.Designer.cs | 996 ++++++++---------- Louis'-Pharmacy_CNSA212-FP/frmInfo.cs | 14 +- Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs | 2 +- 4 files changed, 478 insertions(+), 544 deletions(-) diff --git a/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs b/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs index 8555b67..2c335c7 100644 --- a/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs +++ b/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs @@ -26,9 +26,9 @@ namespace Louis__Pharmacy_CNSA212_FP cmdString.Connection = myConn; cmdString.CommandType = CommandType.StoredProcedure; cmdString.CommandTimeout = 1500; - cmdString.CommandText = "PatientInfoSearch"; + cmdString.CommandText = "SearchPatients"; // Define input parameter - cmdString.Parameters.Add("@patientID", SqlDbType.VarChar, 6).Value = id; + cmdString.Parameters.Add("@ID", SqlDbType.VarChar, 8).Value = id; cmdString.Parameters.Add("@lname", SqlDbType.VarChar, 30).Value = lname; cmdString.Parameters.Add("@fname", SqlDbType.VarChar, 30).Value = fname; // adapter and dataset @@ -64,9 +64,11 @@ namespace Louis__Pharmacy_CNSA212_FP cmdString.Connection = myConn; cmdString.CommandType = CommandType.StoredProcedure; cmdString.CommandTimeout = 1500; - cmdString.CommandText = "PatientInfoSearch"; + cmdString.CommandText = "SearchPatients"; // Define input parameter - cmdString.Parameters.Add("@patientID", SqlDbType.VarChar, 6).Value = id; + cmdString.Parameters.Add("@ID", SqlDbType.VarChar, 8).Value = id; + cmdString.Parameters.Add("@lname", SqlDbType.VarChar, 30).Value = ""; + cmdString.Parameters.Add("@fname", SqlDbType.VarChar, 30).Value = ""; // adapter and dataset SqlDataAdapter aAdapter = new SqlDataAdapter(); aAdapter.SelectCommand = cmdString; diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs index 2a84bbf..c85db90 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.Designer.cs @@ -34,8 +34,8 @@ namespace Louis__Pharmacy_CNSA212_FP System.Windows.Forms.Label lblPatientLast; System.Windows.Forms.Label lblPhysicianFirst; System.Windows.Forms.Label lblPhysicianLast; - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmInfo)); this.tbcInfo = new System.Windows.Forms.TabControl(); this.tbpPatient = new System.Windows.Forms.TabPage(); @@ -46,21 +46,6 @@ namespace Louis__Pharmacy_CNSA212_FP this.txtPatientFirst = new System.Windows.Forms.TextBox(); this.btnPatientSearch = new System.Windows.Forms.Button(); this.dgvPatient = new System.Windows.Forms.DataGridView(); - this.pat_id = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.FirstName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.LastName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.MiddleInitials = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.City = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.UsState = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Zip = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Ibs = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Height_feet = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Height_inches = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Ailment = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.DOB = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.PhoneNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Gender = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Medications = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.cmuPatient = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmuPatientNew = new System.Windows.Forms.ToolStripMenuItem(); this.cmuPatientEdit = new System.Windows.Forms.ToolStripMenuItem(); @@ -107,6 +92,21 @@ namespace Louis__Pharmacy_CNSA212_FP this.cmuPhysicianNew = new System.Windows.Forms.ToolStripMenuItem(); this.cmuPhysicianEdit = new System.Windows.Forms.ToolStripMenuItem(); this.cmuPhysicianDelete = new System.Windows.Forms.ToolStripMenuItem(); + this.pat_id = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.FirstName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.LastName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.MiddleInitials = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.City = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.UsState = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Zip = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Ibs = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Height_feet = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Height_inches = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Ailment = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.DOB = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.PhoneNumber = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Gender = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Medications = new System.Windows.Forms.DataGridViewTextBoxColumn(); lblPatientFirst = new System.Windows.Forms.Label(); lblPatientLast = new System.Windows.Forms.Label(); lblPhysicianFirst = new System.Windows.Forms.Label(); @@ -138,40 +138,36 @@ namespace Louis__Pharmacy_CNSA212_FP // lblPatientFirst // lblPatientFirst.AutoSize = true; - lblPatientFirst.Location = new System.Drawing.Point(27, 34); - lblPatientFirst.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + lblPatientFirst.Location = new System.Drawing.Point(20, 28); lblPatientFirst.Name = "lblPatientFirst"; - lblPatientFirst.Size = new System.Drawing.Size(80, 17); + lblPatientFirst.Size = new System.Drawing.Size(60, 13); lblPatientFirst.TabIndex = 4; lblPatientFirst.Text = "First Name:"; // // lblPatientLast // lblPatientLast.AutoSize = true; - lblPatientLast.Location = new System.Drawing.Point(27, 85); - lblPatientLast.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + lblPatientLast.Location = new System.Drawing.Point(20, 69); lblPatientLast.Name = "lblPatientLast"; - lblPatientLast.Size = new System.Drawing.Size(80, 17); + lblPatientLast.Size = new System.Drawing.Size(61, 13); lblPatientLast.TabIndex = 5; lblPatientLast.Text = "Last Name:"; // // lblPhysicianFirst // lblPhysicianFirst.AutoSize = true; - lblPhysicianFirst.Location = new System.Drawing.Point(32, 32); - lblPhysicianFirst.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + lblPhysicianFirst.Location = new System.Drawing.Point(24, 26); lblPhysicianFirst.Name = "lblPhysicianFirst"; - lblPhysicianFirst.Size = new System.Drawing.Size(80, 17); + lblPhysicianFirst.Size = new System.Drawing.Size(60, 13); lblPhysicianFirst.TabIndex = 4; lblPhysicianFirst.Text = "First Name:"; // // lblPhysicianLast // lblPhysicianLast.AutoSize = true; - lblPhysicianLast.Location = new System.Drawing.Point(31, 86); - lblPhysicianLast.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + lblPhysicianLast.Location = new System.Drawing.Point(23, 70); lblPhysicianLast.Name = "lblPhysicianLast"; - lblPhysicianLast.Size = new System.Drawing.Size(80, 17); + lblPhysicianLast.Size = new System.Drawing.Size(61, 13); lblPhysicianLast.TabIndex = 5; lblPhysicianLast.Text = "Last Name:"; // @@ -180,20 +176,18 @@ namespace Louis__Pharmacy_CNSA212_FP this.tbcInfo.Controls.Add(this.tbpPatient); this.tbcInfo.Controls.Add(this.tbpPrescription); this.tbcInfo.Controls.Add(this.tbpPhysician); - this.tbcInfo.Location = new System.Drawing.Point(16, 15); - this.tbcInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tbcInfo.Location = new System.Drawing.Point(12, 12); this.tbcInfo.Name = "tbcInfo"; this.tbcInfo.SelectedIndex = 0; - this.tbcInfo.Size = new System.Drawing.Size(888, 543); + this.tbcInfo.Size = new System.Drawing.Size(666, 441); this.tbcInfo.TabIndex = 1; // // tbpPatient // this.tbpPatient.Controls.Add(this.splcPatient); - this.tbpPatient.Location = new System.Drawing.Point(4, 25); - this.tbpPatient.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tbpPatient.Location = new System.Drawing.Point(4, 22); this.tbpPatient.Name = "tbpPatient"; - this.tbpPatient.Size = new System.Drawing.Size(880, 514); + this.tbpPatient.Size = new System.Drawing.Size(658, 415); this.tbpPatient.TabIndex = 3; this.tbpPatient.Text = "Patient Info"; this.tbpPatient.UseVisualStyleBackColor = true; @@ -202,7 +196,6 @@ namespace Louis__Pharmacy_CNSA212_FP // this.splcPatient.Dock = System.Windows.Forms.DockStyle.Fill; this.splcPatient.Location = new System.Drawing.Point(0, 0); - this.splcPatient.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.splcPatient.Name = "splcPatient"; this.splcPatient.Orientation = System.Windows.Forms.Orientation.Horizontal; // @@ -220,52 +213,46 @@ namespace Louis__Pharmacy_CNSA212_FP // this.splcPatient.Panel2.AutoScroll = true; this.splcPatient.Panel2.Controls.Add(this.dgvPatient); - this.splcPatient.Size = new System.Drawing.Size(880, 514); - this.splcPatient.SplitterDistance = 230; - this.splcPatient.SplitterWidth = 5; + this.splcPatient.Size = new System.Drawing.Size(658, 415); + this.splcPatient.SplitterDistance = 184; this.splcPatient.TabIndex = 0; // // txtPatientID // - this.txtPatientID.Location = new System.Drawing.Point(115, 134); - this.txtPatientID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtPatientID.Location = new System.Drawing.Point(86, 109); this.txtPatientID.Name = "txtPatientID"; - this.txtPatientID.Size = new System.Drawing.Size(132, 22); + this.txtPatientID.Size = new System.Drawing.Size(100, 20); this.txtPatientID.TabIndex = 8; // // lblPatientID // this.lblPatientID.AutoSize = true; - this.lblPatientID.Location = new System.Drawing.Point(31, 134); - this.lblPatientID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblPatientID.Location = new System.Drawing.Point(23, 109); this.lblPatientID.Name = "lblPatientID"; - this.lblPatientID.Size = new System.Drawing.Size(73, 17); + this.lblPatientID.Size = new System.Drawing.Size(57, 13); this.lblPatientID.TabIndex = 7; this.lblPatientID.Text = "Patient ID:"; // // txtPatientLast // - this.txtPatientLast.Location = new System.Drawing.Point(116, 81); - this.txtPatientLast.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtPatientLast.Location = new System.Drawing.Point(87, 66); this.txtPatientLast.Name = "txtPatientLast"; - this.txtPatientLast.Size = new System.Drawing.Size(132, 22); + this.txtPatientLast.Size = new System.Drawing.Size(100, 20); this.txtPatientLast.TabIndex = 6; // // txtPatientFirst // - this.txtPatientFirst.Location = new System.Drawing.Point(115, 31); - this.txtPatientFirst.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.txtPatientFirst.Location = new System.Drawing.Point(86, 25); this.txtPatientFirst.Name = "txtPatientFirst"; - this.txtPatientFirst.Size = new System.Drawing.Size(132, 22); + this.txtPatientFirst.Size = new System.Drawing.Size(100, 20); this.txtPatientFirst.TabIndex = 5; // // btnPatientSearch // this.btnPatientSearch.BackColor = System.Drawing.Color.Transparent; - this.btnPatientSearch.Location = new System.Drawing.Point(31, 185); - this.btnPatientSearch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnPatientSearch.Location = new System.Drawing.Point(23, 150); this.btnPatientSearch.Name = "btnPatientSearch"; - this.btnPatientSearch.Size = new System.Drawing.Size(100, 28); + this.btnPatientSearch.Size = new System.Drawing.Size(75, 23); this.btnPatientSearch.TabIndex = 4; this.btnPatientSearch.Text = "Search"; this.btnPatientSearch.UseVisualStyleBackColor = false; @@ -276,35 +263,435 @@ namespace Louis__Pharmacy_CNSA212_FP this.dgvPatient.AllowUserToAddRows = false; this.dgvPatient.AllowUserToDeleteRows = false; this.dgvPatient.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dgvPatient.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.pat_id, - this.FirstName, - this.LastName, - this.MiddleInitials, - this.City, - this.UsState, - this.Zip, - this.Ibs, - this.Height_feet, - this.Height_inches, - this.Ailment, - this.DOB, - this.PhoneNumber, - this.Gender, - this.Medications}); + this.dgvPatient.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.pat_id, this.FirstName, this.LastName, this.MiddleInitials, this.City, this.UsState, this.Zip, this.Ibs, this.Height_feet, this.Height_inches, this.Ailment, this.DOB, this.PhoneNumber, this.Gender, this.Medications }); this.dgvPatient.ContextMenuStrip = this.cmuPatient; + this.dgvPatient.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvPatient.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.dgvPatient.Location = new System.Drawing.Point(4, 4); - this.dgvPatient.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.dgvPatient.Location = new System.Drawing.Point(0, 0); this.dgvPatient.MultiSelect = false; this.dgvPatient.Name = "dgvPatient"; this.dgvPatient.ReadOnly = true; this.dgvPatient.RowHeadersWidth = 51; this.dgvPatient.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgvPatient.Size = new System.Drawing.Size(869, 270); + this.dgvPatient.Size = new System.Drawing.Size(658, 227); this.dgvPatient.TabIndex = 0; this.dgvPatient.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPatient_CellContentClick); // + // cmuPatient + // + this.cmuPatient.ImageScalingSize = new System.Drawing.Size(20, 20); + this.cmuPatient.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmuPatientNew, this.cmuPatientEdit, this.cmuPatientDelete }); + this.cmuPatient.Name = "contextMenuStrip1"; + this.cmuPatient.Size = new System.Drawing.Size(108, 70); + // + // cmuPatientNew + // + this.cmuPatientNew.Name = "cmuPatientNew"; + this.cmuPatientNew.Size = new System.Drawing.Size(107, 22); + this.cmuPatientNew.Text = "New"; + this.cmuPatientNew.Click += new System.EventHandler(this.cmuPatientNew_Click); + // + // cmuPatientEdit + // + this.cmuPatientEdit.Name = "cmuPatientEdit"; + this.cmuPatientEdit.Size = new System.Drawing.Size(107, 22); + this.cmuPatientEdit.Text = "Edit"; + this.cmuPatientEdit.Click += new System.EventHandler(this.cmuPatientEdit_Click); + // + // cmuPatientDelete + // + this.cmuPatientDelete.Name = "cmuPatientDelete"; + this.cmuPatientDelete.Size = new System.Drawing.Size(107, 22); + this.cmuPatientDelete.Text = "Delete"; + // + // tbpPrescription + // + this.tbpPrescription.Controls.Add(this.splcPrescription); + this.tbpPrescription.Location = new System.Drawing.Point(4, 22); + this.tbpPrescription.Name = "tbpPrescription"; + this.tbpPrescription.Size = new System.Drawing.Size(658, 415); + this.tbpPrescription.TabIndex = 4; + this.tbpPrescription.Text = "Prescription Info"; + this.tbpPrescription.UseVisualStyleBackColor = true; + // + // splcPrescription + // + this.splcPrescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.splcPrescription.Location = new System.Drawing.Point(0, 0); + this.splcPrescription.Name = "splcPrescription"; + this.splcPrescription.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splcPrescription.Panel1 + // + this.splcPrescription.Panel1.Controls.Add(this.btnPrescriptionSearch); + this.splcPrescription.Panel1.Controls.Add(this.txtPrescriptionPatID); + this.splcPrescription.Panel1.Controls.Add(this.txtRxNumber); + this.splcPrescription.Panel1.Controls.Add(this.lblPrescriptionPatID); + this.splcPrescription.Panel1.Controls.Add(this.lblRxNumber); + // + // splcPrescription.Panel2 + // + this.splcPrescription.Panel2.Controls.Add(this.dgvPrescription); + this.splcPrescription.Size = new System.Drawing.Size(658, 415); + this.splcPrescription.SplitterDistance = 209; + this.splcPrescription.TabIndex = 0; + // + // btnPrescriptionSearch + // + this.btnPrescriptionSearch.Location = new System.Drawing.Point(64, 117); + this.btnPrescriptionSearch.Name = "btnPrescriptionSearch"; + this.btnPrescriptionSearch.Size = new System.Drawing.Size(75, 23); + this.btnPrescriptionSearch.TabIndex = 4; + this.btnPrescriptionSearch.Text = "Search"; + this.btnPrescriptionSearch.UseVisualStyleBackColor = true; + this.btnPrescriptionSearch.Click += new System.EventHandler(this.btnPrescriptionSearch_Click); + // + // txtPrescriptionPatID + // + this.txtPrescriptionPatID.Location = new System.Drawing.Point(184, 74); + this.txtPrescriptionPatID.Name = "txtPrescriptionPatID"; + this.txtPrescriptionPatID.Size = new System.Drawing.Size(100, 20); + this.txtPrescriptionPatID.TabIndex = 3; + // + // txtRxNumber + // + this.txtRxNumber.Location = new System.Drawing.Point(184, 25); + this.txtRxNumber.Name = "txtRxNumber"; + this.txtRxNumber.Size = new System.Drawing.Size(100, 20); + this.txtRxNumber.TabIndex = 2; + // + // lblPrescriptionPatID + // + this.lblPrescriptionPatID.AutoSize = true; + this.lblPrescriptionPatID.Location = new System.Drawing.Point(61, 74); + this.lblPrescriptionPatID.Name = "lblPrescriptionPatID"; + this.lblPrescriptionPatID.Size = new System.Drawing.Size(57, 13); + this.lblPrescriptionPatID.TabIndex = 1; + this.lblPrescriptionPatID.Text = "Patient ID:"; + // + // lblRxNumber + // + this.lblRxNumber.AutoSize = true; + this.lblRxNumber.Location = new System.Drawing.Point(61, 25); + this.lblRxNumber.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblRxNumber.Name = "lblRxNumber"; + this.lblRxNumber.Size = new System.Drawing.Size(63, 13); + this.lblRxNumber.TabIndex = 0; + this.lblRxNumber.Text = "Rx Number:"; + // + // dgvPrescription + // + this.dgvPrescription.AllowUserToAddRows = false; + this.dgvPrescription.AllowUserToDeleteRows = false; + this.dgvPrescription.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvPrescription.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.RxNum_id, this.numRefills, this.pastNumRefills, this.PrescribedBy, this.Physician_id, this.Medication_id, this.Patient_id }); + this.dgvPrescription.ContextMenuStrip = this.cmuRx; + this.dgvPrescription.Location = new System.Drawing.Point(3, 3); + this.dgvPrescription.Name = "dgvPrescription"; + this.dgvPrescription.RowHeadersWidth = 51; + this.dgvPrescription.Size = new System.Drawing.Size(652, 195); + this.dgvPrescription.TabIndex = 0; + // + // RxNum_id + // + this.RxNum_id.DataPropertyName = "RxNum_id"; + this.RxNum_id.HeaderText = "Rx Number"; + this.RxNum_id.MinimumWidth = 6; + this.RxNum_id.Name = "RxNum_id"; + this.RxNum_id.Width = 125; + // + // numRefills + // + this.numRefills.DataPropertyName = "numRefills"; + this.numRefills.HeaderText = "Number of Refills"; + this.numRefills.MinimumWidth = 6; + this.numRefills.Name = "numRefills"; + this.numRefills.Width = 125; + // + // pastNumRefills + // + this.pastNumRefills.DataPropertyName = "pastNumRefills"; + this.pastNumRefills.HeaderText = "Past Number of Refills"; + this.pastNumRefills.MinimumWidth = 6; + this.pastNumRefills.Name = "pastNumRefills"; + this.pastNumRefills.Width = 125; + // + // PrescribedBy + // + this.PrescribedBy.DataPropertyName = "PrescribedBy"; + this.PrescribedBy.HeaderText = "Prescribed By"; + this.PrescribedBy.MinimumWidth = 6; + this.PrescribedBy.Name = "PrescribedBy"; + this.PrescribedBy.Width = 125; + // + // Physician_id + // + this.Physician_id.DataPropertyName = "Physician_id"; + this.Physician_id.HeaderText = "Physician ID"; + this.Physician_id.MinimumWidth = 6; + this.Physician_id.Name = "Physician_id"; + this.Physician_id.Width = 125; + // + // Medication_id + // + this.Medication_id.DataPropertyName = "Medication_id"; + this.Medication_id.HeaderText = "Medication ID"; + this.Medication_id.MinimumWidth = 6; + this.Medication_id.Name = "Medication_id"; + this.Medication_id.Width = 125; + // + // Patient_id + // + this.Patient_id.DataPropertyName = "Patient_id"; + this.Patient_id.HeaderText = "Patient ID"; + this.Patient_id.MinimumWidth = 6; + this.Patient_id.Name = "Patient_id"; + this.Patient_id.Width = 125; + // + // cmuRx + // + this.cmuRx.ImageScalingSize = new System.Drawing.Size(20, 20); + this.cmuRx.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmuRxNew, this.cmuRxEdit, this.cmuRxDelete }); + this.cmuRx.Name = "cmuRx"; + this.cmuRx.Size = new System.Drawing.Size(108, 70); + // + // cmuRxNew + // + this.cmuRxNew.Name = "cmuRxNew"; + this.cmuRxNew.Size = new System.Drawing.Size(107, 22); + this.cmuRxNew.Text = "New"; + // + // cmuRxEdit + // + this.cmuRxEdit.Name = "cmuRxEdit"; + this.cmuRxEdit.Size = new System.Drawing.Size(107, 22); + this.cmuRxEdit.Text = "Edit"; + // + // cmuRxDelete + // + this.cmuRxDelete.Name = "cmuRxDelete"; + this.cmuRxDelete.Size = new System.Drawing.Size(107, 22); + this.cmuRxDelete.Text = "Delete"; + // + // tbpPhysician + // + this.tbpPhysician.Controls.Add(this.splcPhysician); + this.tbpPhysician.Location = new System.Drawing.Point(4, 22); + this.tbpPhysician.Name = "tbpPhysician"; + this.tbpPhysician.Padding = new System.Windows.Forms.Padding(3); + this.tbpPhysician.Size = new System.Drawing.Size(658, 415); + this.tbpPhysician.TabIndex = 2; + this.tbpPhysician.Text = "Physician Info"; + this.tbpPhysician.UseVisualStyleBackColor = true; + // + // splcPhysician + // + this.splcPhysician.Dock = System.Windows.Forms.DockStyle.Fill; + this.splcPhysician.Location = new System.Drawing.Point(3, 3); + this.splcPhysician.Name = "splcPhysician"; + this.splcPhysician.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splcPhysician.Panel1 + // + this.splcPhysician.Panel1.AutoScroll = true; + this.splcPhysician.Panel1.Controls.Add(this.txtPhysicianID); + this.splcPhysician.Panel1.Controls.Add(this.lblPhysicianID); + this.splcPhysician.Panel1.Controls.Add(lblPhysicianLast); + this.splcPhysician.Panel1.Controls.Add(this.txtPhysicianLast); + this.splcPhysician.Panel1.Controls.Add(lblPhysicianFirst); + this.splcPhysician.Panel1.Controls.Add(this.txtPhysicianFirst); + this.splcPhysician.Panel1.Controls.Add(this.btnPhysicianSearch); + this.splcPhysician.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.No; + // + // splcPhysician.Panel2 + // + this.splcPhysician.Panel2.AutoScroll = true; + this.splcPhysician.Panel2.Controls.Add(this.dgvPhysician); + this.splcPhysician.Size = new System.Drawing.Size(652, 409); + this.splcPhysician.SplitterDistance = 182; + this.splcPhysician.TabIndex = 0; + // + // txtPhysicianID + // + this.txtPhysicianID.Location = new System.Drawing.Point(99, 111); + this.txtPhysicianID.Name = "txtPhysicianID"; + this.txtPhysicianID.Size = new System.Drawing.Size(100, 20); + this.txtPhysicianID.TabIndex = 8; + // + // lblPhysicianID + // + this.lblPhysicianID.AutoSize = true; + this.lblPhysicianID.Location = new System.Drawing.Point(24, 111); + this.lblPhysicianID.Name = "lblPhysicianID"; + this.lblPhysicianID.Size = new System.Drawing.Size(69, 13); + this.lblPhysicianID.TabIndex = 7; + this.lblPhysicianID.Text = "Physician ID:"; + // + // txtPhysicianLast + // + this.txtPhysicianLast.Location = new System.Drawing.Point(99, 67); + this.txtPhysicianLast.Name = "txtPhysicianLast"; + this.txtPhysicianLast.Size = new System.Drawing.Size(100, 20); + this.txtPhysicianLast.TabIndex = 6; + // + // txtPhysicianFirst + // + this.txtPhysicianFirst.Location = new System.Drawing.Point(99, 23); + this.txtPhysicianFirst.Name = "txtPhysicianFirst"; + this.txtPhysicianFirst.Size = new System.Drawing.Size(100, 20); + this.txtPhysicianFirst.TabIndex = 5; + // + // btnPhysicianSearch + // + this.btnPhysicianSearch.Location = new System.Drawing.Point(45, 146); + this.btnPhysicianSearch.Name = "btnPhysicianSearch"; + this.btnPhysicianSearch.Size = new System.Drawing.Size(75, 23); + this.btnPhysicianSearch.TabIndex = 4; + this.btnPhysicianSearch.Text = "Search"; + this.btnPhysicianSearch.UseVisualStyleBackColor = true; + this.btnPhysicianSearch.Click += new System.EventHandler(this.btnPhysicianSearch_Click); + // + // dgvPhysician + // + this.dgvPhysician.AllowUserToAddRows = false; + this.dgvPhysician.AllowUserToDeleteRows = false; + this.dgvPhysician.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvPhysician.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Phys_id, this.namefirst, this.namelast, this.initialsmiddle, this.cit, this.state, this.zipp, this.dobb, this.numberphone, this.gennder, this.Specialty }); + this.dgvPhysician.ContextMenuStrip = this.cmuPhysician; + this.dgvPhysician.Location = new System.Drawing.Point(3, 3); + this.dgvPhysician.Name = "dgvPhysician"; + this.dgvPhysician.ReadOnly = true; + this.dgvPhysician.RowHeadersWidth = 51; + this.dgvPhysician.Size = new System.Drawing.Size(646, 216); + this.dgvPhysician.TabIndex = 0; + // + // Phys_id + // + this.Phys_id.DataPropertyName = "Physician_id"; + this.Phys_id.HeaderText = "Physician ID"; + this.Phys_id.MinimumWidth = 6; + this.Phys_id.Name = "Phys_id"; + this.Phys_id.ReadOnly = true; + this.Phys_id.Width = 125; + // + // namefirst + // + this.namefirst.DataPropertyName = "FirstName"; + this.namefirst.HeaderText = "First Name"; + this.namefirst.MinimumWidth = 6; + this.namefirst.Name = "namefirst"; + this.namefirst.ReadOnly = true; + this.namefirst.Width = 125; + // + // namelast + // + this.namelast.DataPropertyName = "LastName"; + this.namelast.HeaderText = "Last Name"; + this.namelast.MinimumWidth = 6; + this.namelast.Name = "namelast"; + this.namelast.ReadOnly = true; + this.namelast.Width = 125; + // + // initialsmiddle + // + this.initialsmiddle.DataPropertyName = "MiddleInitials"; + this.initialsmiddle.HeaderText = "Middle Initial"; + this.initialsmiddle.MinimumWidth = 6; + this.initialsmiddle.Name = "initialsmiddle"; + this.initialsmiddle.ReadOnly = true; + this.initialsmiddle.Width = 125; + // + // cit + // + this.cit.DataPropertyName = "City"; + this.cit.HeaderText = "City"; + this.cit.MinimumWidth = 6; + this.cit.Name = "cit"; + this.cit.ReadOnly = true; + this.cit.Width = 125; + // + // state + // + this.state.DataPropertyName = "UsState"; + this.state.HeaderText = "State"; + this.state.MinimumWidth = 6; + this.state.Name = "state"; + this.state.ReadOnly = true; + this.state.Width = 125; + // + // zipp + // + this.zipp.DataPropertyName = "Zip"; + this.zipp.HeaderText = "Zip"; + this.zipp.MinimumWidth = 6; + this.zipp.Name = "zipp"; + this.zipp.ReadOnly = true; + this.zipp.Width = 125; + // + // dobb + // + this.dobb.DataPropertyName = "DOB"; + dataGridViewCellStyle2.Format = "d"; + dataGridViewCellStyle2.NullValue = null; + this.dobb.DefaultCellStyle = dataGridViewCellStyle2; + this.dobb.HeaderText = "DOB"; + this.dobb.MinimumWidth = 6; + this.dobb.Name = "dobb"; + this.dobb.ReadOnly = true; + this.dobb.Width = 125; + // + // numberphone + // + this.numberphone.DataPropertyName = "PhoneNumber"; + this.numberphone.HeaderText = "Phone Number"; + this.numberphone.MinimumWidth = 6; + this.numberphone.Name = "numberphone"; + this.numberphone.ReadOnly = true; + this.numberphone.Width = 125; + // + // gennder + // + this.gennder.DataPropertyName = "Gender"; + this.gennder.HeaderText = "Gender"; + this.gennder.MinimumWidth = 6; + this.gennder.Name = "gennder"; + this.gennder.ReadOnly = true; + this.gennder.Width = 125; + // + // Specialty + // + this.Specialty.DataPropertyName = "Specialty"; + this.Specialty.HeaderText = "Specialty"; + this.Specialty.MinimumWidth = 6; + this.Specialty.Name = "Specialty"; + this.Specialty.ReadOnly = true; + this.Specialty.Width = 125; + // + // cmuPhysician + // + this.cmuPhysician.ImageScalingSize = new System.Drawing.Size(20, 20); + this.cmuPhysician.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmuPhysicianNew, this.cmuPhysicianEdit, this.cmuPhysicianDelete }); + this.cmuPhysician.Name = "cmuPhysician"; + this.cmuPhysician.Size = new System.Drawing.Size(108, 70); + // + // cmuPhysicianNew + // + this.cmuPhysicianNew.Name = "cmuPhysicianNew"; + this.cmuPhysicianNew.Size = new System.Drawing.Size(107, 22); + this.cmuPhysicianNew.Text = "New"; + // + // cmuPhysicianEdit + // + this.cmuPhysicianEdit.Name = "cmuPhysicianEdit"; + this.cmuPhysicianEdit.Size = new System.Drawing.Size(107, 22); + this.cmuPhysicianEdit.Text = "Edit"; + // + // cmuPhysicianDelete + // + this.cmuPhysicianDelete.Name = "cmuPhysicianDelete"; + this.cmuPhysicianDelete.Size = new System.Drawing.Size(107, 22); + this.cmuPhysicianDelete.Text = "Delete"; + // // pat_id // this.pat_id.DataPropertyName = "Patient_id"; @@ -443,472 +830,14 @@ namespace Louis__Pharmacy_CNSA212_FP this.Medications.ReadOnly = true; this.Medications.Width = 125; // - // cmuPatient - // - this.cmuPatient.ImageScalingSize = new System.Drawing.Size(20, 20); - this.cmuPatient.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cmuPatientNew, - this.cmuPatientEdit, - this.cmuPatientDelete}); - this.cmuPatient.Name = "contextMenuStrip1"; - this.cmuPatient.Size = new System.Drawing.Size(123, 76); - // - // cmuPatientNew - // - this.cmuPatientNew.Name = "cmuPatientNew"; - this.cmuPatientNew.Size = new System.Drawing.Size(122, 24); - this.cmuPatientNew.Text = "New"; - this.cmuPatientNew.Click += new System.EventHandler(this.cmuPatientNew_Click); - // - // cmuPatientEdit - // - this.cmuPatientEdit.Name = "cmuPatientEdit"; - this.cmuPatientEdit.Size = new System.Drawing.Size(122, 24); - this.cmuPatientEdit.Text = "Edit"; - this.cmuPatientEdit.Click += new System.EventHandler(this.cmuPatientEdit_Click); - // - // cmuPatientDelete - // - this.cmuPatientDelete.Name = "cmuPatientDelete"; - this.cmuPatientDelete.Size = new System.Drawing.Size(122, 24); - this.cmuPatientDelete.Text = "Delete"; - // - // tbpPrescription - // - this.tbpPrescription.Controls.Add(this.splcPrescription); - this.tbpPrescription.Location = new System.Drawing.Point(4, 25); - this.tbpPrescription.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.tbpPrescription.Name = "tbpPrescription"; - this.tbpPrescription.Size = new System.Drawing.Size(880, 514); - this.tbpPrescription.TabIndex = 4; - this.tbpPrescription.Text = "Prescription Info"; - this.tbpPrescription.UseVisualStyleBackColor = true; - // - // splcPrescription - // - this.splcPrescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.splcPrescription.Location = new System.Drawing.Point(0, 0); - this.splcPrescription.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.splcPrescription.Name = "splcPrescription"; - this.splcPrescription.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splcPrescription.Panel1 - // - this.splcPrescription.Panel1.Controls.Add(this.btnPrescriptionSearch); - this.splcPrescription.Panel1.Controls.Add(this.txtPrescriptionPatID); - this.splcPrescription.Panel1.Controls.Add(this.txtRxNumber); - this.splcPrescription.Panel1.Controls.Add(this.lblPrescriptionPatID); - this.splcPrescription.Panel1.Controls.Add(this.lblRxNumber); - // - // splcPrescription.Panel2 - // - this.splcPrescription.Panel2.Controls.Add(this.dgvPrescription); - this.splcPrescription.Size = new System.Drawing.Size(880, 514); - this.splcPrescription.SplitterDistance = 260; - this.splcPrescription.SplitterWidth = 5; - this.splcPrescription.TabIndex = 0; - // - // btnPrescriptionSearch - // - this.btnPrescriptionSearch.Location = new System.Drawing.Point(85, 144); - this.btnPrescriptionSearch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnPrescriptionSearch.Name = "btnPrescriptionSearch"; - this.btnPrescriptionSearch.Size = new System.Drawing.Size(100, 28); - this.btnPrescriptionSearch.TabIndex = 4; - this.btnPrescriptionSearch.Text = "Search"; - this.btnPrescriptionSearch.UseVisualStyleBackColor = true; - this.btnPrescriptionSearch.Click += new System.EventHandler(this.btnPrescriptionSearch_Click); - // - // txtPrescriptionPatID - // - this.txtPrescriptionPatID.Location = new System.Drawing.Point(245, 91); - this.txtPrescriptionPatID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtPrescriptionPatID.Name = "txtPrescriptionPatID"; - this.txtPrescriptionPatID.Size = new System.Drawing.Size(132, 22); - this.txtPrescriptionPatID.TabIndex = 3; - // - // txtRxNumber - // - this.txtRxNumber.Location = new System.Drawing.Point(245, 31); - this.txtRxNumber.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtRxNumber.Name = "txtRxNumber"; - this.txtRxNumber.Size = new System.Drawing.Size(132, 22); - this.txtRxNumber.TabIndex = 2; - // - // lblPrescriptionPatID - // - this.lblPrescriptionPatID.AutoSize = true; - this.lblPrescriptionPatID.Location = new System.Drawing.Point(81, 91); - this.lblPrescriptionPatID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblPrescriptionPatID.Name = "lblPrescriptionPatID"; - this.lblPrescriptionPatID.Size = new System.Drawing.Size(73, 17); - this.lblPrescriptionPatID.TabIndex = 1; - this.lblPrescriptionPatID.Text = "Patient ID:"; - // - // lblRxNumber - // - this.lblRxNumber.AutoSize = true; - this.lblRxNumber.Location = new System.Drawing.Point(81, 31); - this.lblRxNumber.Name = "lblRxNumber"; - this.lblRxNumber.Size = new System.Drawing.Size(82, 17); - this.lblRxNumber.TabIndex = 0; - this.lblRxNumber.Text = "Rx Number:"; - // - // dgvPrescription - // - this.dgvPrescription.AllowUserToAddRows = false; - this.dgvPrescription.AllowUserToDeleteRows = false; - this.dgvPrescription.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dgvPrescription.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.RxNum_id, - this.numRefills, - this.pastNumRefills, - this.PrescribedBy, - this.Physician_id, - this.Medication_id, - this.Patient_id}); - this.dgvPrescription.ContextMenuStrip = this.cmuRx; - this.dgvPrescription.Location = new System.Drawing.Point(4, 4); - this.dgvPrescription.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.dgvPrescription.Name = "dgvPrescription"; - this.dgvPrescription.RowHeadersWidth = 51; - this.dgvPrescription.Size = new System.Drawing.Size(869, 240); - this.dgvPrescription.TabIndex = 0; - // - // RxNum_id - // - this.RxNum_id.DataPropertyName = "RxNum_id"; - this.RxNum_id.HeaderText = "Rx Number"; - this.RxNum_id.MinimumWidth = 6; - this.RxNum_id.Name = "RxNum_id"; - this.RxNum_id.Width = 125; - // - // numRefills - // - this.numRefills.DataPropertyName = "numRefills"; - this.numRefills.HeaderText = "Number of Refills"; - this.numRefills.MinimumWidth = 6; - this.numRefills.Name = "numRefills"; - this.numRefills.Width = 125; - // - // pastNumRefills - // - this.pastNumRefills.DataPropertyName = "pastNumRefills"; - this.pastNumRefills.HeaderText = "Past Number of Refills"; - this.pastNumRefills.MinimumWidth = 6; - this.pastNumRefills.Name = "pastNumRefills"; - this.pastNumRefills.Width = 125; - // - // PrescribedBy - // - this.PrescribedBy.DataPropertyName = "PrescribedBy"; - this.PrescribedBy.HeaderText = "Prescribed By"; - this.PrescribedBy.MinimumWidth = 6; - this.PrescribedBy.Name = "PrescribedBy"; - this.PrescribedBy.Width = 125; - // - // Physician_id - // - this.Physician_id.DataPropertyName = "Physician_id"; - this.Physician_id.HeaderText = "Physician ID"; - this.Physician_id.MinimumWidth = 6; - this.Physician_id.Name = "Physician_id"; - this.Physician_id.Width = 125; - // - // Medication_id - // - this.Medication_id.DataPropertyName = "Medication_id"; - this.Medication_id.HeaderText = "Medication ID"; - this.Medication_id.MinimumWidth = 6; - this.Medication_id.Name = "Medication_id"; - this.Medication_id.Width = 125; - // - // Patient_id - // - this.Patient_id.DataPropertyName = "Patient_id"; - this.Patient_id.HeaderText = "Patient ID"; - this.Patient_id.MinimumWidth = 6; - this.Patient_id.Name = "Patient_id"; - this.Patient_id.Width = 125; - // - // cmuRx - // - this.cmuRx.ImageScalingSize = new System.Drawing.Size(20, 20); - this.cmuRx.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cmuRxNew, - this.cmuRxEdit, - this.cmuRxDelete}); - this.cmuRx.Name = "cmuRx"; - this.cmuRx.Size = new System.Drawing.Size(123, 76); - // - // cmuRxNew - // - this.cmuRxNew.Name = "cmuRxNew"; - this.cmuRxNew.Size = new System.Drawing.Size(122, 24); - this.cmuRxNew.Text = "New"; - // - // cmuRxEdit - // - this.cmuRxEdit.Name = "cmuRxEdit"; - this.cmuRxEdit.Size = new System.Drawing.Size(122, 24); - this.cmuRxEdit.Text = "Edit"; - // - // cmuRxDelete - // - this.cmuRxDelete.Name = "cmuRxDelete"; - this.cmuRxDelete.Size = new System.Drawing.Size(122, 24); - this.cmuRxDelete.Text = "Delete"; - // - // tbpPhysician - // - this.tbpPhysician.Controls.Add(this.splcPhysician); - this.tbpPhysician.Location = new System.Drawing.Point(4, 25); - this.tbpPhysician.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.tbpPhysician.Name = "tbpPhysician"; - this.tbpPhysician.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.tbpPhysician.Size = new System.Drawing.Size(880, 514); - this.tbpPhysician.TabIndex = 2; - this.tbpPhysician.Text = "Physician Info"; - this.tbpPhysician.UseVisualStyleBackColor = true; - // - // splcPhysician - // - this.splcPhysician.Dock = System.Windows.Forms.DockStyle.Fill; - this.splcPhysician.Location = new System.Drawing.Point(4, 4); - this.splcPhysician.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.splcPhysician.Name = "splcPhysician"; - this.splcPhysician.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splcPhysician.Panel1 - // - this.splcPhysician.Panel1.AutoScroll = true; - this.splcPhysician.Panel1.Controls.Add(this.txtPhysicianID); - this.splcPhysician.Panel1.Controls.Add(this.lblPhysicianID); - this.splcPhysician.Panel1.Controls.Add(lblPhysicianLast); - this.splcPhysician.Panel1.Controls.Add(this.txtPhysicianLast); - this.splcPhysician.Panel1.Controls.Add(lblPhysicianFirst); - this.splcPhysician.Panel1.Controls.Add(this.txtPhysicianFirst); - this.splcPhysician.Panel1.Controls.Add(this.btnPhysicianSearch); - this.splcPhysician.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.No; - // - // splcPhysician.Panel2 - // - this.splcPhysician.Panel2.AutoScroll = true; - this.splcPhysician.Panel2.Controls.Add(this.dgvPhysician); - this.splcPhysician.Size = new System.Drawing.Size(872, 506); - this.splcPhysician.SplitterDistance = 226; - this.splcPhysician.SplitterWidth = 5; - this.splcPhysician.TabIndex = 0; - // - // txtPhysicianID - // - this.txtPhysicianID.Location = new System.Drawing.Point(132, 137); - this.txtPhysicianID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtPhysicianID.Name = "txtPhysicianID"; - this.txtPhysicianID.Size = new System.Drawing.Size(132, 22); - this.txtPhysicianID.TabIndex = 8; - // - // lblPhysicianID - // - this.lblPhysicianID.AutoSize = true; - this.lblPhysicianID.Location = new System.Drawing.Point(32, 137); - this.lblPhysicianID.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.lblPhysicianID.Name = "lblPhysicianID"; - this.lblPhysicianID.Size = new System.Drawing.Size(89, 17); - this.lblPhysicianID.TabIndex = 7; - this.lblPhysicianID.Text = "Physician ID:"; - // - // txtPhysicianLast - // - this.txtPhysicianLast.Location = new System.Drawing.Point(132, 82); - this.txtPhysicianLast.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtPhysicianLast.Name = "txtPhysicianLast"; - this.txtPhysicianLast.Size = new System.Drawing.Size(132, 22); - this.txtPhysicianLast.TabIndex = 6; - // - // txtPhysicianFirst - // - this.txtPhysicianFirst.Location = new System.Drawing.Point(132, 28); - this.txtPhysicianFirst.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.txtPhysicianFirst.Name = "txtPhysicianFirst"; - this.txtPhysicianFirst.Size = new System.Drawing.Size(132, 22); - this.txtPhysicianFirst.TabIndex = 5; - // - // btnPhysicianSearch - // - this.btnPhysicianSearch.Location = new System.Drawing.Point(60, 180); - this.btnPhysicianSearch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnPhysicianSearch.Name = "btnPhysicianSearch"; - this.btnPhysicianSearch.Size = new System.Drawing.Size(100, 28); - this.btnPhysicianSearch.TabIndex = 4; - this.btnPhysicianSearch.Text = "Search"; - this.btnPhysicianSearch.UseVisualStyleBackColor = true; - this.btnPhysicianSearch.Click += new System.EventHandler(this.btnPhysicianSearch_Click); - // - // dgvPhysician - // - this.dgvPhysician.AllowUserToAddRows = false; - this.dgvPhysician.AllowUserToDeleteRows = false; - this.dgvPhysician.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dgvPhysician.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.Phys_id, - this.namefirst, - this.namelast, - this.initialsmiddle, - this.cit, - this.state, - this.zipp, - this.dobb, - this.numberphone, - this.gennder, - this.Specialty}); - this.dgvPhysician.ContextMenuStrip = this.cmuPhysician; - this.dgvPhysician.Location = new System.Drawing.Point(4, 4); - this.dgvPhysician.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.dgvPhysician.Name = "dgvPhysician"; - this.dgvPhysician.ReadOnly = true; - this.dgvPhysician.RowHeadersWidth = 51; - this.dgvPhysician.Size = new System.Drawing.Size(861, 266); - this.dgvPhysician.TabIndex = 0; - // - // Phys_id - // - this.Phys_id.DataPropertyName = "Physician_id"; - this.Phys_id.HeaderText = "Physician ID"; - this.Phys_id.MinimumWidth = 6; - this.Phys_id.Name = "Phys_id"; - this.Phys_id.ReadOnly = true; - this.Phys_id.Width = 125; - // - // namefirst - // - this.namefirst.DataPropertyName = "FirstName"; - this.namefirst.HeaderText = "First Name"; - this.namefirst.MinimumWidth = 6; - this.namefirst.Name = "namefirst"; - this.namefirst.ReadOnly = true; - this.namefirst.Width = 125; - // - // namelast - // - this.namelast.DataPropertyName = "LastName"; - this.namelast.HeaderText = "Last Name"; - this.namelast.MinimumWidth = 6; - this.namelast.Name = "namelast"; - this.namelast.ReadOnly = true; - this.namelast.Width = 125; - // - // initialsmiddle - // - this.initialsmiddle.DataPropertyName = "MiddleInitials"; - this.initialsmiddle.HeaderText = "Middle Initial"; - this.initialsmiddle.MinimumWidth = 6; - this.initialsmiddle.Name = "initialsmiddle"; - this.initialsmiddle.ReadOnly = true; - this.initialsmiddle.Width = 125; - // - // cit - // - this.cit.DataPropertyName = "City"; - this.cit.HeaderText = "City"; - this.cit.MinimumWidth = 6; - this.cit.Name = "cit"; - this.cit.ReadOnly = true; - this.cit.Width = 125; - // - // state - // - this.state.DataPropertyName = "UsState"; - this.state.HeaderText = "State"; - this.state.MinimumWidth = 6; - this.state.Name = "state"; - this.state.ReadOnly = true; - this.state.Width = 125; - // - // zipp - // - this.zipp.DataPropertyName = "Zip"; - this.zipp.HeaderText = "Zip"; - this.zipp.MinimumWidth = 6; - this.zipp.Name = "zipp"; - this.zipp.ReadOnly = true; - this.zipp.Width = 125; - // - // dobb - // - this.dobb.DataPropertyName = "DOB"; - dataGridViewCellStyle2.Format = "d"; - dataGridViewCellStyle2.NullValue = null; - this.dobb.DefaultCellStyle = dataGridViewCellStyle2; - this.dobb.HeaderText = "DOB"; - this.dobb.MinimumWidth = 6; - this.dobb.Name = "dobb"; - this.dobb.ReadOnly = true; - this.dobb.Width = 125; - // - // numberphone - // - this.numberphone.DataPropertyName = "PhoneNumber"; - this.numberphone.HeaderText = "Phone Number"; - this.numberphone.MinimumWidth = 6; - this.numberphone.Name = "numberphone"; - this.numberphone.ReadOnly = true; - this.numberphone.Width = 125; - // - // gennder - // - this.gennder.DataPropertyName = "Gender"; - this.gennder.HeaderText = "Gender"; - this.gennder.MinimumWidth = 6; - this.gennder.Name = "gennder"; - this.gennder.ReadOnly = true; - this.gennder.Width = 125; - // - // Specialty - // - this.Specialty.DataPropertyName = "Specialty"; - this.Specialty.HeaderText = "Specialty"; - this.Specialty.MinimumWidth = 6; - this.Specialty.Name = "Specialty"; - this.Specialty.ReadOnly = true; - this.Specialty.Width = 125; - // - // cmuPhysician - // - this.cmuPhysician.ImageScalingSize = new System.Drawing.Size(20, 20); - this.cmuPhysician.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cmuPhysicianNew, - this.cmuPhysicianEdit, - this.cmuPhysicianDelete}); - this.cmuPhysician.Name = "cmuPhysician"; - this.cmuPhysician.Size = new System.Drawing.Size(123, 76); - // - // cmuPhysicianNew - // - this.cmuPhysicianNew.Name = "cmuPhysicianNew"; - this.cmuPhysicianNew.Size = new System.Drawing.Size(122, 24); - this.cmuPhysicianNew.Text = "New"; - // - // cmuPhysicianEdit - // - this.cmuPhysicianEdit.Name = "cmuPhysicianEdit"; - this.cmuPhysicianEdit.Size = new System.Drawing.Size(122, 24); - this.cmuPhysicianEdit.Text = "Edit"; - // - // cmuPhysicianDelete - // - this.cmuPhysicianDelete.Name = "cmuPhysicianDelete"; - this.cmuPhysicianDelete.Size = new System.Drawing.Size(122, 24); - this.cmuPhysicianDelete.Text = "Delete"; - // // frmInfo // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(983, 572); + this.ClientSize = new System.Drawing.Size(737, 465); this.Controls.Add(this.tbcInfo); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "frmInfo"; this.Text = "Louis\' Pharmacy - View Patient / Prescription Info"; this.Load += new System.EventHandler(this.frmInfo_Load); @@ -938,7 +867,6 @@ namespace Louis__Pharmacy_CNSA212_FP ((System.ComponentModel.ISupportInitialize)(this.dgvPhysician)).EndInit(); this.cmuPhysician.ResumeLayout(false); this.ResumeLayout(false); - } private System.Windows.Forms.ContextMenuStrip cmuPatient; diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs index 80ee9e2..c4ee6d1 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs @@ -13,8 +13,11 @@ namespace Louis__Pharmacy_CNSA212_FP { public partial class frmInfo : Form { + private ErrorProvider ep1 = new ErrorProvider(); + public DataSet ds = new DataSet(); + public frmInfo() { InitializeComponent(); @@ -60,7 +63,7 @@ namespace Louis__Pharmacy_CNSA212_FP string lname = ""; string id = ""; - DataSet ds = new DataSet(); + if (txtPatientFirst.Text.Length + txtPatientLast.Text.Length + txtPatientID.Text.Length > 0) { @@ -150,7 +153,6 @@ namespace Louis__Pharmacy_CNSA212_FP string rxID = ""; string patientID = ""; - DataSet ds = new DataSet(); if (txtPrescriptionPatID.Text.Length+txtRxNumber.Text.Length > 0) { @@ -225,7 +227,6 @@ namespace Louis__Pharmacy_CNSA212_FP string lname = ""; string phyID = "";; - DataSet ds = new DataSet(); if (txtPhysicianFirst.Text.Length+txtPhysicianLast.Text.Length+txtPhysicianID.Text.Length > 0) { @@ -322,10 +323,13 @@ namespace Louis__Pharmacy_CNSA212_FP { if (dgvPatient.Rows.Count > 0) { + + dgvPatient.DataSource = ds.Tables[0]; // Console.WriteLine( dgvPatient.SelectedRows.Count); - DataGridViewRow row = dgvPatient.SelectedRows[0]; + DataGridViewRow row = new DataGridViewRow(); + row = dgvPatient.SelectedRows[0]; string patid = ""; - patid = (row.Cells[0].Value).ToString(); + patid = (row.Cells[4].Value).ToString(); frmPatientAdd PatientAdd = new frmPatientAdd(false); PatientAdd.MdiParent = MdiParent; PatientAdd.StartPosition = FormStartPosition.CenterScreen; diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs b/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs index 7ec95db..d49b1ee 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPatientAdd.cs @@ -59,7 +59,7 @@ namespace Louis__Pharmacy_CNSA212_FP txtPatientID.Text = ds.Tables[0].Rows[0]["Patient_id"].ToString(); txtFname.Text = ds.Tables[0].Rows[0]["FirstName"].ToString(); txtLname.Text = ds.Tables[0].Rows[0]["LastName"].ToString(); - txtMidInit.Text = ds.Tables[0].Rows[0]["MiddleInitals"].ToString(); + txtMidInit.Text = ds.Tables[0].Rows[0]["MiddleIntials"].ToString(); txtWeight.Text = ds.Tables[0].Rows[0]["lbs"].ToString(); txtHeightFt.Text = ds.Tables[0].Rows[0]["Height_feet"].ToString(); txtHeightIn.Text = ds.Tables[0].Rows[0]["Height_inches"].ToString();