CNSA-216-FP/FWA_MAIN/patSearch.aspx

162 lines
6.2 KiB
Plaintext
Raw Permalink Normal View History

<%@ Page Title="Patients" EnableEventValidation="false" Language="C#" MasterPageFile="main.master" CodeBehind="~/patSearch.aspx.cs" Inherits="FWA_MAIN.patSearch" %>
2024-03-20 13:04:27 -04:00
<asp:Content runat="server" ContentPlaceHolderID="cph1">
2024-03-28 15:56:19 -04:00
<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>
2024-03-20 13:04:27 -04:00
<link type="text/css" href="main.css"/>
<h1 style="text-align: center; font-size: 44px">
Patients
</h1>
<div class="patDiv" style="padding-left: 400px">
<div class="patDiv" style="width: 100px; margin-right: 5px">
<div class="indivPatDiv" style="text-align: right;">
<label for="txtFNAME" class="buttonLabel">First Name: </label>
</div>
<br/>
<div class="indivPatDiv" style="text-align: right;">
<label for="txtLNAME" class="buttonLabel">Last Name: </label>
</div>
<br/>
<div class="indivPatDiv" style="text-align: right;">
<label for="txtPatID" class="buttonLabel">Patient ID: </label>
</div>
<br/>
</div>
<div class="patDiv" style="width: 400px">
<div class="indivPatDiv">
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtFNAME"></asp:TextBox>
</div>
<br/>
<div class="indivPatDiv">
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtLNAME"></asp:TextBox>
</div>
<br/>
<div class="indivPatDiv">
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtPatID"></asp:TextBox>
</div>
<br/>
</div>
<br/>
<asp:Button runat="server" ID="btnPatSearch" Text="Search" CssClass="btnPatSearch" OnClick="btnPatSearch_OnClick"/>
2024-03-20 13:04:27 -04:00
</div>
<br/>
<br/>
<br/>
<br/>
<div style="width: 75%; margin: 0 auto; align-content: center; horiz-align: center">
<asp:GridView runat="server" ID="gvPatient"
CssClass="gridview"
HeaderStyle-CssClass="headerstyle"
RowStyle-CssClass="rowstyle"
AlternatingRowStyle-CssClass="alternatingrowstyle"
SelectedRowStyle-CssClass="selectedrowstyle"
OnRowCommand="gvPatient_OnRowCommand"
AutoGenerateColumns="False"
OnRowDataBound="gvPatient_OnRowDataBound"
OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
<Columns>
2024-03-28 15:56:19 -04:00
<asp:BoundField DataField="Patient_id" HeaderText="Patient ID" SortExpression="Patient_id"/>
<asp:BoundField DataField="FirstName" HeaderText="First Name" SortExpression="FirstName"/>
<asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="LastName"/>
<asp:BoundField DataField="DOB" HeaderText="Date of Birth" SortExpression="DOB" DataFormatString="{0:d}" HtmlEncode="False"/>
<asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender"/>
<asp:BoundField DataField="PhoneNumber" HeaderText="Phone Number" SortExpression="PhoneNumber"/>
<asp:BoundField DataField="Zip" HeaderText="Zip Code" SortExpression="Zip"/>
</Columns>
</asp:GridView></div>
2024-03-20 13:04:27 -04:00
<script type="text/javascript">
document.oncontextmenu = rightClick;
function rightClick(clickEvent) {
clickEvent.preventDefault();
// return false;
}
</script>
<div id="contextMenu" class="context-menu"
style="display: none; width: auto">
2024-03-20 13:04:27 -04:00
<ul>
2024-03-28 15:04:52 -04:00
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="btnPatNew" Text="New" OnClick="btnPatNew_OnClick"/>
2024-03-20 13:04:27 -04:00
</li>
2024-03-28 15:04:52 -04:00
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="bntPatEdit" Text="Edit" OnClick="bntPatEdit_OnClick"/>
2024-03-20 13:04:27 -04:00
</li>
2024-03-28 15:04:52 -04:00
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="btnPatDelete" Text="Delete" OnClick="btnPatDelete_OnClick"/>
2024-03-20 13:04:27 -04:00
</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; */
2024-03-20 13:04:27 -04:00
list-style: none;
}
.context-menu ul li {
2024-03-28 15:04:52 -04:00
/*padding-bottom: 7px; */
/*padding-top: 7px; */
/*border: 1px solid black; */
2024-03-20 13:04:27 -04:00
}
.context-menu ul li a {
text-decoration: none;
color: black;
}
.context-menu ul li:hover {
background: darkgray;
}
</style>
</asp:Content>