2024-03-28 19:12:34 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Web.UI;
|
2024-04-03 19:23:50 -04:00
|
|
|
|
using System.Data;
|
2024-03-28 19:12:34 -04:00
|
|
|
|
|
|
|
|
|
namespace FWA_MAIN
|
|
|
|
|
{
|
|
|
|
|
public partial class physEdit : Page
|
|
|
|
|
{
|
2024-04-03 19:23:50 -04:00
|
|
|
|
|
|
|
|
|
protected string physID;
|
2024-03-28 19:12:34 -04:00
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
txtPhysID.Enabled = false;
|
2024-04-03 19:23:50 -04:00
|
|
|
|
physID = Crypt.Decrypt(Request.QueryString["ID"]);
|
|
|
|
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
FillPhysician(physID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected void FillPhysician(string id)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
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");
|
2024-03-28 19:12:34 -04:00
|
|
|
|
}
|
|
|
|
|
|
2024-04-03 19:23:50 -04:00
|
|
|
|
protected void btnSavePhys_OnClick(object sender, EventArgs e)
|
2024-03-28 19:12:34 -04:00
|
|
|
|
{
|
2024-04-03 19:23:50 -04:00
|
|
|
|
|
|
|
|
|
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");
|
2024-03-28 19:12:34 -04:00
|
|
|
|
}
|
2024-04-03 19:23:50 -04:00
|
|
|
|
|
2024-03-28 19:12:34 -04:00
|
|
|
|
}
|
|
|
|
|
}
|