CNSA-216-FP/FWA_MAIN/patNew.aspx.cs

46 lines
1.5 KiB
C#
Raw Permalink Normal View History

2024-03-20 10:04:27 -07:00
using System;
using System.Web.UI;
namespace FWA_MAIN
{
public partial class patNew : Page
{
2024-03-28 12:21:56 -07:00
protected string patID;
2024-03-20 10:04:27 -07:00
protected void Page_Load(object sender, EventArgs e)
{
2024-03-28 12:21:56 -07:00
patID = Crypt.Decrypt(Request.QueryString["ID"]);
2024-03-28 16:23:49 -07:00
txtPatID.Enabled = false;
2024-03-28 12:21:56 -07:00
txtPatID.Text = patID;
2024-03-20 10:04:27 -07:00
}
protected void btnCancelPat_OnClick(object sender, EventArgs e)
{
2024-03-28 12:21:56 -07:00
Response.Redirect("patSearch.aspx");
}
protected void btnSavePat_OnClick(object sender, EventArgs e)
{
string id = Val.varchar(txtPatID, 8);
string FNAME = Val.varchar(txtFNAME, 30);
string LNAME = Val.varchar(txtLNAME, 30);
string MidInit = Val.varchar(txtMidInit, 1);
int Weight = Val.IntType(txtWeight);
int HeightFt = Val.IntType(txtHeightFt);
int HeightIn = Val.IntType(txtHeightIn);
DateTime date = Val.Date(txtDOB);
string gender = Val.varchar(txtGender, 1);
string city = Val.varchar(txtCity, 30);
Int16 zip = Val.SmallIntType(txtZip);
string state = Val.varchar(txtState, 2);
string phone = Val.varchar(txtPhoneNum, 14);
PharmacyDataTier.CreatePatient(id,FNAME,LNAME,MidInit,Weight,HeightFt,HeightIn,date,gender,city,zip,state,phone);
Response.Redirect("patSearch.aspx");
2024-03-20 10:04:27 -07:00
}
}
}