diff --git a/FWA_MAIN/Default.aspx b/FWA_MAIN/Default.aspx index 5f277a1..40e2822 100644 --- a/FWA_MAIN/Default.aspx +++ b/FWA_MAIN/Default.aspx @@ -4,12 +4,41 @@ - + -
+
-

Hello

+
+ +

Welcome to Louis' Pharmacy!

+

+

Use the pane on the left to navigate

+

Make a selection and right click for more options

+ +
diff --git a/FWA_MAIN/MediSearch.aspx b/FWA_MAIN/MediSearch.aspx index 74afe15..38fa394 100644 --- a/FWA_MAIN/MediSearch.aspx +++ b/FWA_MAIN/MediSearch.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="Medication" Language="C#" MasterPageFile="main.master" CodeBehind="MediSearch.aspx.cs" Inherits="FWA_MAIN.MediSearch" %> +<%@ Page Title="Medication" Language="C#" EnableEventValidation="false" MasterPageFile="main.master" CodeBehind="MediSearch.aspx.cs" Inherits="FWA_MAIN.MediSearch" %> @@ -52,10 +52,10 @@

- + - +
- +
+ style="display: none; width: auto"> + + - + .context-menu { + position: absolute; + text-align: center; + background: lightgray; + border: 1px solid black; + } + + .context-menu ul { + padding: 0px; + margin: 0px; + /*min-width: 150px; */ + + list-style: none; + } + + .context-menu ul li { + /*padding-bottom: 7px; */ + /*padding-top: 7px; */ + /*border: 1px solid black; */ + } + + .context-menu ul li a { + text-decoration: none; + color: black; + } + + .context-menu ul li:hover { + background: darkgray; + } + +<%-- --%> diff --git a/FWA_MAIN/MediSearch.aspx.cs b/FWA_MAIN/MediSearch.aspx.cs index 674758d..3ce6c20 100644 --- a/FWA_MAIN/MediSearch.aspx.cs +++ b/FWA_MAIN/MediSearch.aspx.cs @@ -12,9 +12,9 @@ namespace FWA_MAIN if (!IsPostBack) { - txtMedID.Text = Convert.ToString(Session["vMedID"]); + txtMedID.Text = Convert.ToString(Session["vMediID"]); txtMedName.Text = Convert.ToString(Session["vMedName"]); - txtRxNum.Text = Convert.ToString(Session["vRxNum"]); + txtRxNum.Text = Convert.ToString(Session["vRxNumber"]); btnMediSearch_OnClick(sender,e); @@ -27,7 +27,7 @@ namespace FWA_MAIN DataSet ds = new DataSet(); - string medID = Convert.ToString(Session["vMedID"]); + string medID = Convert.ToString(Session["vMediID"]); string medicationname = Convert.ToString(Session["vMedName"]); //string RxNum = Convert.ToString(Session["vRxNum"]); @@ -65,9 +65,9 @@ namespace FWA_MAIN try { - Session["vMedID"] = txtMedID.Text.Trim(); + Session["vMediID"] = txtMedID.Text.Trim(); Session["vMedName"] = txtMedName.Text.Trim(); - Session["vRxNum"] = txtRxNum.Text.Trim(); + Session["vRxNumber"] = txtRxNum.Text.Trim(); Cache.Remove("StudentData"); BindData(); @@ -124,7 +124,85 @@ namespace FWA_MAIN protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { - throw new NotImplementedException(); + BindData(); + } + + protected void btnMedNew_OnClick(object sender, EventArgs e) + { + string medicationID; + + try + { + Session["vMediID"] = txtMedID.Text.Trim(); + Session["vMedName"] = txtMedName.Text.Trim(); + Session["vRxNumber"] = txtRxNum.Text.Trim(); + + // Use the patientID value as needed + try + { + + medicationID = PharmacyDataTier.GetNextMedicationID(); + medicationID = Crypt.Encrypt(medicationID); + Response.Redirect("medNew.aspx" + "?" + "ID=" + medicationID, false); + } + catch (Exception exception) + { + } + + + } + catch (Exception ex) + { + throw new Exception(ex.Message, ex.InnerException); + } + } + + protected void bntMedEdit_OnClick(object sender, EventArgs e) + { + string medicationID = "0"; + //Int64 mEditedRecord = 0; + //System.Text.StringBuilder sb = new System.Text.StringBuilder(); + + try + { + Session["vMediID"] = txtMedID.Text.Trim(); + Session["vMedName"] = txtMedName.Text.Trim(); + Session["vRxNumber"] = txtRxNum.Text.Trim(); + + + try + { + + medicationID = Crypt.Encrypt(gvMedication.SelectedRow.Cells[0].Text); + Response.Redirect("medEdit.aspx" + "?" + "ID=" + medicationID, false); + } + catch (Exception exception) + { + } + + // Use the patientID value as needed + + + + } + catch (Exception ex) + { + throw new Exception(ex.Message, ex.InnerException); + } + } + + protected void btnMedDelete_OnClick(object sender, EventArgs e) + { + try + { + + PharmacyDataTier.DeleteMedication(gvMedication.SelectedRow.Cells[0].Text); + BindData(); + } + catch (Exception exception) + { + + } } } } \ No newline at end of file diff --git a/FWA_MAIN/MediSearch.aspx.designer.cs b/FWA_MAIN/MediSearch.aspx.designer.cs index 5088cfe..09af69f 100644 --- a/FWA_MAIN/MediSearch.aspx.designer.cs +++ b/FWA_MAIN/MediSearch.aspx.designer.cs @@ -59,6 +59,33 @@ namespace FWA_MAIN /// protected global::System.Web.UI.WebControls.GridView gvMedication; + /// + /// btnMedNew control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnMedNew; + + /// + /// bntMedEdit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button bntMedEdit; + + /// + /// btnMedDelete control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnMedDelete; + /// /// Master property. /// diff --git a/FWA_MAIN/PharmactDataTier.cs b/FWA_MAIN/PharmactDataTier.cs index bf89c0c..02d6aa3 100644 --- a/FWA_MAIN/PharmactDataTier.cs +++ b/FWA_MAIN/PharmactDataTier.cs @@ -236,6 +236,7 @@ namespace FWA_MAIN string Medication_id, string MedicationName, string IntakeMethod, + string Frequency, string Dosage, string Purpose, @@ -938,7 +939,7 @@ namespace FWA_MAIN } } - public static double GetNextMedicationID() + public static string GetNextMedicationID() { try { @@ -953,7 +954,7 @@ namespace FWA_MAIN cmdString.CommandText = "GetNextMedicationID"; object result = cmdString.ExecuteScalar(); - double value = 0; + double value= 0; try { value = Convert.ToDouble(result); @@ -964,9 +965,15 @@ namespace FWA_MAIN // MessageBox.Show("Error Getting next Patient ID","ERROR",MessageBoxButtons.OK); } - + string stringval = value.ToString(); + + while (stringval.Length < 7) + { + stringval = "0" + stringval; + } + // return dataSet - return value; + return stringval; } catch (Exception ex) { diff --git a/FWA_MAIN/Prescription.aspx b/FWA_MAIN/Prescription.aspx index 0bd46af..f14f4aa 100644 --- a/FWA_MAIN/Prescription.aspx +++ b/FWA_MAIN/Prescription.aspx @@ -10,7 +10,7 @@ $(document).keypress(function(e) { if (e.which === 13) { // Enter key = keycode 13 e.preventDefault(); // Prevent the default Enter action - $("#<%= btnPatSearch.ClientID %>").click(); // Trigger the search button click + $("#<%= btnPreSearch.ClientID %>").click(); // Trigger the search button click } }); }); @@ -62,7 +62,7 @@
- +
diff --git a/FWA_MAIN/Prescription.aspx.cs b/FWA_MAIN/Prescription.aspx.cs index 5e29dd7..f5edb6c 100644 --- a/FWA_MAIN/Prescription.aspx.cs +++ b/FWA_MAIN/Prescription.aspx.cs @@ -84,6 +84,7 @@ namespace FWA_MAIN } catch (Exception exception) { + } } @@ -226,18 +227,20 @@ namespace FWA_MAIN if (gvPrescription.SelectedRow != null) { - if (int.Parse(gvPrescription.SelectedRow.Cells[2].Text) < int.Parse(gvPrescription.SelectedRow.Cells[1].Text)) - { - PharmacyDataTier.AddRefill(PharmacyDataTier.GetNextRefillID().ToString(), DateTime.Now, gvPrescription.SelectedRow.Cells[5].Text,gvPrescription.SelectedRow.Cells[4].Text,gvPrescription.SelectedRow.Cells[0].Text); - } - else - { - string script = "window.open('MaxRefillNotif.aspx', 'PopupWindow', 'width=600,height=400,left=100,top=100');"; - ScriptManager.RegisterStartupScript(this, GetType(), "popup", script, true); - } - PharmacyDataTier.RefreshRefill(gvPrescription.SelectedRow.Cells[0].Text); - BindData(); + if (int.Parse(gvPrescription.SelectedRow.Cells[2].Text) < int.Parse(gvPrescription.SelectedRow.Cells[1].Text)) + { + PharmacyDataTier.AddRefill(PharmacyDataTier.GetNextRefillID().ToString(), DateTime.Now, gvPrescription.SelectedRow.Cells[5].Text,gvPrescription.SelectedRow.Cells[4].Text,gvPrescription.SelectedRow.Cells[0].Text); + } + else + { + string script = "window.open('MaxRefillNotif.aspx', 'PopupWindow', 'width=600,height=400,left=100,top=100');"; + ScriptManager.RegisterStartupScript(this, GetType(), "popup", script, true); + } + PharmacyDataTier.RefreshRefill(gvPrescription.SelectedRow.Cells[0].Text); + BindData(); } } + + } } \ No newline at end of file diff --git a/FWA_MAIN/Prescription.aspx.designer.cs b/FWA_MAIN/Prescription.aspx.designer.cs index 539841a..f1afb84 100644 --- a/FWA_MAIN/Prescription.aspx.designer.cs +++ b/FWA_MAIN/Prescription.aspx.designer.cs @@ -51,13 +51,13 @@ namespace FWA_MAIN protected global::System.Web.UI.WebControls.TextBox txtMedID; /// - /// btnPatSearch control. + /// btnPreSearch control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnPatSearch; + protected global::System.Web.UI.WebControls.Button btnPreSearch; /// /// gvPrescription control. diff --git a/FWA_MAIN/Refills.aspx.cs b/FWA_MAIN/Refills.aspx.cs index 947dc30..6817e5a 100644 --- a/FWA_MAIN/Refills.aspx.cs +++ b/FWA_MAIN/Refills.aspx.cs @@ -47,9 +47,17 @@ namespace FWA_MAIN protected void btnRefDelete_OnClick(object sender, EventArgs e) { - PharmacyDataTier.DeleteRefill(gvRefills.SelectedRow.Cells[0].Text); - PharmacyDataTier.RefreshRefill(gvRefills.SelectedRow.Cells[4].Text); - Fill(); + + try + { + + PharmacyDataTier.DeleteRefill(gvRefills.SelectedRow.Cells[0].Text); + PharmacyDataTier.RefreshRefill(gvRefills.SelectedRow.Cells[4].Text); + Fill(); + } + catch (Exception exception) + { + } } protected void gvRefills_OnRowCommand(object sender, GridViewCommandEventArgs e) diff --git a/FWA_MAIN/bin/FWA_MAIN.dll.config b/FWA_MAIN/bin/FWA_MAIN.dll.config index b80eae9..72b2140 100644 --- a/FWA_MAIN/bin/FWA_MAIN.dll.config +++ b/FWA_MAIN/bin/FWA_MAIN.dll.config @@ -14,7 +14,7 @@ - + diff --git a/FWA_MAIN/medEdit.aspx b/FWA_MAIN/medEdit.aspx index a22fa17..07509ac 100644 --- a/FWA_MAIN/medEdit.aspx +++ b/FWA_MAIN/medEdit.aspx @@ -1,38 +1,48 @@ <%@ Page Title="Edit Medication" Language="C#" MasterPageFile="main.master" CodeBehind="medEdit.aspx.cs" Inherits="FWA_MAIN.medEdit" %> - + +

Edit Medication

-
-
-
-
-
-
-
-
-
+
+
+
+
+ +
+
+
+
-
-
-
-
-
-
-
+
+
+ +
+
+
+

-
-
+
+
\ No newline at end of file diff --git a/FWA_MAIN/medEdit.aspx.cs b/FWA_MAIN/medEdit.aspx.cs index bcab2df..09a6efd 100644 --- a/FWA_MAIN/medEdit.aspx.cs +++ b/FWA_MAIN/medEdit.aspx.cs @@ -1,18 +1,71 @@ using System; +using System.Data; using System.Web.UI; namespace FWA_MAIN { public partial class medEdit : Page { + + protected string medID; protected void Page_Load(object sender, EventArgs e) { + medID = Crypt.Decrypt(Request.QueryString["ID"]); + + + txtMedID.Enabled = false; + if (!IsPostBack) + { + + FillMedication(medID); + } } - protected void btnCancelPat_OnClick(object sender, EventArgs e) + + + protected void FillMedication(string id) { - throw new NotImplementedException(); + + var ds = new DataSet(); + ds = PharmacyDataTier.MedicationInfoSearch(medID); + + txtMedID.Text = ds.Tables[0].Rows[0]["Medication_id"].ToString(); + txtMedName.Text = ds.Tables[0].Rows[0]["MedicationName"].ToString(); + txtIntake.Text = ds.Tables[0].Rows[0]["IntakeMethod"].ToString(); + + txtFrequency.Text = ds.Tables[0].Rows[0]["Frequency"].ToString(); + txtDosage.Text = ds.Tables[0].Rows[0]["Dosage"].ToString(); + txtPurpose.Text = ds.Tables[0].Rows[0]["Purpose"].ToString(); + txtRxNum.Text = ds.Tables[0].Rows[0]["RxNum"].ToString(); + + + } + + + + + protected void btnCancelMed_OnClick(object sender, EventArgs e) + { + Response.Redirect("mediSearch.aspx"); + } + + + protected void btnSaveMed_OnClick(object sender, EventArgs e) + { + string id = Val.varchar(txtMedID, 7); + string medName = Val.varchar(txtMedName, 60); + string intake = Val.varchar(txtIntake, 30); + + string frequency = Val.varchar(txtFrequency, length:30); + string dosage = Val.varchar(txtDosage, length:30); + string purpose = Val.varchar(txtPurpose, length:100); + string rxNum = Val.varchar(txtRxNum, 30); + + + PharmacyDataTier.UpdateMedication(id, medName, intake,frequency, dosage, purpose, rxNum); + Response.Redirect("mediSearch.aspx"); + } } } \ No newline at end of file diff --git a/FWA_MAIN/medEdit.aspx.designer.cs b/FWA_MAIN/medEdit.aspx.designer.cs index 509e8ab..0bdf412 100644 --- a/FWA_MAIN/medEdit.aspx.designer.cs +++ b/FWA_MAIN/medEdit.aspx.designer.cs @@ -41,15 +41,6 @@ namespace FWA_MAIN /// protected global::System.Web.UI.WebControls.TextBox txtIntake; - /// - /// txtPatID control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtPatID; - /// /// txtFrequency control. /// @@ -87,22 +78,22 @@ namespace FWA_MAIN protected global::System.Web.UI.WebControls.TextBox txtRxNum; /// - /// btnSavePat control. + /// btnSaveMed control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSavePat; + protected global::System.Web.UI.WebControls.Button btnSaveMed; /// - /// btnCancelPat control. + /// btnCancelMed control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnCancelPat; + protected global::System.Web.UI.WebControls.Button btnCancelMed; /// /// Master property. diff --git a/FWA_MAIN/medNew.aspx b/FWA_MAIN/medNew.aspx index 371452c..3a2824f 100644 --- a/FWA_MAIN/medNew.aspx +++ b/FWA_MAIN/medNew.aspx @@ -1,17 +1,26 @@ <%@ Page Title="New Medication" Language="C#" MasterPageFile="main.master" CodeBehind="medNew.aspx.cs" Inherits="FWA_MAIN.medNew" %> - + +

New Medication

-
+
-
@@ -22,7 +31,7 @@
-
+
@@ -35,7 +44,7 @@


-
-
+
+
\ No newline at end of file diff --git a/FWA_MAIN/medNew.aspx.cs b/FWA_MAIN/medNew.aspx.cs index 7df47ba..6734f13 100644 --- a/FWA_MAIN/medNew.aspx.cs +++ b/FWA_MAIN/medNew.aspx.cs @@ -5,14 +5,34 @@ namespace FWA_MAIN { public partial class medNew : Page { + protected string medID; protected void Page_Load(object sender, EventArgs e) { + medID = Crypt.Decrypt(Request.QueryString["ID"]); + txtMedID.Enabled = false; + txtMedID.Text = medID; } - protected void btnCancelPat_OnClick(object sender, EventArgs e) + protected void btnCancelMed_OnClick(object sender, EventArgs e) { - throw new NotImplementedException(); + Response.Redirect("MediSearch.aspx"); + } + + protected void btnSaveMed_OnClick(object sender, EventArgs e) + { + string id = Val.varchar(txtMedID, 7); + string medName = Val.varchar(txtMedName, 60); + string intake = Val.varchar(txtIntake, 30); + + string frequency = Val.varchar(txtFrequency, length:30); + string dosage = Val.varchar(txtDosage, length:30); + string purpose = Val.varchar(txtPurpose, length:100); + string rxNum = Val.varchar(txtRxNum, 30); + + + PharmacyDataTier.CreateMedication(id, medName, intake,frequency, dosage, purpose, rxNum); + Response.Redirect("mediSearch.aspx"); } } } \ No newline at end of file diff --git a/FWA_MAIN/medNew.aspx.designer.cs b/FWA_MAIN/medNew.aspx.designer.cs index 0963c38..d862f8e 100644 --- a/FWA_MAIN/medNew.aspx.designer.cs +++ b/FWA_MAIN/medNew.aspx.designer.cs @@ -41,15 +41,6 @@ namespace FWA_MAIN /// protected global::System.Web.UI.WebControls.TextBox txtIntake; - /// - /// txtPatID control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtPatID; - /// /// txtFrequency control. /// @@ -87,22 +78,22 @@ namespace FWA_MAIN protected global::System.Web.UI.WebControls.TextBox txtRxNum; /// - /// btnSavePat control. + /// btnSaveMed control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnSavePat; + protected global::System.Web.UI.WebControls.Button btnSaveMed; /// - /// btnCancelPat control. + /// btnCancelMed control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btnCancelPat; + protected global::System.Web.UI.WebControls.Button btnCancelMed; /// /// Master property. diff --git a/FWA_MAIN/obj/Debug/Package/PackageTmp/Default.aspx b/FWA_MAIN/obj/Debug/Package/PackageTmp/Default.aspx index 5f277a1..40e2822 100644 --- a/FWA_MAIN/obj/Debug/Package/PackageTmp/Default.aspx +++ b/FWA_MAIN/obj/Debug/Package/PackageTmp/Default.aspx @@ -4,12 +4,41 @@ - + -
+
-

Hello

+
+ +

Welcome to Louis' Pharmacy!

+

+

Use the pane on the left to navigate

+

Make a selection and right click for more options

+ +
diff --git a/FWA_MAIN/obj/Debug/Package/PackageTmp/Web.config b/FWA_MAIN/obj/Debug/Package/PackageTmp/Web.config index 938a42f..7f7b89f 100644 --- a/FWA_MAIN/obj/Debug/Package/PackageTmp/Web.config +++ b/FWA_MAIN/obj/Debug/Package/PackageTmp/Web.config @@ -14,7 +14,7 @@ - + diff --git a/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.dll b/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.dll index b7ddfb4..8049917 100644 Binary files a/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.dll and b/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.dll differ diff --git a/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.pdb b/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.pdb index ff34a1d..435b83b 100644 Binary files a/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.pdb and b/FWA_MAIN/obj/Debug/Package/PackageTmp/bin/FWA_MAIN.pdb differ diff --git a/FWA_MAIN/obj/Debug/TransformWebConfig/original/Web.config b/FWA_MAIN/obj/Debug/TransformWebConfig/original/Web.config index b80eae9..72b2140 100644 --- a/FWA_MAIN/obj/Debug/TransformWebConfig/original/Web.config +++ b/FWA_MAIN/obj/Debug/TransformWebConfig/original/Web.config @@ -14,7 +14,7 @@ - + diff --git a/FWA_MAIN/obj/Debug/TransformWebConfig/transformed/Web.config b/FWA_MAIN/obj/Debug/TransformWebConfig/transformed/Web.config index 938a42f..7f7b89f 100644 --- a/FWA_MAIN/obj/Debug/TransformWebConfig/transformed/Web.config +++ b/FWA_MAIN/obj/Debug/TransformWebConfig/transformed/Web.config @@ -14,7 +14,7 @@ - + diff --git a/FWA_MAIN/patEdit.aspx.cs b/FWA_MAIN/patEdit.aspx.cs index 93a4b9b..9a6c397 100644 --- a/FWA_MAIN/patEdit.aspx.cs +++ b/FWA_MAIN/patEdit.aspx.cs @@ -30,20 +30,20 @@ namespace FWA_MAIN var ds = new DataSet(); ds = PharmacyDataTier.PatientInfoSearch(patID); - txtPatID.Text = ds.Tables[0].Rows[0]["Patient_id"].ToString(); - txtFNAME.Text = ds.Tables[0].Rows[0]["FirstName"].ToString(); - txtLNAME.Text = ds.Tables[0].Rows[0]["LastName"].ToString(); - txtMidInit.Text = ds.Tables[0].Rows[0]["MiddleIntials"].ToString(); - 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(); - DateTime date = DateTime.Parse(ds.Tables[0].Rows[0]["DOB"].ToString()); + txtPatID.Text = ds.Tables[0].Rows[0]["Patient_id"].ToString().Trim(); + txtFNAME.Text = ds.Tables[0].Rows[0]["FirstName"].ToString().Trim(); + txtLNAME.Text = ds.Tables[0].Rows[0]["LastName"].ToString().Trim(); + txtMidInit.Text = ds.Tables[0].Rows[0]["MiddleIntials"].ToString().Trim(); + txtWeight.Text = ds.Tables[0].Rows[0]["lbs"].ToString().Trim(); + txtHeightFt.Text = ds.Tables[0].Rows[0]["Height_feet"].ToString().Trim(); + txtHeightIn.Text = ds.Tables[0].Rows[0]["Height_inches"].ToString().Trim(); + DateTime date = DateTime.Parse(ds.Tables[0].Rows[0]["DOB"].ToString().Trim()); 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(); - txtState.Text = ds.Tables[0].Rows[0]["UsState"].ToString(); - txtPhoneNum.Text = ds.Tables[0].Rows[0]["PhoneNumber"].ToString(); + txtGender.Text = ds.Tables[0].Rows[0]["Gender"].ToString().Trim(); + txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString().Trim(); + txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString().Trim(); + txtState.Text = ds.Tables[0].Rows[0]["UsState"].ToString().Trim(); + txtPhoneNum.Text = ds.Tables[0].Rows[0]["PhoneNumber"].ToString().Trim(); } diff --git a/FWA_MAIN/patSearch.aspx.cs b/FWA_MAIN/patSearch.aspx.cs index 165732e..4e06636 100644 --- a/FWA_MAIN/patSearch.aspx.cs +++ b/FWA_MAIN/patSearch.aspx.cs @@ -14,7 +14,7 @@ namespace FWA_MAIN if (!IsPostBack) { - txtPatID.Text = Convert.ToString(Session["vPatID"]); + txtPatID.Text = Convert.ToString(Session["vPatientID"]); txtFNAME.Text = Convert.ToString(Session["vFNAME"]); txtLNAME.Text = Convert.ToString(Session["vLNAME"]); @@ -35,7 +35,7 @@ namespace FWA_MAIN DataSet ds = new DataSet(); - string patID = Convert.ToString(Session["vPatID"]); + string patID = Convert.ToString(Session["vPatientID"]); string LNAME = Convert.ToString(Session["vLNAME"]); string FNAME = Convert.ToString(Session["vFNAME"]); @@ -71,7 +71,7 @@ namespace FWA_MAIN try { - Session["vPatID"] = txtPatID.Text.Trim(); + Session["vPatientID"] = txtPatID.Text.Trim(); Session["vFNAME"] = txtFNAME.Text.Trim(); Session["vLNAME"] = txtLNAME.Text.Trim(); @@ -136,7 +136,7 @@ namespace FWA_MAIN try { - Session["vPatID"] = txtPatID.Text.Trim(); + Session["vPatientID"] = txtPatID.Text.Trim(); Session["vFNAME"] = txtFNAME.Text.Trim(); Session["vLNAME"] = txtLNAME.Text.Trim(); @@ -169,7 +169,7 @@ namespace FWA_MAIN try { - Session["vPatID"] = txtPatID.Text.Trim(); + Session["vPatientID"] = txtPatID.Text.Trim(); Session["vFNAME"] = txtFNAME.Text.Trim(); Session["vLNAME"] = txtLNAME.Text.Trim(); diff --git a/FWA_MAIN/preEdit.aspx.cs b/FWA_MAIN/preEdit.aspx.cs index 227f7f2..60ffddf 100644 --- a/FWA_MAIN/preEdit.aspx.cs +++ b/FWA_MAIN/preEdit.aspx.cs @@ -43,9 +43,9 @@ namespace FWA_MAIN string rxnum = Val.varchar(txtRxNum, 11); int allow = Val.IntType(txtAllowed); int used = Val.IntType(txtUsed); - string medid = Val.varchar(txtMedID, 7); - string phyid = Val.varchar(txtPhysID, 8); - string patid = Val.varchar(txtPatID, 8); + string medid = Val.MedID(txtMedID); + string phyid = Val.PhyID(txtPhysID); + string patid = Val.PatID(txtPatID); DateTime start = Val.Date(txtStart); DateTime end = Val.Date(txtEnd);