added quality of life features to patient and physician search/update/edit/cancel

This commit is contained in:
caschick221 2024-02-19 14:19:36 -05:00
parent 28140548b2
commit b8830b843d
6 changed files with 295 additions and 234 deletions

View File

@ -185,7 +185,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.tbcInfo.Name = "tbcInfo"; this.tbcInfo.Name = "tbcInfo";
this.tbcInfo.SelectedIndex = 0; this.tbcInfo.SelectedIndex = 0;
this.tbcInfo.Size = new System.Drawing.Size(1111, 785); this.tbcInfo.Size = new System.Drawing.Size(1111, 785);
this.tbcInfo.TabIndex = 1; this.tbcInfo.TabIndex = 999999;
// //
// tbpPatient // tbpPatient
// //
@ -232,7 +232,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.txtPatientID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtPatientID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPatientID.Name = "txtPatientID"; this.txtPatientID.Name = "txtPatientID";
this.txtPatientID.Size = new System.Drawing.Size(148, 26); this.txtPatientID.Size = new System.Drawing.Size(148, 26);
this.txtPatientID.TabIndex = 8; this.txtPatientID.TabIndex = 3;
// //
// lblPatientID // lblPatientID
// //
@ -250,7 +250,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.txtPatientLast.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtPatientLast.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPatientLast.Name = "txtPatientLast"; this.txtPatientLast.Name = "txtPatientLast";
this.txtPatientLast.Size = new System.Drawing.Size(148, 26); this.txtPatientLast.Size = new System.Drawing.Size(148, 26);
this.txtPatientLast.TabIndex = 6; this.txtPatientLast.TabIndex = 2;
// //
// txtPatientFirst // txtPatientFirst
// //
@ -258,7 +258,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.txtPatientFirst.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtPatientFirst.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPatientFirst.Name = "txtPatientFirst"; this.txtPatientFirst.Name = "txtPatientFirst";
this.txtPatientFirst.Size = new System.Drawing.Size(148, 26); this.txtPatientFirst.Size = new System.Drawing.Size(148, 26);
this.txtPatientFirst.TabIndex = 5; this.txtPatientFirst.TabIndex = 1;
// //
// btnPatientSearch // btnPatientSearch
// //
@ -287,7 +287,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.dgvPatient.ReadOnly = true; this.dgvPatient.ReadOnly = true;
this.dgvPatient.RowHeadersWidth = 51; this.dgvPatient.RowHeadersWidth = 51;
this.dgvPatient.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvPatient.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvPatient.Size = new System.Drawing.Size(992, 354); this.dgvPatient.Size = new System.Drawing.Size(1099, 411);
this.dgvPatient.TabIndex = 0; this.dgvPatient.TabIndex = 0;
this.dgvPatient.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPatient_CellContentClick); this.dgvPatient.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPatient_CellContentClick);
// //
@ -680,7 +680,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.txtPhysicianID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtPhysicianID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPhysicianID.Name = "txtPhysicianID"; this.txtPhysicianID.Name = "txtPhysicianID";
this.txtPhysicianID.Size = new System.Drawing.Size(148, 26); this.txtPhysicianID.Size = new System.Drawing.Size(148, 26);
this.txtPhysicianID.TabIndex = 8; this.txtPhysicianID.TabIndex = 3;
// //
// lblPhysicianID // lblPhysicianID
// //
@ -698,7 +698,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.txtPhysicianLast.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtPhysicianLast.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPhysicianLast.Name = "txtPhysicianLast"; this.txtPhysicianLast.Name = "txtPhysicianLast";
this.txtPhysicianLast.Size = new System.Drawing.Size(148, 26); this.txtPhysicianLast.Size = new System.Drawing.Size(148, 26);
this.txtPhysicianLast.TabIndex = 6; this.txtPhysicianLast.TabIndex = 2;
// //
// txtPhysicianFirst // txtPhysicianFirst
// //
@ -706,7 +706,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.txtPhysicianFirst.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txtPhysicianFirst.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPhysicianFirst.Name = "txtPhysicianFirst"; this.txtPhysicianFirst.Name = "txtPhysicianFirst";
this.txtPhysicianFirst.Size = new System.Drawing.Size(148, 26); this.txtPhysicianFirst.Size = new System.Drawing.Size(148, 26);
this.txtPhysicianFirst.TabIndex = 5; this.txtPhysicianFirst.TabIndex = 1;
// //
// btnPhysicianSearch // btnPhysicianSearch
// //
@ -731,7 +731,6 @@ namespace Louis__Pharmacy_CNSA212_FP
this.dgvPhysician.Name = "dgvPhysician"; this.dgvPhysician.Name = "dgvPhysician";
this.dgvPhysician.ReadOnly = true; this.dgvPhysician.ReadOnly = true;
this.dgvPhysician.RowHeadersWidth = 51; this.dgvPhysician.RowHeadersWidth = 51;
this.dgvPhysician.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.dgvPhysician.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvPhysician.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvPhysician.Size = new System.Drawing.Size(1091, 404); this.dgvPhysician.Size = new System.Drawing.Size(1091, 404);
this.dgvPhysician.TabIndex = 0; this.dgvPhysician.TabIndex = 0;
@ -871,7 +870,7 @@ namespace Louis__Pharmacy_CNSA212_FP
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1142, 817); this.ClientSize = new System.Drawing.Size(1166, 885);
this.Controls.Add(this.tbcInfo); this.Controls.Add(this.tbcInfo);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frmInfo"; this.Name = "frmInfo";

View File

@ -25,6 +25,8 @@ namespace Louis__Pharmacy_CNSA212_FP
dgvPatient.DoubleClick += cmuPatientEdit_Click; dgvPatient.DoubleClick += cmuPatientEdit_Click;
dgvPhysician.DoubleClick += cmuPhysicianEdit_Click; dgvPhysician.DoubleClick += cmuPhysicianEdit_Click;
tbcInfo.SelectedIndexChanged += frmInfoTabChange;
} }
private void frmInfo_Load(object sender, EventArgs e) private void frmInfo_Load(object sender, EventArgs e)
@ -39,19 +41,58 @@ namespace Louis__Pharmacy_CNSA212_FP
txtPatientFirst.Focus(); txtPatientFirst.Focus();
patientIsActive = true;
}
private bool physicianIsActive = false;
private bool patientIsActive = false;
private void frmInfoTabChange(object sender, EventArgs e)
{
Console.WriteLine(tbcInfo.SelectedIndex);
patientIsActive = false;
physicianIsActive = false;
if (tbcInfo.SelectedIndex == 0)
{
patientIsActive = true;
}else if (tbcInfo.SelectedIndex == 2)
{
physicianIsActive = true;
}
} }
private void frmInfo_KeyDown(object sender, KeyEventArgs e) private void frmInfo_KeyDown(object sender, KeyEventArgs e)
{ {
// esc not funtional // if data grid view is not focused, run the search function
if (e.KeyCode == Keys.Escape) // Check if the pressed key is Escape if (e.KeyCode == Keys.Escape)
{this.Close(); // Close the form {this.Close();
} }
if (e.KeyCode == Keys.Enter){ if (e.KeyCode == Keys.Enter && physicianIsActive && !dgvPhysician.Focused){
btnPatientSearch_Click(sender, e);
btnPhysicianSearch_Click(sender, e); btnPhysicianSearch_Click(sender, e);
} }
// if data grid view is focused, run the edit function
else if (e.KeyCode == Keys.Enter && physicianIsActive && dgvPhysician.Focused)
{
cmuPhysicianEdit_Click(sender, e);
}
// if data grid view is not focused, run the search function
if (e.KeyCode == Keys.Enter && patientIsActive && !dgvPatient.Focused)
{
btnPatientSearch_Click(sender,e);
}
// if data grid view is focused, run the edit function
else if (e.KeyCode == Keys.Enter && patientIsActive && dgvPatient.Focused)
{
cmuPatientEdit_Click(sender,e);
}
} }
@ -153,6 +194,7 @@ namespace Louis__Pharmacy_CNSA212_FP
cmuPatientEdit.Enabled = dgvPatient.Rows.Count > 0; cmuPatientEdit.Enabled = dgvPatient.Rows.Count > 0;
cmuPatientDelete.Enabled = dgvPatient.Rows.Count > 0; cmuPatientDelete.Enabled = dgvPatient.Rows.Count > 0;
dgvPatient.Focus();
} }
@ -312,6 +354,7 @@ namespace Louis__Pharmacy_CNSA212_FP
} }
dgvPhysician.Focus();
} }

View File

@ -323,17 +323,17 @@ namespace Louis__Pharmacy_CNSA212_FP
this.btnClose.Location = new System.Drawing.Point(1011, 600); this.btnClose.Location = new System.Drawing.Point(1011, 600);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(112, 35); this.btnClose.Size = new System.Drawing.Size(112, 35);
this.btnClose.TabIndex = 27; this.btnClose.TabIndex = 15;
this.btnClose.Text = "Close"; this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
// //
// frmPatientAdd // frmPatient
// //
this.AcceptButton = this.btnGO; this.AcceptButton = this.btnGO;
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1212, 726); this.ClientSize = new System.Drawing.Size(1218, 743);
this.Controls.Add(this.btnClose); this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnGO); this.Controls.Add(this.btnGO);
this.Controls.Add(this.lblDisPurpose); this.Controls.Add(this.lblDisPurpose);

View File

@ -8,11 +8,10 @@ namespace Louis__Pharmacy_CNSA212_FP
{ {
private static bool isAdd; private static bool isAdd;
private frmInfo SourceForm; private readonly frmInfo SourceForm;
public frmPatient(frmInfo sourceForm, bool isNew) public frmPatient(frmInfo sourceForm, bool isNew)
{ {
SourceForm = sourceForm; SourceForm = sourceForm;
isAdd = isNew; isAdd = isNew;
@ -31,6 +30,17 @@ namespace Louis__Pharmacy_CNSA212_FP
btnGO.Text = "Update"; btnGO.Text = "Update";
} }
KeyPreview = true;
KeyDown += frmPatient_KeyDown;
}
private void frmPatient_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
Close();
if (e.KeyCode == Keys.Enter) btnGO_Click(sender, e);
} }
@ -93,7 +103,6 @@ namespace Louis__Pharmacy_CNSA212_FP
if (!isAdd) if (!isAdd)
{
try try
{ {
lbs = int.Parse(txtWeight.Text); lbs = int.Parse(txtWeight.Text);
@ -126,13 +135,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtPatientID, "Error"); epLocal.SetError(txtPatientID, "Error");
throw new Exception(); throw new Exception();
} }
else
{ while (Patient_id.Length < 8) Patient_id = "0" + Patient_id;
while (Patient_id.Length < 8)
{
Patient_id = "0" + Patient_id;
}
}
if (FirstName.Length > 30) if (FirstName.Length > 30)
{ {
@ -151,10 +155,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtMidInit, "Error"); epLocal.SetError(txtMidInit, "Error");
throw new Exception(); throw new Exception();
} }
else
{
MiddleIntials = MiddleIntials.ToUpper(); MiddleIntials = MiddleIntials.ToUpper();
}
if (Zip > 65535) if (Zip > 65535)
{ {
@ -173,10 +175,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtState, "Error"); epLocal.SetError(txtState, "Error");
throw new Exception(); throw new Exception();
} }
else
{
UsState = UsState.ToUpper(); UsState = UsState.ToUpper();
}
if (lbs > 2147483647) if (lbs > 2147483647)
{ {
@ -207,10 +207,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtGender, "Error"); epLocal.SetError(txtGender, "Error");
throw new Exception(); throw new Exception();
} }
else
{
Gender = Gender.ToUpper(); Gender = Gender.ToUpper();
}
PharmacyDataTier.UpdatePatient( PharmacyDataTier.UpdatePatient(
Patient_id, Patient_id,
@ -228,11 +226,10 @@ namespace Louis__Pharmacy_CNSA212_FP
PhoneNumber); PhoneNumber);
SourceForm.txtPatientID.Text = Patient_id.ToString(); SourceForm.txtPatientID.Text = Patient_id;
SourceForm.btnPatientSearch_Click(SourceForm, e); SourceForm.btnPatientSearch_Click(SourceForm, e);
Close(); Close();
} }
catch (Exception exception) catch (Exception exception)
{ {
@ -278,8 +275,7 @@ namespace Louis__Pharmacy_CNSA212_FP
{ {
epLocal.SetError(txtWeight, "Invalid Value"); epLocal.SetError(txtWeight, "Invalid Value");
} }
}else if (isAdd) else if (isAdd)
{
try try
{ {
lbs = int.Parse(txtWeight.Text); lbs = int.Parse(txtWeight.Text);
@ -312,13 +308,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtPatientID, "Error"); epLocal.SetError(txtPatientID, "Error");
throw new Exception(); throw new Exception();
} }
else
{ while (Patient_id.Length < 8) Patient_id = "0" + Patient_id;
while (Patient_id.Length < 8)
{
Patient_id = "0" + Patient_id;
}
}
if (FirstName.Length > 30) if (FirstName.Length > 30)
{ {
@ -337,10 +328,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtMidInit, "Error"); epLocal.SetError(txtMidInit, "Error");
throw new Exception(); throw new Exception();
} }
else
{
MiddleIntials = MiddleIntials.ToUpper(); MiddleIntials = MiddleIntials.ToUpper();
}
if (Zip > 65535) if (Zip > 65535)
{ {
@ -359,10 +348,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtState, "Error"); epLocal.SetError(txtState, "Error");
throw new Exception(); throw new Exception();
} }
else
{
UsState = UsState.ToUpper(); UsState = UsState.ToUpper();
}
if (lbs > 2147483647) if (lbs > 2147483647)
{ {
@ -393,10 +380,8 @@ namespace Louis__Pharmacy_CNSA212_FP
epLocal.SetError(txtGender, "Error"); epLocal.SetError(txtGender, "Error");
throw new Exception(); throw new Exception();
} }
else
{
Gender = Gender.ToUpper(); Gender = Gender.ToUpper();
}
PharmacyDataTier.CreatePatient( PharmacyDataTier.CreatePatient(
Patient_id, Patient_id,
@ -414,11 +399,10 @@ namespace Louis__Pharmacy_CNSA212_FP
PhoneNumber); PhoneNumber);
SourceForm.txtPatientID.Text = Patient_id.ToString(); SourceForm.txtPatientID.Text = Patient_id;
SourceForm.btnPatientSearch_Click(SourceForm, e); SourceForm.btnPatientSearch_Click(SourceForm, e);
Close(); Close();
} }
catch (Exception exception) catch (Exception exception)
{ {
@ -466,8 +450,6 @@ namespace Louis__Pharmacy_CNSA212_FP
} }
} }
}
private void btnClose_Click(object sender, EventArgs e) private void btnClose_Click(object sender, EventArgs e)
{ {
Close(); Close();

View File

@ -61,212 +61,237 @@ namespace Louis__Pharmacy_CNSA212_FP
// lblDisPurpose // lblDisPurpose
// //
this.lblDisPurpose.Font = new System.Drawing.Font("Microsoft Sans Serif", 28.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblDisPurpose.Font = new System.Drawing.Font("Microsoft Sans Serif", 28.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblDisPurpose.Location = new System.Drawing.Point(218, 23); this.lblDisPurpose.Location = new System.Drawing.Point(327, 35);
this.lblDisPurpose.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblDisPurpose.Name = "lblDisPurpose"; this.lblDisPurpose.Name = "lblDisPurpose";
this.lblDisPurpose.Size = new System.Drawing.Size(360, 54); this.lblDisPurpose.Size = new System.Drawing.Size(540, 83);
this.lblDisPurpose.TabIndex = 0; this.lblDisPurpose.TabIndex = 0;
this.lblDisPurpose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblDisPurpose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// btnGO // btnGO
// //
this.btnGO.Location = new System.Drawing.Point(573, 401); this.btnGO.Location = new System.Drawing.Point(860, 617);
this.btnGO.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnGO.Name = "btnGO"; this.btnGO.Name = "btnGO";
this.btnGO.Size = new System.Drawing.Size(75, 23); this.btnGO.Size = new System.Drawing.Size(112, 35);
this.btnGO.TabIndex = 1; this.btnGO.TabIndex = 12;
this.btnGO.UseVisualStyleBackColor = true; this.btnGO.UseVisualStyleBackColor = true;
this.btnGO.Click += new System.EventHandler(this.btnGO_Click); this.btnGO.Click += new System.EventHandler(this.btnGO_Click);
// //
// btnClose // btnClose
// //
this.btnClose.Location = new System.Drawing.Point(680, 401); this.btnClose.Location = new System.Drawing.Point(1020, 617);
this.btnClose.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23); this.btnClose.Size = new System.Drawing.Size(112, 35);
this.btnClose.TabIndex = 2; this.btnClose.TabIndex = 13;
this.btnClose.Text = "Close"; this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
// //
// label1 // label1
// //
this.label1.Location = new System.Drawing.Point(116, 127); this.label1.Location = new System.Drawing.Point(174, 195);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(123, 30); this.label1.Size = new System.Drawing.Size(184, 46);
this.label1.TabIndex = 3; this.label1.TabIndex = 3;
this.label1.Text = "Physician ID:"; this.label1.Text = "Physician ID:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label2 // label2
// //
this.label2.Location = new System.Drawing.Point(116, 157); this.label2.Location = new System.Drawing.Point(174, 242);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(123, 30); this.label2.Size = new System.Drawing.Size(184, 46);
this.label2.TabIndex = 4; this.label2.TabIndex = 4;
this.label2.Text = "First Name:"; this.label2.Text = "First Name:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label3 // label3
// //
this.label3.Location = new System.Drawing.Point(116, 187); this.label3.Location = new System.Drawing.Point(174, 288);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(123, 30); this.label3.Size = new System.Drawing.Size(184, 46);
this.label3.TabIndex = 5; this.label3.TabIndex = 5;
this.label3.Text = "Last Name:"; this.label3.Text = "Last Name:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label4 // label4
// //
this.label4.Location = new System.Drawing.Point(116, 217); this.label4.Location = new System.Drawing.Point(174, 334);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(123, 30); this.label4.Size = new System.Drawing.Size(184, 46);
this.label4.TabIndex = 6; this.label4.TabIndex = 6;
this.label4.Text = "Middle Initial:"; this.label4.Text = "Middle Initial:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label5 // label5
// //
this.label5.Location = new System.Drawing.Point(116, 247); this.label5.Location = new System.Drawing.Point(174, 380);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(123, 30); this.label5.Size = new System.Drawing.Size(184, 46);
this.label5.TabIndex = 7; this.label5.TabIndex = 7;
this.label5.Text = "Date of Birth:"; this.label5.Text = "Date of Birth:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label6 // label6
// //
this.label6.Location = new System.Drawing.Point(404, 127); this.label6.Location = new System.Drawing.Point(606, 195);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(123, 30); this.label6.Size = new System.Drawing.Size(184, 46);
this.label6.TabIndex = 8; this.label6.TabIndex = 8;
this.label6.Text = "City:"; this.label6.Text = "City:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label7 // label7
// //
this.label7.Location = new System.Drawing.Point(404, 157); this.label7.Location = new System.Drawing.Point(606, 242);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(123, 30); this.label7.Size = new System.Drawing.Size(184, 46);
this.label7.TabIndex = 9; this.label7.TabIndex = 9;
this.label7.Text = "State:"; this.label7.Text = "State:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label8 // label8
// //
this.label8.Location = new System.Drawing.Point(404, 187); this.label8.Location = new System.Drawing.Point(606, 288);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(123, 30); this.label8.Size = new System.Drawing.Size(184, 46);
this.label8.TabIndex = 10; this.label8.TabIndex = 10;
this.label8.Text = "Zip Code:"; this.label8.Text = "Zip Code:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label9 // label9
// //
this.label9.Location = new System.Drawing.Point(116, 277); this.label9.Location = new System.Drawing.Point(174, 426);
this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(123, 30); this.label9.Size = new System.Drawing.Size(184, 46);
this.label9.TabIndex = 11; this.label9.TabIndex = 11;
this.label9.Text = "Gender (M/F):"; this.label9.Text = "Gender (M/F):";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label10 // label10
// //
this.label10.Location = new System.Drawing.Point(404, 217); this.label10.Location = new System.Drawing.Point(606, 334);
this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(123, 30); this.label10.Size = new System.Drawing.Size(184, 46);
this.label10.TabIndex = 12; this.label10.TabIndex = 12;
this.label10.Text = "Phone Number:"; this.label10.Text = "Phone Number:";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// label11 // label11
// //
this.label11.Location = new System.Drawing.Point(116, 307); this.label11.Location = new System.Drawing.Point(174, 472);
this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(123, 30); this.label11.Size = new System.Drawing.Size(184, 46);
this.label11.TabIndex = 13; this.label11.TabIndex = 13;
this.label11.Text = "Speciality"; this.label11.Text = "Speciality";
this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// txtPhyID // txtPhyID
// //
this.txtPhyID.Location = new System.Drawing.Point(245, 133); this.txtPhyID.Location = new System.Drawing.Point(368, 205);
this.txtPhyID.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPhyID.Name = "txtPhyID"; this.txtPhyID.Name = "txtPhyID";
this.txtPhyID.Size = new System.Drawing.Size(100, 20); this.txtPhyID.Size = new System.Drawing.Size(148, 26);
this.txtPhyID.TabIndex = 14; this.txtPhyID.TabIndex = 1;
// //
// txtFirstName // txtFirstName
// //
this.txtFirstName.Location = new System.Drawing.Point(245, 163); this.txtFirstName.Location = new System.Drawing.Point(368, 251);
this.txtFirstName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtFirstName.Name = "txtFirstName"; this.txtFirstName.Name = "txtFirstName";
this.txtFirstName.Size = new System.Drawing.Size(100, 20); this.txtFirstName.Size = new System.Drawing.Size(148, 26);
this.txtFirstName.TabIndex = 15; this.txtFirstName.TabIndex = 2;
// //
// txtLastName // txtLastName
// //
this.txtLastName.Location = new System.Drawing.Point(245, 193); this.txtLastName.Location = new System.Drawing.Point(368, 297);
this.txtLastName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtLastName.Name = "txtLastName"; this.txtLastName.Name = "txtLastName";
this.txtLastName.Size = new System.Drawing.Size(100, 20); this.txtLastName.Size = new System.Drawing.Size(148, 26);
this.txtLastName.TabIndex = 16; this.txtLastName.TabIndex = 3;
// //
// txtMiddleInit // txtMiddleInit
// //
this.txtMiddleInit.Location = new System.Drawing.Point(245, 223); this.txtMiddleInit.Location = new System.Drawing.Point(368, 343);
this.txtMiddleInit.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtMiddleInit.Name = "txtMiddleInit"; this.txtMiddleInit.Name = "txtMiddleInit";
this.txtMiddleInit.Size = new System.Drawing.Size(100, 20); this.txtMiddleInit.Size = new System.Drawing.Size(148, 26);
this.txtMiddleInit.TabIndex = 17; this.txtMiddleInit.TabIndex = 4;
// //
// txtDOB // txtDOB
// //
this.txtDOB.Location = new System.Drawing.Point(245, 253); this.txtDOB.Location = new System.Drawing.Point(368, 389);
this.txtDOB.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtDOB.Name = "txtDOB"; this.txtDOB.Name = "txtDOB";
this.txtDOB.Size = new System.Drawing.Size(100, 20); this.txtDOB.Size = new System.Drawing.Size(148, 26);
this.txtDOB.TabIndex = 18; this.txtDOB.TabIndex = 5;
// //
// txtGender // txtGender
// //
this.txtGender.Location = new System.Drawing.Point(245, 283); this.txtGender.Location = new System.Drawing.Point(368, 435);
this.txtGender.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtGender.Name = "txtGender"; this.txtGender.Name = "txtGender";
this.txtGender.Size = new System.Drawing.Size(100, 20); this.txtGender.Size = new System.Drawing.Size(148, 26);
this.txtGender.TabIndex = 19; this.txtGender.TabIndex = 6;
// //
// txtSpeciality // txtSpeciality
// //
this.txtSpeciality.Location = new System.Drawing.Point(245, 313); this.txtSpeciality.Location = new System.Drawing.Point(368, 482);
this.txtSpeciality.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtSpeciality.Name = "txtSpeciality"; this.txtSpeciality.Name = "txtSpeciality";
this.txtSpeciality.Size = new System.Drawing.Size(100, 20); this.txtSpeciality.Size = new System.Drawing.Size(148, 26);
this.txtSpeciality.TabIndex = 20; this.txtSpeciality.TabIndex = 7;
// //
// txtCity // txtCity
// //
this.txtCity.Location = new System.Drawing.Point(533, 133); this.txtCity.Location = new System.Drawing.Point(800, 205);
this.txtCity.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtCity.Name = "txtCity"; this.txtCity.Name = "txtCity";
this.txtCity.Size = new System.Drawing.Size(100, 20); this.txtCity.Size = new System.Drawing.Size(148, 26);
this.txtCity.TabIndex = 21; this.txtCity.TabIndex = 8;
// //
// txtState // txtState
// //
this.txtState.Location = new System.Drawing.Point(533, 163); this.txtState.Location = new System.Drawing.Point(800, 251);
this.txtState.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtState.Name = "txtState"; this.txtState.Name = "txtState";
this.txtState.Size = new System.Drawing.Size(100, 20); this.txtState.Size = new System.Drawing.Size(148, 26);
this.txtState.TabIndex = 22; this.txtState.TabIndex = 9;
// //
// txtZip // txtZip
// //
this.txtZip.Location = new System.Drawing.Point(533, 193); this.txtZip.Location = new System.Drawing.Point(800, 297);
this.txtZip.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtZip.Name = "txtZip"; this.txtZip.Name = "txtZip";
this.txtZip.Size = new System.Drawing.Size(100, 20); this.txtZip.Size = new System.Drawing.Size(148, 26);
this.txtZip.TabIndex = 23; this.txtZip.TabIndex = 10;
// //
// txtPhone // txtPhone
// //
this.txtPhone.Location = new System.Drawing.Point(533, 223); this.txtPhone.Location = new System.Drawing.Point(800, 343);
this.txtPhone.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txtPhone.Name = "txtPhone"; this.txtPhone.Name = "txtPhone";
this.txtPhone.Size = new System.Drawing.Size(100, 20); this.txtPhone.Size = new System.Drawing.Size(148, 26);
this.txtPhone.TabIndex = 24; this.txtPhone.TabIndex = 11;
// //
// frmPhysician // frmPhysician
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(1200, 692);
this.Controls.Add(this.txtPhone); this.Controls.Add(this.txtPhone);
this.Controls.Add(this.txtZip); this.Controls.Add(this.txtZip);
this.Controls.Add(this.txtState); this.Controls.Add(this.txtState);
@ -292,6 +317,7 @@ namespace Louis__Pharmacy_CNSA212_FP
this.Controls.Add(this.btnClose); this.Controls.Add(this.btnClose);
this.Controls.Add(this.btnGO); this.Controls.Add(this.btnGO);
this.Controls.Add(this.lblDisPurpose); this.Controls.Add(this.lblDisPurpose);
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "frmPhysician"; this.Name = "frmPhysician";
this.Text = "frmPhysician"; this.Text = "frmPhysician";
this.Load += new System.EventHandler(this.frmPhysician_Load); this.Load += new System.EventHandler(this.frmPhysician_Load);

View File

@ -28,6 +28,17 @@ namespace Louis__Pharmacy_CNSA212_FP
lblDisPurpose.Text = "Edit Physician"; lblDisPurpose.Text = "Edit Physician";
btnGO.Text = "Update"; btnGO.Text = "Update";
} }
KeyPreview = true;
KeyDown += frmPhysician_KeyDown;
}
private void frmPhysician_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
Close();
if (e.KeyCode == Keys.Enter) btnGO_Click(sender, e);
} }
private void btnClose_Click(object sender, EventArgs e) private void btnClose_Click(object sender, EventArgs e)