2024-03-20 13:04:27 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Web.UI;
|
|
|
|
|
|
|
|
|
|
namespace FWA_MAIN
|
|
|
|
|
{
|
|
|
|
|
public partial class patNew : Page
|
|
|
|
|
{
|
2024-03-28 15:21:56 -04:00
|
|
|
|
protected string patID;
|
|
|
|
|
|
2024-03-20 13:04:27 -04:00
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
2024-03-28 15:21:56 -04:00
|
|
|
|
|
|
|
|
|
patID = Crypt.Decrypt(Request.QueryString["ID"]);
|
|
|
|
|
|
2024-03-28 19:23:49 -04:00
|
|
|
|
txtPatID.Enabled = false;
|
2024-03-28 15:21:56 -04:00
|
|
|
|
txtPatID.Text = patID;
|
2024-03-20 13:04:27 -04:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void btnCancelPat_OnClick(object sender, EventArgs e)
|
|
|
|
|
{
|
2024-03-28 15:21:56 -04: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 13:04:27 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|