46 lines
1.5 KiB
C#
46 lines
1.5 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.Enabled = false;
|
|
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");
|
|
}
|
|
}
|
|
} |