made it so that you cant refill past the allowed refill number
This commit is contained in:
parent
39023fcdf8
commit
209a07a411
@ -155,7 +155,7 @@
|
||||
<virtualDirectoryDefaults allowSubDirConfig="true" />
|
||||
<site name="FWA_MAIN" id="1">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\cmoore\RiderProjects\FWA_MAIN\FWA_MAIN" />
|
||||
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\FWA_MAIN\FWA_MAIN" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:5000:localhost" />
|
||||
|
@ -128,6 +128,13 @@
|
||||
<Compile Include="main.master.designer.cs">
|
||||
<DependentUpon>main.master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MaxRefillNotif.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>MaxRefillNotif.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MaxRefillNotif.aspx.designer.cs">
|
||||
<DependentUpon>MaxRefillNotif.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="medDelete.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
<DependentUpon>medDelete.aspx</DependentUpon>
|
||||
@ -242,6 +249,7 @@
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="main.css" />
|
||||
<Content Include="main.master" />
|
||||
<Content Include="MaxRefillNotif.aspx" />
|
||||
<Content Include="medDelete.aspx" />
|
||||
<Content Include="medEdit.aspx" />
|
||||
<Content Include="MediSearch.aspx" />
|
||||
|
29
FWA_MAIN/MaxRefillNotif.aspx
Normal file
29
FWA_MAIN/MaxRefillNotif.aspx
Normal file
@ -0,0 +1,29 @@
|
||||
<%@ Page Language="C#" CodeBehind="MaxRefillNotif.aspx.cs" Inherits="FWA_MAIN.MaxRefillNotif" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<script runat="server">
|
||||
|
||||
</script>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<link type="text/css" href="main.css"/>
|
||||
|
||||
<head runat="server">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body style="background-color: #0f0f0f">
|
||||
<form id="HtmlForm" runat="server" style="background-color: #0f0f0f">
|
||||
<div style="horiz-align: center; width: 100%">
|
||||
<h1 style="color: red; horiz-align: center">MAX REFILLS REACHED</h1>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<asp:Button runat="server" ID="btnClose" CssClass="btnPatSearch" Text="Close" OnClick="btnClose_OnClick"/>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
20
FWA_MAIN/MaxRefillNotif.aspx.cs
Normal file
20
FWA_MAIN/MaxRefillNotif.aspx.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Security.Principal;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace FWA_MAIN
|
||||
{
|
||||
public partial class MaxRefillNotif : Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void btnClose_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
string script = "window.close();";
|
||||
ClientScript.RegisterStartupScript(this.GetType(), "closeWindow", script, true);
|
||||
}
|
||||
}
|
||||
}
|
35
FWA_MAIN/MaxRefillNotif.aspx.designer.cs
generated
Normal file
35
FWA_MAIN/MaxRefillNotif.aspx.designer.cs
generated
Normal file
@ -0,0 +1,35 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FWA_MAIN
|
||||
{
|
||||
|
||||
|
||||
public partial class MaxRefillNotif
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// HtmlForm control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm HtmlForm;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 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 btnClose;
|
||||
}
|
||||
}
|
@ -3,6 +3,19 @@
|
||||
<asp:Content runat="server" ContentPlaceHolderID="cph1">
|
||||
|
||||
<link type="text/css" href="main.css"/>
|
||||
|
||||
<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
|
||||
$("#<%= btnPatSearch.ClientID %>").click(); // Trigger the search button click
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<h1 style="text-align: center; font-size: 44px">
|
||||
Prescriptions
|
||||
</h1>
|
||||
|
@ -22,6 +22,7 @@ namespace FWA_MAIN
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void BindData()
|
||||
@ -222,15 +223,21 @@ namespace FWA_MAIN
|
||||
|
||||
protected void btnPreRefill_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
var ds = new DataSet();
|
||||
ds = PharmacyDataTier.PrescriptionInfoSearch(gvPrescription.SelectedRow.Cells[0].Text);
|
||||
if (gvPrescription.SelectedRow != null)
|
||||
{
|
||||
|
||||
if (int.Parse(ds.Tables[0].Rows[0]["test2"].ToString()) < int.Parse(ds.Tables[0].Rows[0]["test"].ToString()))
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
5c5d3543aa3df97a4bf6915d78123652c5cfa939186f89192a82bb6d5f3ed9b9
|
||||
70b4448723339e99ed60f3c81dc6a5d1da61b1ddf61a97f8541739006170aed6
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user