This commit is contained in:
Adam McCane 2024-02-21 16:56:23 -05:00
commit 9f8d567b3d
5 changed files with 14 additions and 16 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="dbSrc:///505d1dbd/8ad1107e-d5b4-4250-a780-1ee9739c8bad/database/FinalProjectOfficialPharmacy/schema/dbo/routine/PastRefills.sql" dialect="GenericSQL" />
</component>
</project>

View File

@ -434,7 +434,7 @@ namespace Louis__Pharmacy_CNSA212_FP
} }
catch (Exception ex) 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 finally
{ {

View File

@ -502,7 +502,7 @@ namespace Louis__Pharmacy_CNSA212_FP
if (dgvPatient.Rows.Count > 0) if (dgvPatient.Rows.Count > 0)
{ {
dgvPatient.DataSource = ds.Tables[0]; // dgvPatient.DataSource = ds.Tables[0];
DataGridViewRow row = new DataGridViewRow(); DataGridViewRow row = new DataGridViewRow();
row = dgvPatient.SelectedRows[0]; row = dgvPatient.SelectedRows[0];
string patid = ""; string patid = "";
@ -557,7 +557,7 @@ namespace Louis__Pharmacy_CNSA212_FP
if (dgvPhysician.Rows.Count > 0) if (dgvPhysician.Rows.Count > 0)
{ {
dgvPhysician.DataSource = ds.Tables[0]; // dgvPhysician.DataSource = ds.Tables[0];
DataGridViewRow row = new DataGridViewRow(); DataGridViewRow row = new DataGridViewRow();
row = dgvPhysician.SelectedRows[0]; row = dgvPhysician.SelectedRows[0];
string phyID = ""; string phyID = "";
@ -626,7 +626,7 @@ namespace Louis__Pharmacy_CNSA212_FP
if (dgvPrescription.Rows.Count > 0) if (dgvPrescription.Rows.Count > 0)
{ {
dgvPrescription.DataSource = ds.Tables[0]; // dgvPrescription.DataSource = ds.Tables[0];
DataGridViewRow row = new DataGridViewRow(); DataGridViewRow row = new DataGridViewRow();
row = dgvMedication.SelectedRows[0]; row = dgvMedication.SelectedRows[0];
string medID = ""; string medID = "";
@ -688,7 +688,7 @@ namespace Louis__Pharmacy_CNSA212_FP
if (dgvPrescription.Rows.Count > 0) if (dgvPrescription.Rows.Count > 0)
{ {
dgvPrescription.DataSource = ds.Tables[0]; // dgvPrescription.DataSource = ds.Tables[0];
DataGridViewRow row = new DataGridViewRow(); DataGridViewRow row = new DataGridViewRow();
row = dgvPrescription.SelectedRows[0]; row = dgvPrescription.SelectedRows[0];
string PresID = ""; string PresID = "";

View File

@ -76,7 +76,8 @@ namespace Louis__Pharmacy_CNSA212_FP
txtWeight.Text = ds.Tables[0].Rows[0]["lbs"].ToString(); txtWeight.Text = ds.Tables[0].Rows[0]["lbs"].ToString();
txtHeightFt.Text = ds.Tables[0].Rows[0]["Height_feet"].ToString(); txtHeightFt.Text = ds.Tables[0].Rows[0]["Height_feet"].ToString();
txtHeightIn.Text = ds.Tables[0].Rows[0]["Height_inches"].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(); cboGender.Text = ds.Tables[0].Rows[0]["Gender"].ToString();
txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString(); txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString();
txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString(); txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString();

View File

@ -1,7 +1,7 @@
using System; using System;
using System.ComponentModel;
using System.Data; using System.Data;
using System.Windows.Forms; using System.Windows.Forms;
using DateTime = System.DateTime;
namespace Louis__Pharmacy_CNSA212_FP namespace Louis__Pharmacy_CNSA212_FP
{ {
@ -119,8 +119,10 @@ namespace Louis__Pharmacy_CNSA212_FP
{ {
throw new Exception(); throw new Exception();
} }
else if (DOB > new DateTime(9999,1,1))
DOB = new DateTime(1753, 1, 1); {
throw new Exception();
}
} }
catch (Exception exception) catch (Exception exception)
{ {
@ -306,7 +308,8 @@ namespace Louis__Pharmacy_CNSA212_FP
txtFirstName.Text = ds.Tables[0].Rows[0]["FirstName"].ToString(); txtFirstName.Text = ds.Tables[0].Rows[0]["FirstName"].ToString();
txtLastName.Text = ds.Tables[0].Rows[0]["LastName"].ToString(); txtLastName.Text = ds.Tables[0].Rows[0]["LastName"].ToString();
txtMiddleInit.Text = ds.Tables[0].Rows[0]["MiddleIntials"].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(); txtGender.Text = ds.Tables[0].Rows[0]["Gender"].ToString();
txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString(); txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString();
txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString(); txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString();