diff --git a/.idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml b/.idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml deleted file mode 100644 index d6fa49f..0000000 --- a/.idea/.idea.Louis' Pharmacy/.idea/sqldialects.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs b/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs index 11a2d1a..5f38112 100644 --- a/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs +++ b/Louis'-Pharmacy_CNSA212-FP/PharmacyDataTier.cs @@ -434,7 +434,7 @@ namespace Louis__Pharmacy_CNSA212_FP } catch (Exception ex) { - MessageBox.Show(precID + " Has an Associated Prescriptions. Could Not Delete", "Error", MessageBoxButtons.OK); + MessageBox.Show(precID + " Has an Associated Refill. Could Not Delete", "Error", MessageBoxButtons.OK); } finally { diff --git a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs index 1b19174..93ce7b8 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmInfo.cs @@ -502,7 +502,7 @@ namespace Louis__Pharmacy_CNSA212_FP if (dgvPatient.Rows.Count > 0) { - dgvPatient.DataSource = ds.Tables[0]; + // dgvPatient.DataSource = ds.Tables[0]; DataGridViewRow row = new DataGridViewRow(); row = dgvPatient.SelectedRows[0]; string patid = ""; @@ -557,7 +557,7 @@ namespace Louis__Pharmacy_CNSA212_FP if (dgvPhysician.Rows.Count > 0) { - dgvPhysician.DataSource = ds.Tables[0]; + // dgvPhysician.DataSource = ds.Tables[0]; DataGridViewRow row = new DataGridViewRow(); row = dgvPhysician.SelectedRows[0]; string phyID = ""; @@ -626,7 +626,7 @@ namespace Louis__Pharmacy_CNSA212_FP if (dgvPrescription.Rows.Count > 0) { - dgvPrescription.DataSource = ds.Tables[0]; + // dgvPrescription.DataSource = ds.Tables[0]; DataGridViewRow row = new DataGridViewRow(); row = dgvMedication.SelectedRows[0]; string medID = ""; @@ -688,7 +688,7 @@ namespace Louis__Pharmacy_CNSA212_FP if (dgvPrescription.Rows.Count > 0) { - dgvPrescription.DataSource = ds.Tables[0]; + // dgvPrescription.DataSource = ds.Tables[0]; DataGridViewRow row = new DataGridViewRow(); row = dgvPrescription.SelectedRows[0]; string PresID = ""; diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs b/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs index 5008a09..157ec84 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPatient.cs @@ -76,7 +76,8 @@ namespace Louis__Pharmacy_CNSA212_FP 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(); - txtDOB.Text = ds.Tables[0].Rows[0]["DOB"].ToString(); + DateTime date = DateTime.Parse(ds.Tables[0].Rows[0]["DOB"].ToString()); + txtDOB.Text = date.ToString("d"); cboGender.Text = ds.Tables[0].Rows[0]["Gender"].ToString(); txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString(); txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString(); diff --git a/Louis'-Pharmacy_CNSA212-FP/frmPhysician.cs b/Louis'-Pharmacy_CNSA212-FP/frmPhysician.cs index 64c80fc..94e8805 100644 --- a/Louis'-Pharmacy_CNSA212-FP/frmPhysician.cs +++ b/Louis'-Pharmacy_CNSA212-FP/frmPhysician.cs @@ -1,7 +1,7 @@ using System; +using System.ComponentModel; using System.Data; using System.Windows.Forms; -using DateTime = System.DateTime; namespace Louis__Pharmacy_CNSA212_FP { @@ -119,8 +119,10 @@ namespace Louis__Pharmacy_CNSA212_FP { throw new Exception(); } - else - DOB = new DateTime(1753, 1, 1); + if (DOB > new DateTime(9999,1,1)) + { + throw new Exception(); + } } catch (Exception exception) { @@ -306,7 +308,8 @@ namespace Louis__Pharmacy_CNSA212_FP txtFirstName.Text = ds.Tables[0].Rows[0]["FirstName"].ToString(); txtLastName.Text = ds.Tables[0].Rows[0]["LastName"].ToString(); txtMiddleInit.Text = ds.Tables[0].Rows[0]["MiddleIntials"].ToString(); - txtDOB.Text = ds.Tables[0].Rows[0]["DOB"].ToString(); + DateTime date = DateTime.Parse(ds.Tables[0].Rows[0]["DOB"].ToString()); + txtDOB.Text = date.ToString("d"); txtGender.Text = ds.Tables[0].Rows[0]["Gender"].ToString(); txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString(); txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString();