Add refill working for info form.

This commit is contained in:
Adam McCane 2024-02-20 22:13:20 -05:00
parent 6f693d0aa3
commit e2fdf2a9fe
2 changed files with 198 additions and 176 deletions

View File

@ -40,6 +40,10 @@ namespace Louis__Pharmacy_CNSA212_FP
this.tbcInfo = new System.Windows.Forms.TabControl();
this.tbpPatient = new System.Windows.Forms.TabPage();
this.splcPatient = new System.Windows.Forms.SplitContainer();
this.cmuPatient = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmuPatientNew = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPatientEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPatientDelete = new System.Windows.Forms.ToolStripMenuItem();
this.txtPatientID = new System.Windows.Forms.TextBox();
this.lblPatientID = new System.Windows.Forms.Label();
this.txtPatientLast = new System.Windows.Forms.TextBox();
@ -61,12 +65,12 @@ namespace Louis__Pharmacy_CNSA212_FP
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();
this.cmuPatientDelete = new System.Windows.Forms.ToolStripMenuItem();
this.tbpMedication = new System.Windows.Forms.TabPage();
this.splcPrescription = new System.Windows.Forms.SplitContainer();
this.cmuMedication = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmuMedicationNew = new System.Windows.Forms.ToolStripMenuItem();
this.cmuMedicationEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuMedicationDelete = new System.Windows.Forms.ToolStripMenuItem();
this.btnMedicationSearch = new System.Windows.Forms.Button();
this.txtMedicationName = new System.Windows.Forms.TextBox();
this.txtMedicationNumber = new System.Windows.Forms.TextBox();
@ -80,12 +84,12 @@ namespace Louis__Pharmacy_CNSA212_FP
this.Dosage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Purpose = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.RxNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.cmuMedication = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmuMedicationNew = new System.Windows.Forms.ToolStripMenuItem();
this.cmuMedicationEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuMedicationDelete = new System.Windows.Forms.ToolStripMenuItem();
this.tbpPhysician = new System.Windows.Forms.TabPage();
this.splcPhysician = new System.Windows.Forms.SplitContainer();
this.cmuPhysician = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmuPhysicianNew = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPhysicianEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPhysicianDelete = new System.Windows.Forms.ToolStripMenuItem();
this.txtPhysicianID = new System.Windows.Forms.TextBox();
this.lblPhysicianID = new System.Windows.Forms.Label();
this.txtPhysicianLast = new System.Windows.Forms.TextBox();
@ -103,11 +107,13 @@ namespace Louis__Pharmacy_CNSA212_FP
this.numberphone = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.gennder = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Specialty = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.cmuPhysician = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmuPhysicianNew = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPhysicianEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPhysicianDelete = new System.Windows.Forms.ToolStripMenuItem();
this.tbcInfoPrescriptions = new System.Windows.Forms.TabPage();
this.cmuPrescription = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmuPrescriptionNew = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionDelete = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionRefillThis = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionViewRefills = new System.Windows.Forms.ToolStripMenuItem();
this.txtRxPatientID = new System.Windows.Forms.TextBox();
this.txtRxMedicationID = new System.Windows.Forms.TextBox();
this.txtRxPhysicianID = new System.Windows.Forms.TextBox();
@ -125,12 +131,6 @@ namespace Louis__Pharmacy_CNSA212_FP
this.Physician_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Medicationid = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Patientid = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.cmuPrescription = new System.Windows.Forms.ContextMenuStrip(this.components);
this.cmuPrescriptionNew = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionDelete = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionRefillThis = new System.Windows.Forms.ToolStripMenuItem();
this.cmuPrescriptionViewRefills = new System.Windows.Forms.ToolStripMenuItem();
lblPatientFirst = new System.Windows.Forms.Label();
lblPatientLast = new System.Windows.Forms.Label();
lblPhysicianFirst = new System.Windows.Forms.Label();
@ -141,25 +141,25 @@ namespace Louis__Pharmacy_CNSA212_FP
this.splcPatient.Panel1.SuspendLayout();
this.splcPatient.Panel2.SuspendLayout();
this.splcPatient.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPatient)).BeginInit();
this.cmuPatient.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPatient)).BeginInit();
this.tbpMedication.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splcPrescription)).BeginInit();
this.splcPrescription.Panel1.SuspendLayout();
this.splcPrescription.Panel2.SuspendLayout();
this.splcPrescription.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMedication)).BeginInit();
this.cmuMedication.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMedication)).BeginInit();
this.tbpPhysician.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splcPhysician)).BeginInit();
this.splcPhysician.Panel1.SuspendLayout();
this.splcPhysician.Panel2.SuspendLayout();
this.splcPhysician.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPhysician)).BeginInit();
this.cmuPhysician.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPhysician)).BeginInit();
this.tbcInfoPrescriptions.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPrescription)).BeginInit();
this.cmuPrescription.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPrescription)).BeginInit();
this.SuspendLayout();
//
// lblPatientFirst
@ -247,6 +247,37 @@ namespace Louis__Pharmacy_CNSA212_FP
this.splcPatient.SplitterDistance = 210;
this.splcPatient.TabIndex = 0;
//
// 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";
this.cmuPatientDelete.Click += new System.EventHandler(this.cmuPatientDelete_Click);
//
// txtPatientID
//
this.txtPatientID.Location = new System.Drawing.Point(86, 109);
@ -459,37 +490,6 @@ 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(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";
this.cmuPatientDelete.Click += new System.EventHandler(this.cmuPatientDelete_Click);
//
// tbpMedication
//
this.tbpMedication.Controls.Add(this.splcPrescription);
@ -523,6 +523,37 @@ namespace Louis__Pharmacy_CNSA212_FP
this.splcPrescription.SplitterDistance = 241;
this.splcPrescription.TabIndex = 0;
//
// cmuMedication
//
this.cmuMedication.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmuMedication.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmuMedicationNew,
this.cmuMedicationEdit,
this.cmuMedicationDelete});
this.cmuMedication.Name = "cmuMedication";
this.cmuMedication.Size = new System.Drawing.Size(108, 70);
//
// cmuMedicationNew
//
this.cmuMedicationNew.Name = "cmuMedicationNew";
this.cmuMedicationNew.Size = new System.Drawing.Size(107, 22);
this.cmuMedicationNew.Text = "New";
this.cmuMedicationNew.Click += new System.EventHandler(this.cmuRxNew_Click);
//
// cmuMedicationEdit
//
this.cmuMedicationEdit.Name = "cmuMedicationEdit";
this.cmuMedicationEdit.Size = new System.Drawing.Size(107, 22);
this.cmuMedicationEdit.Text = "Edit";
this.cmuMedicationEdit.Click += new System.EventHandler(this.cmuMedicationEdit_Click);
//
// cmuMedicationDelete
//
this.cmuMedicationDelete.Name = "cmuMedicationDelete";
this.cmuMedicationDelete.Size = new System.Drawing.Size(107, 22);
this.cmuMedicationDelete.Text = "Delete";
this.cmuMedicationDelete.Click += new System.EventHandler(this.cmuMedicationDelete_Click);
//
// btnMedicationSearch
//
this.btnMedicationSearch.Location = new System.Drawing.Point(64, 117);
@ -572,7 +603,14 @@ namespace Louis__Pharmacy_CNSA212_FP
this.dgvMedication.AllowUserToAddRows = false;
this.dgvMedication.AllowUserToDeleteRows = false;
this.dgvMedication.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvMedication.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Medication_id, this.MedicationName, this.IntakeMethod, this.Frequency, this.Dosage, this.Purpose, this.RxNum });
this.dgvMedication.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Medication_id,
this.MedicationName,
this.IntakeMethod,
this.Frequency,
this.Dosage,
this.Purpose,
this.RxNum});
this.dgvMedication.ContextMenuStrip = this.cmuMedication;
this.dgvMedication.Location = new System.Drawing.Point(3, 3);
this.dgvMedication.Name = "dgvMedication";
@ -645,37 +683,6 @@ namespace Louis__Pharmacy_CNSA212_FP
this.RxNum.ReadOnly = true;
this.RxNum.Width = 125;
//
// cmuMedication
//
this.cmuMedication.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmuMedication.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmuMedicationNew,
this.cmuMedicationEdit,
this.cmuMedicationDelete});
this.cmuMedication.Name = "cmuMedication";
this.cmuMedication.Size = new System.Drawing.Size(108, 70);
//
// cmuMedicationNew
//
this.cmuMedicationNew.Name = "cmuMedicationNew";
this.cmuMedicationNew.Size = new System.Drawing.Size(107, 22);
this.cmuMedicationNew.Text = "New";
this.cmuMedicationNew.Click += new System.EventHandler(this.cmuRxNew_Click);
//
// cmuMedicationEdit
//
this.cmuMedicationEdit.Name = "cmuMedicationEdit";
this.cmuMedicationEdit.Size = new System.Drawing.Size(107, 22);
this.cmuMedicationEdit.Text = "Edit";
this.cmuMedicationEdit.Click += new System.EventHandler(this.cmuMedicationEdit_Click);
//
// cmuMedicationDelete
//
this.cmuMedicationDelete.Name = "cmuMedicationDelete";
this.cmuMedicationDelete.Size = new System.Drawing.Size(107, 22);
this.cmuMedicationDelete.Text = "Delete";
this.cmuMedicationDelete.Click += new System.EventHandler(this.cmuMedicationDelete_Click);
//
// tbpPhysician
//
this.tbpPhysician.Controls.Add(this.splcPhysician);
@ -716,6 +723,37 @@ namespace Louis__Pharmacy_CNSA212_FP
this.splcPhysician.SplitterDistance = 194;
this.splcPhysician.TabIndex = 0;
//
// 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";
this.cmuPhysicianNew.Click += new System.EventHandler(this.cmuPhysicianNew_Click);
//
// cmuPhysicianEdit
//
this.cmuPhysicianEdit.Name = "cmuPhysicianEdit";
this.cmuPhysicianEdit.Size = new System.Drawing.Size(107, 22);
this.cmuPhysicianEdit.Text = "Edit";
this.cmuPhysicianEdit.Click += new System.EventHandler(this.cmuPhysicianEdit_Click);
//
// cmuPhysicianDelete
//
this.cmuPhysicianDelete.Name = "cmuPhysicianDelete";
this.cmuPhysicianDelete.Size = new System.Drawing.Size(107, 22);
this.cmuPhysicianDelete.Text = "Delete";
this.cmuPhysicianDelete.Click += new System.EventHandler(this.cmuPhysicianDelete_Click);
//
// txtPhysicianID
//
this.txtPhysicianID.Location = new System.Drawing.Point(99, 111);
@ -885,37 +923,6 @@ namespace Louis__Pharmacy_CNSA212_FP
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";
this.cmuPhysicianNew.Click += new System.EventHandler(this.cmuPhysicianNew_Click);
//
// cmuPhysicianEdit
//
this.cmuPhysicianEdit.Name = "cmuPhysicianEdit";
this.cmuPhysicianEdit.Size = new System.Drawing.Size(107, 22);
this.cmuPhysicianEdit.Text = "Edit";
this.cmuPhysicianEdit.Click += new System.EventHandler(this.cmuPhysicianEdit_Click);
//
// cmuPhysicianDelete
//
this.cmuPhysicianDelete.Name = "cmuPhysicianDelete";
this.cmuPhysicianDelete.Size = new System.Drawing.Size(107, 22);
this.cmuPhysicianDelete.Text = "Delete";
this.cmuPhysicianDelete.Click += new System.EventHandler(this.cmuPhysicianDelete_Click);
//
// tbcInfoPrescriptions
//
this.tbcInfoPrescriptions.ContextMenuStrip = this.cmuPrescription;
@ -937,6 +944,53 @@ namespace Louis__Pharmacy_CNSA212_FP
this.tbcInfoPrescriptions.Text = "Prescriptions";
this.tbcInfoPrescriptions.UseVisualStyleBackColor = true;
//
// cmuPrescription
//
this.cmuPrescription.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmuPrescription.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmuPrescriptionNew,
this.cmuPrescriptionEdit,
this.cmuPrescriptionDelete,
this.cmuPrescriptionRefillThis,
this.cmuPrescriptionViewRefills});
this.cmuPrescription.Name = "cmuPrescription";
this.cmuPrescription.Size = new System.Drawing.Size(244, 136);
//
// cmuPrescriptionNew
//
this.cmuPrescriptionNew.Name = "cmuPrescriptionNew";
this.cmuPrescriptionNew.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionNew.Text = "New";
this.cmuPrescriptionNew.Click += new System.EventHandler(this.cmuPrescriptionNew_Click_1);
//
// cmuPrescriptionEdit
//
this.cmuPrescriptionEdit.Name = "cmuPrescriptionEdit";
this.cmuPrescriptionEdit.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionEdit.Text = "Edit";
this.cmuPrescriptionEdit.Click += new System.EventHandler(this.cmuPrescriptionEdit_Click);
//
// cmuPrescriptionDelete
//
this.cmuPrescriptionDelete.Name = "cmuPrescriptionDelete";
this.cmuPrescriptionDelete.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionDelete.Text = "Delete";
this.cmuPrescriptionDelete.Click += new System.EventHandler(this.cmuPrescriptionDelete_Click);
//
// cmuPrescriptionRefillThis
//
this.cmuPrescriptionRefillThis.Name = "cmuPrescriptionRefillThis";
this.cmuPrescriptionRefillThis.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionRefillThis.Text = "Refill This Prescription";
this.cmuPrescriptionRefillThis.Click += new System.EventHandler(this.cmuPrescriptionRefillThis_Click);
//
// cmuPrescriptionViewRefills
//
this.cmuPrescriptionViewRefills.Name = "cmuPrescriptionViewRefills";
this.cmuPrescriptionViewRefills.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionViewRefills.Text = "View Refills For This Prescription";
this.cmuPrescriptionViewRefills.Click += new System.EventHandler(this.cmuPrescriptionViewRefills_Click);
//
// txtRxPatientID
//
this.txtRxPatientID.Location = new System.Drawing.Point(138, 121);
@ -1015,7 +1069,14 @@ namespace Louis__Pharmacy_CNSA212_FP
// dgvPrescription
//
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.Medicationid, this.Patientid });
this.dgvPrescription.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.RxNum_id,
this.numRefills,
this.pastNumRefills,
this.PrescribedBy,
this.Physician_id,
this.Medicationid,
this.Patientid});
this.dgvPrescription.ContextMenuStrip = this.cmuPrescription;
this.dgvPrescription.Location = new System.Drawing.Point(0, 236);
this.dgvPrescription.Name = "dgvPrescription";
@ -1075,53 +1136,6 @@ namespace Louis__Pharmacy_CNSA212_FP
this.Patientid.Name = "Patientid";
this.Patientid.ReadOnly = true;
//
// cmuPrescription
//
this.cmuPrescription.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmuPrescription.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmuPrescriptionNew,
this.cmuPrescriptionEdit,
this.cmuPrescriptionDelete,
this.cmuPrescriptionRefillThis,
this.cmuPrescriptionViewRefills});
this.cmuPrescription.Name = "cmuPrescription";
this.cmuPrescription.Size = new System.Drawing.Size(244, 136);
//
// cmuPrescriptionNew
//
this.cmuPrescriptionNew.Name = "cmuPrescriptionNew";
this.cmuPrescriptionNew.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionNew.Text = "New";
this.cmuPrescriptionNew.Click += new System.EventHandler(this.cmuPrescriptionNew_Click_1);
//
// cmuPrescriptionEdit
//
this.cmuPrescriptionEdit.Name = "cmuPrescriptionEdit";
this.cmuPrescriptionEdit.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionEdit.Text = "Edit";
this.cmuPrescriptionEdit.Click += new System.EventHandler(this.cmuPrescriptionEdit_Click);
//
// cmuPrescriptionDelete
//
this.cmuPrescriptionDelete.Name = "cmuPrescriptionDelete";
this.cmuPrescriptionDelete.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionDelete.Text = "Delete";
this.cmuPrescriptionDelete.Click += new System.EventHandler(this.cmuPrescriptionDelete_Click);
//
// cmuPrescriptionRefillThis
//
this.cmuPrescriptionRefillThis.Name = "cmuPrescriptionRefillThis";
this.cmuPrescriptionRefillThis.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionRefillThis.Text = "Refill This Prescription";
this.cmuPrescriptionRefillThis.Click += new System.EventHandler(this.cmuPrescriptionRefillThis_Click);
//
// cmuPrescriptionViewRefills
//
this.cmuPrescriptionViewRefills.Name = "cmuPrescriptionViewRefills";
this.cmuPrescriptionViewRefills.Size = new System.Drawing.Size(243, 22);
this.cmuPrescriptionViewRefills.Text = "View Refills For This Prescription";
this.cmuPrescriptionViewRefills.Click += new System.EventHandler(this.cmuPrescriptionViewRefills_Click);
//
// frmInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1140,28 +1154,28 @@ namespace Louis__Pharmacy_CNSA212_FP
this.splcPatient.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splcPatient)).EndInit();
this.splcPatient.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvPatient)).EndInit();
this.cmuPatient.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvPatient)).EndInit();
this.tbpMedication.ResumeLayout(false);
this.splcPrescription.Panel1.ResumeLayout(false);
this.splcPrescription.Panel1.PerformLayout();
this.splcPrescription.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splcPrescription)).EndInit();
this.splcPrescription.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvMedication)).EndInit();
this.cmuMedication.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvMedication)).EndInit();
this.tbpPhysician.ResumeLayout(false);
this.splcPhysician.Panel1.ResumeLayout(false);
this.splcPhysician.Panel1.PerformLayout();
this.splcPhysician.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splcPhysician)).EndInit();
this.splcPhysician.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvPhysician)).EndInit();
this.cmuPhysician.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvPhysician)).EndInit();
this.tbcInfoPrescriptions.ResumeLayout(false);
this.tbcInfoPrescriptions.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvPrescription)).EndInit();
this.cmuPrescription.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvPrescription)).EndInit();
this.ResumeLayout(false);
}

View File

@ -796,20 +796,23 @@ namespace Louis__Pharmacy_CNSA212_FP
string patientID = "";
string medicationID = "";
string rxNum = "";
Int32 numRefills = 0;
Int32 pastNumRefills = 0;
string numRefills = "";
string pastNumRefills = "";
rxNum = ds.Tables[0].Rows[0]["RxNum_id"].ToString();
try
{
DataSet ds = new DataSet();
PharmacyDataTier phaDT = new PharmacyDataTier();
ds = phaDT.NumberofRefills(rxNum);
//dgvPrescription.DataSource = ds.Tables[0];
// Console.WriteLine( dgvPatient.SelectedRows.Count);
DataGridViewRow row = new DataGridViewRow();
row = dgvPrescription.SelectedRows[0];
rxNum = (row.Cells[0].Value).ToString();
numRefills = Int32.Parse(ds.Tables[0].Rows[0]["numRefills"].ToString());
pastNumRefills = Int32.Parse(ds.Tables[0].Rows[0]["pastNumRefills"].ToString());
numRefills = row.Cells[1].Value.ToString();
pastNumRefills = row.Cells[2].Value.ToString();
if (numRefills == pastNumRefills)
{
@ -819,8 +822,8 @@ namespace Louis__Pharmacy_CNSA212_FP
{
refillID = PharmacyDataTier.GetNextRefillID().ToString();
date = DateTime.Now;
patientID = ds.Tables[0].Rows[0]["Patient_id"].ToString() ;
medicationID = ds.Tables[0].Rows[0]["Medication_id"].ToString();
patientID = row.Cells[6].Value.ToString() ;
medicationID = row.Cells[5].Value.ToString() ;
PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum);
PharmacyDataTier.PastRefills(rxNum);
@ -917,6 +920,11 @@ namespace Louis__Pharmacy_CNSA212_FP
dgvMedication.Focus();
}
private void cmuPrescriptionViewRefills_Click(object sender, EventArgs e)
{
}
}
}