Medi stuff

This commit is contained in:
cadenjmoore 2024-03-21 18:17:57 -04:00
parent 6d357f4100
commit 7e21ce0ac9
14 changed files with 510 additions and 6 deletions

View File

@ -133,6 +133,13 @@
<Compile Include="MediSearch.aspx.designer.cs">
<DependentUpon>MediSearch.aspx</DependentUpon>
</Compile>
<Compile Include="medNew.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>medNew.aspx</DependentUpon>
</Compile>
<Compile Include="medNew.aspx.designer.cs">
<DependentUpon>medNew.aspx</DependentUpon>
</Compile>
<Compile Include="patEdit.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>patEdit.aspx</DependentUpon>
@ -176,6 +183,7 @@
<Content Include="main.css" />
<Content Include="main.master" />
<Content Include="MediSearch.aspx" />
<Content Include="medNew.aspx" />
<Content Include="patEdit.aspx" />
<Content Include="patient.aspx" />
<Content Include="patNew.aspx" />

View File

@ -1,2 +1,169 @@
<%@ Page Title="Title" Language="C#" MasterPageFile="MasterPage" CodeBehind="MediSearch.aspx.cs" Inherits="FWA_MAIN.MediSearch" %>
<%@ Page Title="Medication" Language="C#" MasterPageFile="main.master" CodeBehind="MediSearch.aspx.cs" Inherits="FWA_MAIN.MediSearch" %>
<asp:Content runat="server" ContentPlaceHolderID="cph1">
<link type="text/css" href="main.css"/>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
var inputElements = document.getElementsByTagName('input');
for (var i = 0; i < inputElements.length; i++) {
var input = inputElements[i];
if (input.type === 'text') {
input.addEventListener('keydown', function (event) {
if (event.keyCode === 13) { // 13 is the Enter key
event.preventDefault(); // Prevent the default action
document.getElementById('<%= btnMediSearch.ClientID %>').click(); // Trigger button click
}
});
}
}
});
</script>
<h1 style="text-align: center; font-size: 44px">
Medications
</h1>
<div class="medDiv" style="padding-left: 400px">
<div class="medDiv" style="width: 100px; margin-right: 5px">
<div class="indivMedDiv" style="text-align: right;">
<label for="txtFNAME" class="buttonLabel">First Name: </label>
</div>
<br/>
<div class="indivMedDiv" style="text-align: right;">
<label for="txtLNAME" class="buttonLabel">Last Name: </label>
</div>
<br/>
<div class="indivMedDiv" style="text-align: right;">
<label for="txtMedID" class="buttonLabel">Medication ID: </label>
</div>
<br/>
</div>
<div class="medDiv" style="width: 400px">
<div class="indivMedDiv">
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtFNAME"></asp:TextBox>
</div>
<br/>
<div class="indivMedDiv">
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtLNAME"></asp:TextBox>
</div>
<br/>
<div class="indivMedDiv">
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtMedID"></asp:TextBox>
</div>
<br/>
</div>
<br/>
<asp:Button runat="server" ID="btnMediSearch" Text="Search" CssClass="btnMedSearch" OnClick="btnMediSearch_OnClick" />
</div>
<asp:GridView runat="server" ID="gvMedication" BorderColor="white" AutoGenerateColumns="False" OnSelectedIndexChanged="gvMedication_OnSelectedIndexChanged"
OnRowDataBound="gvMedication_OnRowDataBound">
<Columns>
<asp:BoundField DataField="Medication_id" HeaderText="Medication ID" ItemStyle-Width="100px"/>
<asp:BoundField DataField="FirstName" HeaderText="First Name" ItemStyle-Width="100px"/>
<asp:BoundField DataField="LastName" HeaderText="Last Name" ItemStyle-Width="100px"/>
<asp:BoundField DataField="DOB" HeaderText="Date of Birth" ItemStyle-Width="100px"/>
<asp:BoundField DataField="PhoneNumber" HeaderText="Phone Number" ItemStyle-Width="100px"/>
<asp:BoundField DataField="Gender" HeaderText="Gender" ItemStyle-Width="100px"/>
</Columns>
</asp:GridView>
<script type="text/javascript">
document.oncontextmenu = rightClick;
function rightClick(clickEvent) {
clickEvent.preventDefault();
// return false;
}
</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="#">Delete</a>
</li>
<%-- <asp:Button runat="server" Text="New" OnClick="btnNew_OnClick" /> --%>
</ul>
</div>
<script>
document.onclick = hideMenu;
document.oncontextmenu = rightClick;
function hideMenu() {
document.getElementById("contextMenu")
.style.display = "none"
}
function rightClick(e) {
e.preventDefault();
if (document.getElementById("contextMenu").style.display == "block")
hideMenu();
else{
var menu = document.getElementById("contextMenu")
menu.style.display = 'block';
menu.style.left = e.pageX + "px";
menu.style.top = e.pageY + "px";
}
}
</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>
</asp:Content>

View File

@ -1,5 +1,6 @@
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FWA_MAIN
{
@ -9,5 +10,20 @@ namespace FWA_MAIN
{
}
protected void btnMediSearch_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
}
protected void gvMedication_OnSelectedIndexChanged(object sender, EventArgs e)
{
throw new NotImplementedException();
}
protected void gvMedication_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
throw new NotImplementedException();
}
}
}

76
FWA_MAIN/MediSearch.aspx.designer.cs generated Normal file
View File

@ -0,0 +1,76 @@
//------------------------------------------------------------------------------
// <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 MediSearch
{
/// <summary>
/// txtFNAME 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 txtFNAME;
/// <summary>
/// txtLNAME 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 txtLNAME;
/// <summary>
/// txtMedID 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 txtMedID;
/// <summary>
/// btnMediSearch 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 btnMediSearch;
/// <summary>
/// gvMedication 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.GridView gvMedication;
/// <summary>
/// Master property.
/// </summary>
/// <remarks>
/// Auto-generated property.
/// </remarks>
public new FWA_MAIN.main Master
{
get
{
return ((FWA_MAIN.main)(base.Master));
}
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -51,7 +51,7 @@ namespace FWA_MAIN
protected void btnMedication_OnClick(object sender, EventArgs e)
{
Response.Redirect("MediSearch.aspx");
}
protected void btnPrescription_OnClick(object sender, EventArgs e)

View File

@ -20,7 +20,7 @@
}
.btnPatSearch{
.btnPatSearch, .btnMediSearch{
margin-left: 177px;
@ -31,7 +31,7 @@
}
.indivPatDiv{
.indivPatDiv, .indivMedDiv{
height: 35px;
/*outline: solid 1px red;*/
@ -48,7 +48,7 @@
}
.patDiv{
.patDiv, .medDiv{
vertical-align: top;
/*outline: solid 1px red;*/
display: inline-block;

53
FWA_MAIN/medNew.aspx Normal file
View File

@ -0,0 +1,53 @@
<%@ Page Title="New Medication" Language="C#" MasterPageFile="main.master" CodeBehind="medNew.aspx.cs" Inherits="FWA_MAIN.medNew" %>
<asp:Content runat="server" ContentPlaceHolderID="cph1">
<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="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">Date Prescribed: </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">First Name: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Last Name: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Height (In): </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Date of Birth: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Gender (M/F): </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="txtDatePre"></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="txtFNAME"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtLNAME"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txt"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtDOB"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtGender"></asp:TextBox></div>
</div>
</div>
<div class="patDiv">
<div class="patDiv" style="padding-left: 150px; padding-right: 5px;width: 120px">
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">City: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Zip Code: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">State: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Phone Number: </label></div>
</div>
<div class="patDiv">
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtCity"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtZip"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtState"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPhoneNum"></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="Create"/></div>
<div style="display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelPat" Text="Cancel" OnClick="btnCancelPat_OnClick"/></div>
</div>
</asp:Content>

18
FWA_MAIN/medNew.aspx.cs Normal file
View File

@ -0,0 +1,18 @@
using System;
using System.Web.UI;
namespace FWA_MAIN
{
public partial class medNew : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnCancelPat_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
}
}
}

166
FWA_MAIN/medNew.aspx.designer.cs generated Normal file
View File

@ -0,0 +1,166 @@
//------------------------------------------------------------------------------
// <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 medNew
{
/// <summary>
/// txtMedID 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 txtMedID;
/// <summary>
/// txtMedName 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 txtMedName;
/// <summary>
/// txtDatePre 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 txtDatePre;
/// <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>
/// txtFNAME 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 txtFNAME;
/// <summary>
/// txtLNAME 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 txtLNAME;
/// <summary>
/// txt 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 txt;
/// <summary>
/// txtDOB 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 txtDOB;
/// <summary>
/// txtGender 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 txtGender;
/// <summary>
/// txtCity 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 txtCity;
/// <summary>
/// txtZip 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 txtZip;
/// <summary>
/// txtState 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 txtState;
/// <summary>
/// txtPhoneNum 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 txtPhoneNum;
/// <summary>
/// btnSavePat 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;
/// <summary>
/// btnCancelPat 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;
/// <summary>
/// Master property.
/// </summary>
/// <remarks>
/// Auto-generated property.
/// </remarks>
public new FWA_MAIN.main Master
{
get
{
return ((FWA_MAIN.main)(base.Master));
}
}
}
}

View File

@ -1 +1 @@
31d7b4cf616a35b757ec4946f8a0cfa2417cf6e07179831f891af4bde67c4075
113c6d70ea1dab72686a10d8d6ab21e247c5896d11512e37740ed2a257fac19b

Binary file not shown.

Binary file not shown.