diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs index cf6bb4a..eac51f4 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs @@ -628,7 +628,7 @@ namespace Louis__Pharmacy_CNSA212_FP dgvPrescription.DataSource = ds.Tables[0]; DataGridViewRow row = new DataGridViewRow(); - row = dgvPrescription.SelectedRows[0]; + row = dgvMedication.SelectedRows[0]; string medID = ""; medID = (row.Cells[0].Value).ToString(); @@ -638,7 +638,7 @@ namespace Louis__Pharmacy_CNSA212_FP { PharmacyDataTier.DeleteMedication(medID); } - btnPrescriptionSearch_Click(sender, e); + btnMedicationSearch_Click(sender, e); } } @@ -838,6 +838,8 @@ namespace Louis__Pharmacy_CNSA212_FP PharmacyDataTier.AddRefill(refillID, date, patientID, medicationID, rxNum); PharmacyDataTier.PastRefills(rxNum); + + btnPrescriptionSearch_Click(sender,e); } } catch (Exception exception) diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPatient.Designer.cs b/Louis'-Pharmacy_CNSA212-FP/frmPatient.Designer.cs index cf7d04b..481354b 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPatient.Designer.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPatient.Designer.cs @@ -64,9 +64,10 @@ namespace Louis__Pharmacy_CNSA212_FP // // label1 // - this.label1.Location = new System.Drawing.Point(83, 72); + this.label1.Location = new System.Drawing.Point(111, 89); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(100, 23); + this.label1.Size = new System.Drawing.Size(133, 28); this.label1.TabIndex = 0; this.label1.Text = "Patient ID:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -74,233 +75,259 @@ namespace Louis__Pharmacy_CNSA212_FP // // label2 // - this.label2.Location = new System.Drawing.Point(83, 95); + this.label2.Location = new System.Drawing.Point(111, 117); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(100, 23); + this.label2.Size = new System.Drawing.Size(133, 28); this.label2.TabIndex = 1; this.label2.Text = "First Name:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label3 // - this.label3.Location = new System.Drawing.Point(83, 118); + this.label3.Location = new System.Drawing.Point(111, 145); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(100, 23); + this.label3.Size = new System.Drawing.Size(133, 28); this.label3.TabIndex = 2; this.label3.Text = "Last Name:"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label4 // - this.label4.Location = new System.Drawing.Point(83, 141); + this.label4.Location = new System.Drawing.Point(111, 174); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(100, 23); + this.label4.Size = new System.Drawing.Size(133, 28); this.label4.TabIndex = 3; this.label4.Text = "Middle Initial:"; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label5 // - this.label5.Location = new System.Drawing.Point(391, 72); + this.label5.Location = new System.Drawing.Point(521, 89); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(100, 23); + this.label5.Size = new System.Drawing.Size(133, 28); this.label5.TabIndex = 4; this.label5.Text = "City:"; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label6 // - this.label6.Location = new System.Drawing.Point(391, 95); + this.label6.Location = new System.Drawing.Point(521, 117); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(100, 23); + this.label6.Size = new System.Drawing.Size(133, 28); this.label6.TabIndex = 5; this.label6.Text = "Zip Code:"; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label7 // - this.label7.Location = new System.Drawing.Point(391, 118); + this.label7.Location = new System.Drawing.Point(521, 145); + this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(100, 23); + this.label7.Size = new System.Drawing.Size(133, 28); this.label7.TabIndex = 6; this.label7.Text = "State"; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label8 // - this.label8.Location = new System.Drawing.Point(83, 164); + this.label8.Location = new System.Drawing.Point(111, 202); + this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(100, 23); + this.label8.Size = new System.Drawing.Size(133, 28); this.label8.TabIndex = 7; this.label8.Text = "Weight (Lbs):"; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label9 // - this.label9.Location = new System.Drawing.Point(83, 187); + this.label9.Location = new System.Drawing.Point(111, 230); + this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(100, 23); + this.label9.Size = new System.Drawing.Size(133, 28); this.label9.TabIndex = 8; this.label9.Text = "Height (Ft):"; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label10 // - this.label10.Location = new System.Drawing.Point(83, 210); + this.label10.Location = new System.Drawing.Point(111, 258); + this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(100, 23); + this.label10.Size = new System.Drawing.Size(133, 28); this.label10.TabIndex = 9; this.label10.Text = "Height (in):"; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label11 // - this.label11.Location = new System.Drawing.Point(83, 233); + this.label11.Location = new System.Drawing.Point(111, 287); + this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(100, 23); + this.label11.Size = new System.Drawing.Size(133, 28); this.label11.TabIndex = 10; this.label11.Text = "Date of Birth:"; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label12 // - this.label12.Location = new System.Drawing.Point(391, 141); + this.label12.Location = new System.Drawing.Point(521, 174); + this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(100, 23); + this.label12.Size = new System.Drawing.Size(133, 28); this.label12.TabIndex = 11; this.label12.Text = "Phone Number:"; this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // label13 // - this.label13.Location = new System.Drawing.Point(83, 256); + this.label13.Location = new System.Drawing.Point(111, 315); + this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(100, 23); + this.label13.Size = new System.Drawing.Size(133, 28); this.label13.TabIndex = 12; this.label13.Text = "Gender (M/F):"; this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // txtPatientID // - this.txtPatientID.Location = new System.Drawing.Point(189, 74); + this.txtPatientID.Location = new System.Drawing.Point(252, 91); + this.txtPatientID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtPatientID.Name = "txtPatientID"; - this.txtPatientID.Size = new System.Drawing.Size(100, 20); + this.txtPatientID.Size = new System.Drawing.Size(132, 22); this.txtPatientID.TabIndex = 1; this.txtPatientID.TextChanged += new System.EventHandler(this.txtPatientID_TextChanged); // // txtFname // - this.txtFname.Location = new System.Drawing.Point(189, 97); + this.txtFname.Location = new System.Drawing.Point(252, 119); + this.txtFname.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtFname.Name = "txtFname"; - this.txtFname.Size = new System.Drawing.Size(100, 20); + this.txtFname.Size = new System.Drawing.Size(132, 22); this.txtFname.TabIndex = 2; this.txtFname.TextChanged += new System.EventHandler(this.txtFname_TextChanged); // // txtLname // - this.txtLname.Location = new System.Drawing.Point(189, 120); + this.txtLname.Location = new System.Drawing.Point(252, 148); + this.txtLname.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtLname.Name = "txtLname"; - this.txtLname.Size = new System.Drawing.Size(100, 20); + this.txtLname.Size = new System.Drawing.Size(132, 22); this.txtLname.TabIndex = 3; this.txtLname.TextChanged += new System.EventHandler(this.txtLname_TextChanged); // // txtMidInit // - this.txtMidInit.Location = new System.Drawing.Point(189, 143); + this.txtMidInit.Location = new System.Drawing.Point(252, 176); + this.txtMidInit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtMidInit.Name = "txtMidInit"; - this.txtMidInit.Size = new System.Drawing.Size(100, 20); + this.txtMidInit.Size = new System.Drawing.Size(132, 22); this.txtMidInit.TabIndex = 4; this.txtMidInit.TextChanged += new System.EventHandler(this.txtMidInit_TextChanged); // // txtWeight // - this.txtWeight.Location = new System.Drawing.Point(189, 166); + this.txtWeight.Location = new System.Drawing.Point(252, 204); + this.txtWeight.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtWeight.Name = "txtWeight"; - this.txtWeight.Size = new System.Drawing.Size(100, 20); + this.txtWeight.Size = new System.Drawing.Size(132, 22); this.txtWeight.TabIndex = 5; this.txtWeight.TextChanged += new System.EventHandler(this.txtWeight_TextChanged); // // txtHeightFt // - this.txtHeightFt.Location = new System.Drawing.Point(189, 189); + this.txtHeightFt.Location = new System.Drawing.Point(252, 233); + this.txtHeightFt.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtHeightFt.Name = "txtHeightFt"; - this.txtHeightFt.Size = new System.Drawing.Size(100, 20); + this.txtHeightFt.Size = new System.Drawing.Size(132, 22); this.txtHeightFt.TabIndex = 6; this.txtHeightFt.TextChanged += new System.EventHandler(this.txtHeightFt_TextChanged); // // txtHeightIn // - this.txtHeightIn.Location = new System.Drawing.Point(189, 212); + this.txtHeightIn.Location = new System.Drawing.Point(252, 261); + this.txtHeightIn.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtHeightIn.Name = "txtHeightIn"; - this.txtHeightIn.Size = new System.Drawing.Size(100, 20); + this.txtHeightIn.Size = new System.Drawing.Size(132, 22); this.txtHeightIn.TabIndex = 7; this.txtHeightIn.TextChanged += new System.EventHandler(this.txtHeightIn_TextChanged); // // txtDOB // - this.txtDOB.Location = new System.Drawing.Point(189, 235); + this.txtDOB.Location = new System.Drawing.Point(252, 289); + this.txtDOB.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtDOB.Name = "txtDOB"; - this.txtDOB.Size = new System.Drawing.Size(100, 20); + this.txtDOB.Size = new System.Drawing.Size(132, 22); this.txtDOB.TabIndex = 8; this.txtDOB.TextChanged += new System.EventHandler(this.txtDOB_TextChanged); // // txtCity // - this.txtCity.Location = new System.Drawing.Point(497, 74); + this.txtCity.Location = new System.Drawing.Point(663, 91); + this.txtCity.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtCity.Name = "txtCity"; - this.txtCity.Size = new System.Drawing.Size(100, 20); + this.txtCity.Size = new System.Drawing.Size(132, 22); this.txtCity.TabIndex = 10; this.txtCity.TextChanged += new System.EventHandler(this.txtCity_TextChanged); // // txtZip // - this.txtZip.Location = new System.Drawing.Point(497, 97); + this.txtZip.Location = new System.Drawing.Point(663, 119); + this.txtZip.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtZip.Name = "txtZip"; - this.txtZip.Size = new System.Drawing.Size(100, 20); + this.txtZip.Size = new System.Drawing.Size(132, 22); this.txtZip.TabIndex = 11; this.txtZip.TextChanged += new System.EventHandler(this.txtZip_TextChanged); // // txtState // - this.txtState.Location = new System.Drawing.Point(497, 120); + this.txtState.Location = new System.Drawing.Point(663, 148); + this.txtState.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtState.Name = "txtState"; - this.txtState.Size = new System.Drawing.Size(100, 20); + this.txtState.Size = new System.Drawing.Size(132, 22); this.txtState.TabIndex = 12; this.txtState.TextChanged += new System.EventHandler(this.txtState_TextChanged); // // txtPhone // - this.txtPhone.Location = new System.Drawing.Point(497, 143); + this.txtPhone.Location = new System.Drawing.Point(663, 176); + this.txtPhone.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtPhone.Name = "txtPhone"; - this.txtPhone.Size = new System.Drawing.Size(100, 20); + this.txtPhone.Size = new System.Drawing.Size(132, 22); this.txtPhone.TabIndex = 13; this.txtPhone.TextChanged += new System.EventHandler(this.txtPhone_TextChanged); // // lblDisPurpose // this.lblDisPurpose.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblDisPurpose.Location = new System.Drawing.Point(206, 9); + this.lblDisPurpose.Location = new System.Drawing.Point(275, 11); + this.lblDisPurpose.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblDisPurpose.Name = "lblDisPurpose"; - this.lblDisPurpose.Size = new System.Drawing.Size(380, 36); + this.lblDisPurpose.Size = new System.Drawing.Size(507, 44); this.lblDisPurpose.TabIndex = 26; this.lblDisPurpose.Text = "Patient"; this.lblDisPurpose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // btnGO // - this.btnGO.Location = new System.Drawing.Point(555, 390); + this.btnGO.Location = new System.Drawing.Point(740, 480); + this.btnGO.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnGO.Name = "btnGO"; - this.btnGO.Size = new System.Drawing.Size(75, 23); + this.btnGO.Size = new System.Drawing.Size(100, 28); this.btnGO.TabIndex = 14; this.btnGO.UseVisualStyleBackColor = true; this.btnGO.Click += new System.EventHandler(this.btnGO_Click); // // btnClose // - this.btnClose.Location = new System.Drawing.Point(674, 390); - this.btnClose.Margin = new System.Windows.Forms.Padding(2); + this.btnClose.Location = new System.Drawing.Point(899, 480); + this.btnClose.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.btnClose.Name = "btnClose"; - this.btnClose.Size = new System.Drawing.Size(75, 23); + this.btnClose.Size = new System.Drawing.Size(100, 28); this.btnClose.TabIndex = 15; this.btnClose.Text = "Close"; this.btnClose.UseVisualStyleBackColor = true; @@ -312,18 +339,19 @@ namespace Louis__Pharmacy_CNSA212_FP this.cboGender.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; this.cboGender.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cboGender.FormattingEnabled = true; - this.cboGender.Location = new System.Drawing.Point(189, 258); + this.cboGender.Location = new System.Drawing.Point(252, 318); + this.cboGender.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cboGender.Name = "cboGender"; - this.cboGender.Size = new System.Drawing.Size(100, 21); + this.cboGender.Size = new System.Drawing.Size(132, 24); this.cboGender.TabIndex = 27; this.cboGender.SelectedIndexChanged += new System.EventHandler(this.cboGender_SelectedIndexChanged); // // frmPatient // this.AcceptButton = this.btnGO; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(812, 483); + this.ClientSize = new System.Drawing.Size(1083, 594); this.Controls.Add(this.cboGender); this.Controls.Add(this.btnClose); this.Controls.Add(this.btnGO); @@ -353,6 +381,7 @@ namespace Louis__Pharmacy_CNSA212_FP this.Controls.Add(this.label3); this.Controls.Add(this.label2); this.Controls.Add(this.label1); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Name = "frmPatient"; this.Text = "frmPatientAdd"; this.Load += new System.EventHandler(this.frmPatientAdd_Load); diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs b/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs index 09cc311..cbc9da8 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPrescription.cs @@ -43,6 +43,7 @@ namespace Louis__Pharmacy_CNSA212_FP KeyDown += frmPrescription_KeyDown; txtRxNum.Enabled = false; + txtCompletedRefills.Text = "0"; } private void frmPrescription_KeyDown(object sender, KeyEventArgs e) @@ -420,7 +421,7 @@ namespace Louis__Pharmacy_CNSA212_FP { numRefills = int.Parse(txtMaxRefills.Text); } - if (numRefills <= 0) + if (numRefills < 0) { throw new Exception(); }