-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
\ 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);