174 lines
6.8 KiB
Plaintext
174 lines
6.8 KiB
Plaintext
<%@ Page Title="Medication" Language="C#" EnableEventValidation="false" MasterPageFile="main.master" CodeBehind="MediSearch.aspx.cs" Inherits="FWA_MAIN.MediSearch" %>
|
|
|
|
<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
|
|
$("#<%= btnMediSearch.ClientID %>").click(); // Trigger the search button click
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<link type="text/css" href="main.css"/>
|
|
|
|
<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">Medication ID: </label>
|
|
</div>
|
|
<br/>
|
|
<div class="indivMedDiv" style="text-align: right;">
|
|
<label for="txtLNAME" class="buttonLabel">Medication Name: </label>
|
|
</div>
|
|
<br/>
|
|
<div class="indivMedDiv" style="text-align: right;">
|
|
<label for="txtMedID" class="buttonLabel">Rx Number: </label>
|
|
</div>
|
|
<br/>
|
|
</div>
|
|
|
|
<div class="medDiv" style="width: 400px">
|
|
<div class="indivMedDiv">
|
|
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtMedID"></asp:TextBox>
|
|
</div>
|
|
<br/>
|
|
<div class="indivMedDiv">
|
|
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtMedName"></asp:TextBox>
|
|
</div>
|
|
<br/>
|
|
<div class="indivMedDiv">
|
|
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtRxNum"></asp:TextBox>
|
|
</div>
|
|
<br/>
|
|
</div>
|
|
<br/>
|
|
<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"
|
|
AlternatingRowStyle-CssClass="alternatingrowstyle"
|
|
SelectedRowStyle-CssClass="selectedrowstyle"
|
|
OnRowCommand="gvMedication_OnRowCommand"
|
|
AutoGenerateColumns="False"
|
|
OnRowDataBound="gvMedication_OnRowDataBound"
|
|
OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
|
|
<Columns>
|
|
<asp:BoundField DataField="Medication_id" HeaderText="Medication ID" ItemStyle-Width="100px"/>
|
|
<asp:BoundField DataField="MedicationName" HeaderText="Medication Name" ItemStyle-Width="100px"/>
|
|
<asp:BoundField DataField="IntakeMethod" HeaderText="Intake Method" ItemStyle-Width="100px"/>
|
|
<asp:BoundField DataField="Frequency" HeaderText="Frequency" ItemStyle-Width="100px"/>
|
|
<asp:BoundField DataField="Dosage" HeaderText="Dosage" ItemStyle-Width="100px"/>
|
|
<asp:BoundField DataField="Purpose" HeaderText="Purpose" ItemStyle-Width="100px"/>
|
|
<asp:BoundField DataField="RxNum" HeaderText="RxNum" ItemStyle-Width="100px"/>
|
|
</Columns>
|
|
</asp:GridView></div>
|
|
|
|
|
|
<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">
|
|
<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;
|
|
|
|
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>
|