This commit is contained in:
netnobody19 2024-04-03 19:23:50 -04:00
parent 4a6f1b6d52
commit 0c31e87b73
18 changed files with 834 additions and 50 deletions

View File

@ -155,7 +155,7 @@
<virtualDirectoryDefaults allowSubDirConfig="true" /> <virtualDirectoryDefaults allowSubDirConfig="true" />
<site name="FWA_MAIN" id="1"> <site name="FWA_MAIN" id="1">
<application path="/" applicationPool="Clr4IntegratedAppPool"> <application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\eggman\Nextcloud\TSCT\2nd Year\SEM 4\RiderProjects\FWA_MAIN\FWA_MAIN" /> <virtualDirectory path="/" physicalPath="C:\Users\IVAN\RiderProjects\FWA_MAIN\FWA_MAIN" />
</application> </application>
<bindings> <bindings>
<binding protocol="http" bindingInformation="*:5000:localhost" /> <binding protocol="http" bindingInformation="*:5000:localhost" />

View File

@ -195,6 +195,13 @@
<Compile Include="physician.aspx.designer.cs"> <Compile Include="physician.aspx.designer.cs">
<DependentUpon>physician.aspx</DependentUpon> <DependentUpon>physician.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="physnew02.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
<DependentUpon>physnew02.aspx</DependentUpon>
</Compile>
<Compile Include="physnew02.aspx.designer.cs">
<DependentUpon>physnew02.aspx</DependentUpon>
</Compile>
<Compile Include="preEdit.aspx.cs"> <Compile Include="preEdit.aspx.cs">
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>
<DependentUpon>preEdit.aspx</DependentUpon> <DependentUpon>preEdit.aspx</DependentUpon>
@ -266,6 +273,7 @@
<Content Include="patNew.aspx" /> <Content Include="patNew.aspx" />
<Content Include="physEdit.aspx" /> <Content Include="physEdit.aspx" />
<Content Include="physician.aspx" /> <Content Include="physician.aspx" />
<Content Include="physnew02.aspx" />
<Content Include="preEdit.aspx" /> <Content Include="preEdit.aspx" />
<Content Include="preNew.aspx" /> <Content Include="preNew.aspx" />
<Content Include="Prescription.aspx" /> <Content Include="Prescription.aspx" />

View File

@ -879,7 +879,7 @@ namespace FWA_MAIN
} }
public static double GetNextPhysicianID() public static string GetNextPhysicianID()
{ {
try try
{ {
@ -907,7 +907,26 @@ namespace FWA_MAIN
// return dataSet // return dataSet
return value; value = 0;
try
{
value = Convert.ToDouble(result);
}
catch(Exception e)
{
// MessageBox.Show("Error Getting next Patient ID","ERROR",MessageBoxButtons.OK);
}
string stringval = value.ToString();
while (stringval.Length < 8)
{
stringval = "0" + stringval;
}
// return dataSet
return stringval;
} }
catch (Exception ex) catch (Exception ex)
{ {

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
70b4448723339e99ed60f3c81dc6a5d1da61b1ddf61a97f8541739006170aed6 5b828ddd595982ac7c99d94544530dbfda605a4e26706582ffd171296255f6b4

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,18 @@
<%@ Page Title="Title" Language="C#" MasterPageFile="main.master" CodeBehind="physEdit.aspx.cs" Inherits="FWA_MAIN.physEdit" %> <%@ Page Title="Title" Language="C#" MasterPageFile="main.master" CodeBehind="physEdit.aspx.cs" Inherits="FWA_MAIN.physEdit" %>
<asp:Content runat="server" ContentPlaceHolderID="cph1"> <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
$("#<%= btnSavePhys.ClientID %>").click(); // Trigger the search button click
}
});
});
</script>
<link type="text/css" href="main.css"/> <link type="text/css" href="main.css"/>
@ -51,7 +63,8 @@
</div> </div>
<br/> <br/>
<div class="patDiv buttonGroup" style="margin-left:500px"> <div class="patDiv buttonGroup" style="margin-left:500px">
<div class="buttonWrapper"><asp:Button runat="server" CssClass="standardbtn" ID="btnSavePat" Text="Save"/></div> <div class="buttonWrapper"><asp:Button runat="server" CssClass="standardbtn" ID="btnSavePhys" Text="Save" OnClick="btnSavePhys_OnClick"/></div>
<div class="buttonWrapper"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelPat" Text="Cancel" OnClick="btnCancelPat_OnClick"/></div> <div class="buttonWrapper"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelPhys" Text="Cancel" OnClick="btnCancelPhys_OnClick"/></div>
</div> </div>
</asp:Content> </asp:Content>

View File

@ -1,18 +1,74 @@
using System; using System;
using System.Web.UI; using System.Web.UI;
using System.Data;
namespace FWA_MAIN namespace FWA_MAIN
{ {
public partial class physEdit : Page public partial class physEdit : Page
{ {
protected string physID;
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
txtPhysID.Enabled = false; txtPhysID.Enabled = false;
physID = Crypt.Decrypt(Request.QueryString["ID"]);
if (!IsPostBack)
{
FillPhysician(physID);
}
} }
protected void btnCancelPat_OnClick(object sender, EventArgs e)
protected void FillPhysician(string id)
{ {
throw new NotImplementedException();
var ds = new DataSet();
ds = PharmacyDataTier.PhysicianInfoSearch(physID);
txtPhysID.Text = ds.Tables[0].Rows[0]["Physician_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();
txtZip.Text = ds.Tables[0].Rows[0]["Zip"].ToString();
txtCity.Text = ds.Tables[0].Rows[0]["City"].ToString();
txtState.Text = ds.Tables[0].Rows[0]["UsState"].ToString();
DateTime date = DateTime.Parse(ds.Tables[0].Rows[0]["DOB"].ToString());
txtDOB.Text = date.ToString("d");
txtPhone.Text = ds.Tables[0].Rows[0]["PhoneNumber"].ToString();
txtGender.Text = ds.Tables[0].Rows[0]["Gender"].ToString();
txtSpecialty.Text = ds.Tables[0].Rows[0]["Specialty"].ToString();
} }
protected void btnCancelPhys_OnClick(object sender, EventArgs e)
{
Response.Redirect("physician.aspx");
}
protected void btnSavePhys_OnClick(object sender, EventArgs e)
{
string id = Val.varchar(txtPhysID, 8);
string FNAME = Val.varchar(txtFNAME, 30);
string LNAME = Val.varchar(txtLNAME, 30);
string MidInit = Val.varchar(txtMidInit, 1);
short zip = Val.SmallIntType(txtZip);
string city = Val.varchar(txtCity, 30);
string state = Val.varchar(txtState, 2);
DateTime date = Val.Date(txtDOB);
string phone = Val.varchar(txtPhone, 14);
string gender = Val.varchar(txtGender, 1);
string specialty = Val.varchar(txtSpecialty, 100);
PharmacyDataTier.UpdatePhysician(id,FNAME,LNAME,MidInit,date,gender,city,zip,state,phone,specialty);
Response.Redirect("physician.aspx");
}
} }
} }

148
FWA_MAIN/physEdit.aspx.designer.cs generated Normal file
View File

@ -0,0 +1,148 @@
//------------------------------------------------------------------------------
// <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 physEdit
{
/// <summary>
/// txtPhysID 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 txtPhysID;
/// <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>
/// txtMidInit 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 txtMidInit;
/// <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>
/// 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>
/// 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>
/// 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>
/// txtPhone 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 txtPhone;
/// <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>
/// txtSpecialty 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 txtSpecialty;
/// <summary>
/// btnSavePhys 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 btnSavePhys;
/// <summary>
/// btnCancelPhys 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 btnCancelPhys;
/// <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,9 +1,8 @@
<%@ Page Title="Physicians" Language="C#" MasterPageFile="main.master" CodeBehind="physician.aspx.cs" Inherits="FWA_MAIN.physician" %> <%@ Page Title="Physicians" EnableEventValidation="false" Language="C#" MasterPageFile="main.master" CodeBehind="physician.aspx.cs" Inherits="FWA_MAIN.physician" %>
<asp:Content runat="server" ContentPlaceHolderID="cph1"> <asp:Content runat="server" ContentPlaceHolderID="cph1">
<link type="text/css" href="main.css"/> <link type="text/css" href="main.css"/>
<h1 style="text-align: center; font-size: 44px"> <h1 style="text-align: center; font-size: 44px">
Physicians Physicians
</h1> </h1>
@ -18,7 +17,7 @@
</div> </div>
<br/> <br/>
<div class="indivPatDiv" style="text-align: right;"> <div class="indivPatDiv" style="text-align: right;">
<label for="txtPhysID" class="buttonLabel">Patient ID: </label> <label for="txtPhysID" class="buttonLabel">Physician ID: </label>
</div> </div>
<br/> <br/>
</div> </div>
@ -33,16 +32,70 @@
</div> </div>
<br/> <br/>
<div class="indivPatDiv"> <div class="indivPatDiv">
<asp:TextBox runat="server" CssClass="defaultTXT" id="txtPatID"></asp:TextBox> <asp:TextBox runat="server" CssClass="defaultTXT" id="txtPhysID"></asp:TextBox>
</div> </div>
<br/> <br/>
</div> </div>
<br/> <br/>
<asp:Button runat="server" ID="btnPhySearch" Text="Search" CssClass="btnPhySearch"/> <asp:Button runat="server" ID="btnPhySearch" Text="Search" CssClass="btnPatSearch" OnClick="btnPhySearch_OnClick"/>
</div> </div>
<br/>
<br/>
<br/>
<br/>
<asp:GridView runat="server" ID="gvPhysician" BorderColor="red"></asp:GridView> <div style="width: 75%; margin: 0 auto; align-content: center; horiz-align: center">
<asp:GridView runat="server" ID="gvPhysician"
CssClass="gridview"
HeaderStyle-CssClass="headerstyle"
RowStyle-CssClass="rowstyle"
AlternatingRowStyle-CssClass="alternatingrowstyle"
SelectedRowStyle-CssClass="selectedrowstyle"
OnRowCommand="gvPhysician_OnRowCommand"
AutoGenerateColumns="False"
OnRowDataBound="gvPhysician_OnRowDataBound"
OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="Physician_id" HeaderText="Physician ID" SortExpression="Physician_id"/>
<asp:BoundField DataField="FirstName" HeaderText="First Name" SortExpression="FirstName"/>
<asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="LastName"/>
<asp:BoundField DataField="MiddleIntials" HeaderText="Middle Initial" SortExpression="MiddleIntials"/>
<asp:BoundField DataField="Zip" HeaderText="Zip Code" SortExpression="Zip"/>
<asp:BoundField DataField="City" HeaderText="City" SortExpression="City"/>
<asp:BoundField DataField="UsState" HeaderText="State" SortExpression="UsState"/>
<asp:BoundField DataField="DOB" HeaderText="Date of Birth" SortExpression="DOB" DataFormatString="{0:d}" HtmlEncode="False"/>
<asp:BoundField DataField="PhoneNumber" HeaderText="Phone Number" SortExpression="PhoneNumber"/>
<asp:BoundField DataField="Gender" HeaderText="Gender" SortExpression="Gender"/>
<asp:BoundField DataField="Specialty" HeaderText="Specialty" SortExpression="Specialty"/>
</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="btnPhysNew" Text="New" OnClick="btnPhysNew_OnClick"/>
</li>
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="bntPhysEdit" Text="Edit" OnClick="bntPhysEdit_OnClick"/>
</li>
<li style="height: 25px">
<asp:Button runat="server" CssClass="standardbtn" ID="btnPhysDelete" Text="Delete" OnClick="btnPhysDelete_OnClick"/>
</li>
<%-- <asp:Button runat="server" Text="New" OnClick="btnNew_OnClick" /> --%>
</ul>
</div>
<script type="text/javascript"> <script type="text/javascript">
document.oncontextmenu = rightClick; document.oncontextmenu = rightClick;
@ -57,10 +110,10 @@
style="display: none"> style="display: none">
<ul> <ul>
<li> <li>
<a href="patNew.aspx">New</a> <a href="physnew02.aspx">New</a>
</li> </li>
<li> <li>
<a href="patEdit.aspx">Edit</a> <a href="physEdit.aspx">Edit</a>
</li> </li>
<li> <li>
<a href="#">Delete</a> <a href="#">Delete</a>
@ -93,35 +146,36 @@
} }
} }
</script> </script>
<style type="text/css"> <style type="text/css">
.context-menu { .context-menu {
position: absolute; position: absolute;
text-align: center; text-align: center;
background: lightgray; background: lightgray;
border: 1px solid black; border: 1px solid black;
} }
.context-menu ul { .context-menu ul {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
min-width: 150px; /*min-width: 150px; */
list-style: none;
}
.context-menu ul li { list-style: none;
padding-bottom: 7px; }
padding-top: 7px;
border: 1px solid black;
}
.context-menu ul li a { .context-menu ul li {
text-decoration: none; /*padding-bottom: 7px; */
color: black; /*padding-top: 7px; */
} /*border: 1px solid black; */
}
.context-menu ul li:hover { .context-menu ul li a {
background: darkgray; text-decoration: none;
} color: black;
</style> }
.context-menu ul li:hover {
background: darkgray;
}
</style>
</asp:Content> </asp:Content>

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
using System.Web.UI; using System.Web.UI;
@ -11,7 +12,200 @@ namespace FWA_MAIN
{ {
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack)
{
txtPhysID.Text = Convert.ToString(Session["vPhysPhysID"]);
txtFNAME.Text = Convert.ToString(Session["vPhysFNAME"]);
txtLNAME.Text = Convert.ToString(Session["vPhysLNAME"]);
btnPhySearch_OnClick(sender,e);
}
}
private void BindData()
{
DataSet ds = new DataSet();
string physID = Convert.ToString(Session["vPhysPhysID"]);
string LNAME = Convert.ToString(Session["vPhysLNAME"]);
string FNAME = Convert.ToString(Session["vPhysFNAME"]);
txtPhysID.Text = physID;
txtFNAME.Text = FNAME;
txtLNAME.Text = LNAME;
// if (textHasValues)
// {
ds = PharmacyDataTier.PhysicianInfoSearch(FNAME, LNAME, physID);
// }
// ds = dt.GetStudents();
gvPhysician.DataSource = ds.Tables[0];
if (Cache["StudentData"] == null)
{
Cache.Add("StudentData", new DataView(ds.Tables[0]),
null,System.Web.Caching.Cache.NoAbsoluteExpiration,
System.TimeSpan.FromMinutes(10), System.Web.Caching.CacheItemPriority.Default,
null);
}
gvPhysician.DataBind();
}
protected void btnPhysDelete_OnClick(object sender, EventArgs e)
{
try
{
PharmacyDataTier.DeletePhysician(gvPhysician.SelectedRow.Cells[0].Text);
BindData();
}
catch (Exception exception)
{
}
}
protected void bntPhysEdit_OnClick(object sender, EventArgs e)
{
string physicianID = "0";
Int64 mEditedRecord = 0;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
try
{
Session["vPhysPhysID"] = txtPhysID.Text.Trim();
Session["vPhysFNAME"] = txtFNAME.Text.Trim();
Session["vPhysLNAME"] = txtLNAME.Text.Trim();
try
{
physicianID = Crypt.Encrypt(gvPhysician.SelectedRow.Cells[0].Text);
Response.Redirect("physedit.aspx" + "?" + "ID=" + physicianID, false);
}
catch (Exception exception)
{
}
// Use the patientID value as needed
}
catch (Exception ex)
{
throw new Exception(ex.Message, ex.InnerException);
}
}
protected void btnPhysNew_OnClick(object sender, EventArgs e)
{
string physicianID;
try
{
Session["vPhysPhysID"] = txtPhysID.Text.Trim();
Session["vPhysFNAME"] = txtFNAME.Text.Trim();
Session["vPhysLNAME"] = txtLNAME.Text.Trim();
// Use the patientID value as needed
try
{
physicianID = PharmacyDataTier.GetNextPhysicianID();
physicianID = Crypt.Encrypt(physicianID);
Response.Redirect("physnew02.aspx" + "?" + "ID=" + physicianID, false);
}
catch (Exception exception)
{
}
}
catch (Exception exception)
{
}
}
protected void btnPhySearch_OnClick(object sender, EventArgs e)
{
if (txtPhysID.Text.Trim().Length > 0 || txtFNAME.Text.Trim().Length > 0 || txtLNAME.Text.Trim().Length > 0)
{
try
{
Session["vPhysPhysID"] = txtPhysID.Text.Trim();
Session["vPhysFNAME"] = txtFNAME.Text.Trim();
Session["vPhysLNAME"] = txtLNAME.Text.Trim();
Cache.Remove("StudentData");
BindData();
}
catch (Exception exception)
{
}
}
}
protected void gvPhysician_OnRowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onclick"] = Page.ClientScript.GetPostBackClientHyperlink(gvPhysician, "Select$" + e.Row.RowIndex);
e.Row.ToolTip = "Click to select this row.";
}
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
BindData();
}
protected void gvPhysician_OnRowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Select")
{
// Determine the index of the selected row
int index = Convert.ToInt32(e.CommandArgument);
// Check if the selected row index is the same as the previous selected row index
if (gvPhysician.SelectedIndex == index)
{
// Deselect the row
gvPhysician.SelectedIndex = -1;
}
else
{
// Select the row
gvPhysician.SelectedIndex = index;
}
// Refresh the GridView to update the style
gvPhysician.DataBind();
}
} }
} }
} }

View File

@ -33,13 +33,13 @@ namespace FWA_MAIN
protected global::System.Web.UI.WebControls.TextBox txtLNAME; protected global::System.Web.UI.WebControls.TextBox txtLNAME;
/// <summary> /// <summary>
/// txtPatID control. /// txtPhysID control.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Auto-generated field. /// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPatID; protected global::System.Web.UI.WebControls.TextBox txtPhysID;
/// <summary> /// <summary>
/// btnPhySearch control. /// btnPhySearch control.
@ -58,5 +58,46 @@ namespace FWA_MAIN
/// To modify move field declaration from designer file to code-behind file. /// To modify move field declaration from designer file to code-behind file.
/// </remarks> /// </remarks>
protected global::System.Web.UI.WebControls.GridView gvPhysician; protected global::System.Web.UI.WebControls.GridView gvPhysician;
/// <summary>
/// btnPhysNew 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 btnPhysNew;
/// <summary>
/// bntPhysEdit 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 bntPhysEdit;
/// <summary>
/// btnPhysDelete 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 btnPhysDelete;
/// <summary>
/// Master property.
/// </summary>
/// <remarks>
/// Auto-generated property.
/// </remarks>
public new FWA_MAIN.main Master
{
get
{
return ((FWA_MAIN.main)(base.Master));
}
}
} }
} }

55
FWA_MAIN/physnew02.aspx Normal file
View File

@ -0,0 +1,55 @@
<%@ Page Title="Title" Language="C#" MasterPageFile="main.master" CodeBehind="physnew02.aspx.cs" Inherits="FWA_MAIN.physnew02" %>
<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
$("#<%= btnSavePhys.ClientID %>").click(); // Trigger the search button click
}
});
});
</script>
<link type="text/css" href="main.css"/>
<h1 style="text-align: center; font-size: 44px">New Physician</h1>
<div class="patDiv">
<div class="patDiv">
<div class="patDiv" style="padding-left: 400px; padding-right: 5px;width: 100px">
<div class="indivPatDiv"><label class="buttonLabel">Physician ID: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">First Name: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">Last Name: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">Middle Initial: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">Zip Code: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">City: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">State: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">Date of Birth: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">Phone Number: </label></div>
<div class="indivPatDiv"><label class="buttonLabel">Gender (M/F): </label></div>
<div class="indivPatDiv"><label class="buttonLabel">Specialty: </label></div>
</div>
<div class="patDiv">
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPhysID"></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="txtMidInit"></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="txtCity"></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="txtDOB"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtPhone"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtGender"></asp:TextBox></div>
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtSpecialty"></asp:TextBox></div>
</div>
</div>
</div>
<br/>
<br/>
<br/>
<div class="patDiv" style="margin-left: 500px">
<div style="margin-right: 10px; display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnSavePhys" Text="Create" OnClick="btnSavePhys_OnClick"/></div>
<div style="display: inline-block"><asp:Button runat="server" CssClass="standardbtn" ID="btnCancelPhys" Text="Cancel" OnClick="btnCancelPhys_OnClick"/></div>
</div>
</asp:Content>

View File

@ -0,0 +1,48 @@
using System;
using System.Web.UI;
namespace FWA_MAIN
{
public partial class physnew02 : Page
{
protected string physID;
protected void Page_Load(object sender, EventArgs e)
{
physID = Crypt.Decrypt(Request.QueryString["ID"]);
txtPhysID.Enabled = false;
txtPhysID.Text = physID;
}
protected void btnCancelPhys_OnClick(object sender, EventArgs e)
{
Response.Redirect("physician.aspx");
}
protected void btnSavePhys_OnClick(object sender, EventArgs e)
{
string id = Val.varchar(txtPhysID, 8);
string FNAME = Val.varchar(txtFNAME, 30);
string LNAME = Val.varchar(txtLNAME, 30);
string MidInit = Val.varchar(txtMidInit, 1);
Int16 zip = Val.SmallIntType(txtZip);
string city = Val.varchar(txtCity, 30);
string state = Val.varchar(txtState, 2);
DateTime date = Val.Date(txtDOB);
string phone = Val.varchar(txtPhone, 14);
string gender = Val.varchar(txtGender, 1);
string specialty = Val.varchar(txtSpecialty, 100);
PharmacyDataTier.CreatePhysician(id,FNAME,LNAME,MidInit,date,gender,city,zip,state,phone,specialty);
Response.Redirect("physician.aspx");
}
}
}

148
FWA_MAIN/physnew02.aspx.designer.cs generated Normal file
View File

@ -0,0 +1,148 @@
//------------------------------------------------------------------------------
// <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 physnew02
{
/// <summary>
/// txtPhysID 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 txtPhysID;
/// <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>
/// txtMidInit 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 txtMidInit;
/// <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>
/// 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>
/// 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>
/// 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>
/// txtPhone 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 txtPhone;
/// <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>
/// txtSpecialty 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 txtSpecialty;
/// <summary>
/// btnSavePhys 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 btnSavePhys;
/// <summary>
/// btnCancelPhys 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 btnCancelPhys;
/// <summary>
/// Master property.
/// </summary>
/// <remarks>
/// Auto-generated property.
/// </remarks>
public new FWA_MAIN.main Master
{
get
{
return ((FWA_MAIN.main)(base.Master));
}
}
}
}