Merge remote-tracking branch 'origin/master'

# Conflicts:
#	FWA_MAIN/bin/FWA_MAIN.dll
#	FWA_MAIN/bin/FWA_MAIN.pdb
#	FWA_MAIN/obj/Debug/FWA_MAIN.dll
#	FWA_MAIN/obj/Debug/FWA_MAIN.pdb
This commit is contained in:
netnobody19 2024-04-03 19:25:07 -04:00
commit 47d13f3841
25 changed files with 431 additions and 175 deletions

View File

@ -4,12 +4,41 @@
<head>
<link href="main.css" rel="stylesheet" type="text/css" />
<style>
.parent {
position: relative;
height: 100%;
}
.child {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
h1{
text-align: center;
}
</style>
</head>
<body runat="server">
<div class="standardcontentpage">
<div class="parent">
<h1>Hello</h1>
<div class="child">
<h1>Welcome to Louis' Pharmacy!</h1>
<br/><br/>
<h1>Use the pane on the left to navigate</h1>
<h1>Make a selection and right click for more options</h1>
</div>
</div></body>

View File

@ -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" %>
<asp:Content runat="server" ContentPlaceHolderID="cph1">
@ -52,10 +52,10 @@
<br/>
</div>
<br/>
<asp:Button runat="server" ID="btnMediSearch" Text="Search" CssClass="btnMedSearch" OnClick="btnMediSearch_OnClick" />
<asp:Button runat="server" ID="btnMediSearch" Text="Search" CssClass="btnPatSearch" OnClick="btnMediSearch_OnClick" />
</div>
<div style="width: 75%; margin: 0 auto; align-content: center; horiz-align: center">
<asp:GridView runat="server" ID="gvMedication" CssClass="gridview"
HeaderStyle-CssClass="headerstyle"
RowStyle-CssClass="rowstyle"
@ -74,7 +74,7 @@
<asp:BoundField DataField="Purpose" HeaderText="Purpose" ItemStyle-Width="100px"/>
<asp:BoundField DataField="RxNum" HeaderText="RxNum" ItemStyle-Width="100px"/>
</Columns>
</asp:GridView>
</asp:GridView></div>
<script type="text/javascript">
@ -87,21 +87,21 @@
</script>
<div id="contextMenu" class="context-menu"
style="display: none">
<ul>
<li>
<a href="medNew.aspx">New</a>
</li>
<li>
<a href="medEdit.aspx">Edit</a>
</li>
<li>
<a href="medDelete.aspx">Delete</a>
</li>
<%-- <asp:Button runat="server" Text="New" OnClick="btnNew_OnClick" /> --%>
</ul>
</div>
style="display: none; width: auto">
<ul>
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="btnMedNew" Text="New" OnClick="btnMedNew_OnClick"/>
</li>
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="bntMedEdit" Text="Edit" OnClick="bntMedEdit_OnClick"/>
</li>
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="btnMedDelete" Text="Delete" OnClick="btnMedDelete_OnClick"/>
</li>
<%-- <asp:Button runat="server" Text="New" OnClick="btnNew_OnClick" /> --%>
</ul>
</div>
<script>
document.onclick = hideMenu;
document.oncontextmenu = rightClick;
@ -127,46 +127,47 @@
}
</script>
<style type="text/css">
.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;
}
</style>
<script type="text/javascript">
window.onload = function() {
var grid = document.getElementById("<%= gvMedication.ClientID %>");
var rows = grid.getElementsByTagName("tr");
for (var i = 0; i < rows.length; i++) {
rows[i].onclick = function() {
// Assuming the first cell in every row contains the unique ID
var id = this.cells[0].innerText;
__doPostBack('Select$', id);
};
}
};
</script>
.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;
}
</style>
<%-- <script type="text/javascript"> --%>
<%-- window.onload = function() { --%>
<%-- var grid = document.getElementById("<%= gvMedication.ClientID %>"); --%>
<%-- var rows = grid.getElementsByTagName("tr"); --%>
<%-- for (var i = 0; i < rows.length; i++) { --%>
<%-- rows[i].onclick = function() { --%>
<%-- // Assuming the first cell in every row contains the unique ID --%>
<%-- var id = this.cells[0].innerText; --%>
<%-- __doPostBack('Select$', id); --%>
<%-- }; --%>
<%-- } --%>
<%-- }; --%>
<%-- </script> --%>
</asp:Content>

View File

@ -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)
{
}
}
}
}

View File

@ -59,6 +59,33 @@ namespace FWA_MAIN
/// </remarks>
protected global::System.Web.UI.WebControls.GridView gvMedication;
/// <summary>
/// btnMedNew control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnMedNew;
/// <summary>
/// bntMedEdit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button bntMedEdit;
/// <summary>
/// btnMedDelete control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnMedDelete;
/// <summary>
/// Master property.
/// </summary>

View File

@ -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)
{

View File

@ -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 @@
</div>
<br/>
<asp:Button runat="server" ID="btnPatSearch" Text="Search" CssClass="btnPatSearch" OnClick="btnPreSearch_OnClick"/>
<asp:Button runat="server" ID="btnPreSearch" Text="Search" CssClass="btnPatSearch" OnClick="btnPreSearch_OnClick"/>
<br/>
</div>

View File

@ -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();
}
}
}
}

View File

@ -51,13 +51,13 @@ namespace FWA_MAIN
protected global::System.Web.UI.WebControls.TextBox txtMedID;
/// <summary>
/// btnPatSearch control.
/// btnPreSearch control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnPatSearch;
protected global::System.Web.UI.WebControls.Button btnPreSearch;
/// <summary>
/// gvPrescription control.

View File

@ -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)

View File

@ -14,7 +14,7 @@
</defaultDocument>
</system.webServer>
<connectionStrings>
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0"/>

View File

@ -1,38 +1,48 @@
<%@ Page Title="Edit Medication" Language="C#" MasterPageFile="main.master" CodeBehind="medEdit.aspx.cs" Inherits="FWA_MAIN.medEdit" %>
<asp:Content runat="server" ContentPlaceHolderID="cph1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(document).keypress(function(e) {
if (e.which === 13) { // Enter key = keycode 13
e.preventDefault(); // Prevent the default Enter action
$("#<%= btnSaveMed.ClientID %>").click(); // Trigger the search button click
}
});
});
</script>
<link type="text/css" href="main.css"/>
<h1 style="text-align: center; font-size: 44px">Edit Medication</h1>
<div class="patDiv">
<div class="patDiv">
<div class="patDiv" style="padding-left: 150px; padding-right: 5px;width: 100px">
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Medication ID: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Medication Name: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Intake Method: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Patient ID: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Frequency: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Dosage: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Purpose: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">RX Number: </label></div>
<div class="patDiv" style="padding-left: 450px; padding-right: 30px;width: 100px">
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Medication ID: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Medication Name: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Intake Method: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Frequency: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Dosage: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Purpose: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">RX Number: </label></div>
</div>
<div class="patDiv">
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtMedID"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtMedName"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtIntake"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPatID"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtFrequency"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtDosage"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPurpose"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtRxNum"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtMedName"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtIntake"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtFrequency"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtDosage"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPurpose"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtRxNum"></asp:TextBox></div>
</div>
</div>
</div>
<br/>
<div class="patDiv" style="margin-left: 500px">
<div style="margin-right: 10px; display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnSavePat" Text="Save"/></div>
<div style="display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelPat" Text="Cancel" OnClick="btnCancelPat_OnClick"/></div>
<div style="margin-right: 10px; display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnSaveMed" Text="Save" OnClick="btnSaveMed_OnClick"/></div>
<div style="display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelMed" Text="Cancel" OnClick="btnCancelMed_OnClick"/></div>
</div>
</asp:Content>

View File

@ -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");
}
}
}

View File

@ -41,15 +41,6 @@ namespace FWA_MAIN
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtIntake;
/// <summary>
/// txtPatID control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPatID;
/// <summary>
/// txtFrequency control.
/// </summary>
@ -87,22 +78,22 @@ namespace FWA_MAIN
protected global::System.Web.UI.WebControls.TextBox txtRxNum;
/// <summary>
/// btnSavePat control.
/// btnSaveMed control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSavePat;
protected global::System.Web.UI.WebControls.Button btnSaveMed;
/// <summary>
/// btnCancelPat control.
/// btnCancelMed control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCancelPat;
protected global::System.Web.UI.WebControls.Button btnCancelMed;
/// <summary>
/// Master property.

View File

@ -1,17 +1,26 @@
<%@ Page Title="New Medication" Language="C#" MasterPageFile="main.master" CodeBehind="medNew.aspx.cs" Inherits="FWA_MAIN.medNew" %>
<asp:Content runat="server" ContentPlaceHolderID="cph1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(document).keypress(function(e) {
if (e.which === 13) { // Enter key = keycode 13
e.preventDefault(); // Prevent the default Enter action
$("#<%= btnSaveMed.ClientID %>").click(); // Trigger the search button click
}
});
});
</script>
<link type="text/css" href="main.css"/>
<h1 style="text-align: center; font-size: 44px">New Medication</h1>
<div class="patDiv">
<div class="patDiv">
<div class="patDiv" style="padding-left: 150px; padding-right: 5px;width: 100px">
<div class="patDiv" style="padding-left: 400px; padding-right: 5px;width: 100px">
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Medication ID: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Medication Name: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Intake Method: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Patient ID: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Frequency: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Dosage: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Purpose: </label></div>
@ -22,7 +31,7 @@
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtMedID"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtMedName"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtIntake"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPatID"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtFrequency"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtDosage"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPurpose"></asp:TextBox></div>
@ -35,7 +44,7 @@
</div>
<br/><br/>
<div class="patDiv" style="margin-left: 500px">
<div style="margin-right: 10px; display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnSavePat" Text="Create"/></div>
<div style="display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelPat" Text="Cancel" OnClick="btnCancelPat_OnClick"/></div>
<div style="margin-right: 10px; display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnSaveMed" Text="Create" OnClick="btnSaveMed_OnClick"/></div>
<div style="display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelMed" Text="Cancel" OnClick="btnCancelMed_OnClick"/></div>
</div>
</asp:Content>

View File

@ -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");
}
}
}

View File

@ -41,15 +41,6 @@ namespace FWA_MAIN
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtIntake;
/// <summary>
/// txtPatID control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPatID;
/// <summary>
/// txtFrequency control.
/// </summary>
@ -87,22 +78,22 @@ namespace FWA_MAIN
protected global::System.Web.UI.WebControls.TextBox txtRxNum;
/// <summary>
/// btnSavePat control.
/// btnSaveMed control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSavePat;
protected global::System.Web.UI.WebControls.Button btnSaveMed;
/// <summary>
/// btnCancelPat control.
/// btnCancelMed control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnCancelPat;
protected global::System.Web.UI.WebControls.Button btnCancelMed;
/// <summary>
/// Master property.

View File

@ -4,12 +4,41 @@
<head>
<link href="main.css" rel="stylesheet" type="text/css" />
<style>
.parent {
position: relative;
height: 100%;
}
.child {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
h1{
text-align: center;
}
</style>
</head>
<body runat="server">
<div class="standardcontentpage">
<div class="parent">
<h1>Hello</h1>
<div class="child">
<h1>Welcome to Louis' Pharmacy!</h1>
<br/><br/>
<h1>Use the pane on the left to navigate</h1>
<h1>Make a selection and right click for more options</h1>
</div>
</div></body>

View File

@ -14,7 +14,7 @@
</defaultDocument>
</system.webServer>
<connectionStrings>
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />

View File

@ -14,7 +14,7 @@
</defaultDocument>
</system.webServer>
<connectionStrings>
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0"/>

View File

@ -14,7 +14,7 @@
</defaultDocument>
</system.webServer>
<connectionStrings>
<add name="ConnString" connectionString="Server=sql.eggtech.net;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
<add name="ConnString" connectionString="Server=10.1.1.250;Database=FinalProjectOfficialPharmacy;User Id=admin;Password=delirium-purveyor-overall-backboned-approval-amino;" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />

View File

@ -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();
}

View File

@ -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();

View File

@ -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);