CNSA-216-FP/FWA_MAIN/patNew.aspx.cs
2024-03-28 15:21:56 -04:00

45 lines
1.4 KiB
C#

using System;
using System.Web.UI;
namespace FWA_MAIN
{
public partial class patNew : Page
{
protected string patID;
protected void Page_Load(object sender, EventArgs e)
{
patID = Crypt.Decrypt(Request.QueryString["ID"]);
txtPatID.Text = patID;
}
protected void btnCancelPat_OnClick(object sender, EventArgs e)
{
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");
}
}
}