diff --git a/FWA_MAIN/bin/FWA_MAIN.dll b/FWA_MAIN/bin/FWA_MAIN.dll index 9ce8db4..d634662 100644 Binary files a/FWA_MAIN/bin/FWA_MAIN.dll and b/FWA_MAIN/bin/FWA_MAIN.dll differ diff --git a/FWA_MAIN/bin/FWA_MAIN.pdb b/FWA_MAIN/bin/FWA_MAIN.pdb index 4017860..16534e7 100644 Binary files a/FWA_MAIN/bin/FWA_MAIN.pdb and b/FWA_MAIN/bin/FWA_MAIN.pdb differ diff --git a/FWA_MAIN/main.css b/FWA_MAIN/main.css index 4a4e123..d54d7f2 100644 --- a/FWA_MAIN/main.css +++ b/FWA_MAIN/main.css @@ -25,6 +25,7 @@ background-color: #101214; color: #fff; padding: 5px; + text-align: center; } .gridview td { diff --git a/FWA_MAIN/obj/Debug/FWA_MAIN.dll b/FWA_MAIN/obj/Debug/FWA_MAIN.dll index 9ce8db4..d634662 100644 Binary files a/FWA_MAIN/obj/Debug/FWA_MAIN.dll and b/FWA_MAIN/obj/Debug/FWA_MAIN.dll differ diff --git a/FWA_MAIN/obj/Debug/FWA_MAIN.pdb b/FWA_MAIN/obj/Debug/FWA_MAIN.pdb index 4017860..16534e7 100644 Binary files a/FWA_MAIN/obj/Debug/FWA_MAIN.pdb and b/FWA_MAIN/obj/Debug/FWA_MAIN.pdb differ diff --git a/FWA_MAIN/patEdit.aspx b/FWA_MAIN/patEdit.aspx index 9e8766b..bafd888 100644 --- a/FWA_MAIN/patEdit.aspx +++ b/FWA_MAIN/patEdit.aspx @@ -1,7 +1,17 @@ <%@ Page Title="Edit Patient" Language="C#" MasterPageFile="main.master" CodeBehind="patEdit.aspx.cs" Inherits="FWA_MAIN.patEdit" %> - + +

Edit Patient

diff --git a/FWA_MAIN/patNew.aspx b/FWA_MAIN/patNew.aspx index ed2f629..bc5a852 100644 --- a/FWA_MAIN/patNew.aspx +++ b/FWA_MAIN/patNew.aspx @@ -1,7 +1,17 @@ <%@ Page Title="New Patient" Language="C#" MasterPageFile="main.master" CodeBehind="patNew.aspx.cs" Inherits="FWA_MAIN.patNew" %> - + +

New Patient

diff --git a/FWA_MAIN/patSearch.aspx b/FWA_MAIN/patSearch.aspx index bd6f00f..dde386a 100644 --- a/FWA_MAIN/patSearch.aspx +++ b/FWA_MAIN/patSearch.aspx @@ -1,7 +1,18 @@ <%@ Page Title="Patients" EnableEventValidation="false" Language="C#" MasterPageFile="main.master" CodeBehind="~/patSearch.aspx.cs" Inherits="FWA_MAIN.patSearch" %> - + + +

Patients @@ -57,7 +68,7 @@ OnRowDataBound="gvPatient_OnRowDataBound" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"> - + diff --git a/FWA_MAIN/patSearch.aspx.cs b/FWA_MAIN/patSearch.aspx.cs index 04c5e4f..165732e 100644 --- a/FWA_MAIN/patSearch.aspx.cs +++ b/FWA_MAIN/patSearch.aspx.cs @@ -140,13 +140,19 @@ namespace FWA_MAIN Session["vFNAME"] = txtFNAME.Text.Trim(); Session["vLNAME"] = txtLNAME.Text.Trim(); - patientID = PharmacyDataTier.GetNextPatientID(); - patientID = Crypt.Encrypt(patientID); // Use the patientID value as needed + try + { + + patientID = PharmacyDataTier.GetNextPatientID(); + patientID = Crypt.Encrypt(patientID); + Response.Redirect("patNew.aspx" + "?" + "ID=" + patientID, false); + } + catch (Exception exception) + { + } - Response.Redirect("patNew.aspx" + "?" + "ID=" + patientID, false); - } catch (Exception ex) { @@ -167,17 +173,20 @@ namespace FWA_MAIN Session["vFNAME"] = txtFNAME.Text.Trim(); Session["vLNAME"] = txtLNAME.Text.Trim(); - if (gvPatient.SelectedIndex >= 0) // Check if a row is selected - { - patientID = Crypt.Encrypt(gvPatient.SelectedRow.Cells[0].Text); + + try + { + + patientID = Crypt.Encrypt(gvPatient.SelectedRow.Cells[0].Text); + Response.Redirect("patEdit.aspx" + "?" + "ID=" + patientID, false); + } + catch (Exception exception) + { + } + // Use the patientID value as needed - } - else - { - throw new Exception(); - } + - Response.Redirect("patEdit.aspx" + "?" + "ID=" + patientID, false); } catch (Exception ex) @@ -188,6 +197,16 @@ namespace FWA_MAIN protected void btnPatDelete_OnClick(object sender, EventArgs e) { + try + { + + PharmacyDataTier.DeletePatient(gvPatient.SelectedRow.Cells[0].Text); + BindData(); + } + catch (Exception exception) + { + + } } }