38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using System;
|
|
using System.Web.UI;
|
|
|
|
namespace FWA_MAIN
|
|
{
|
|
public partial class medNew : Page
|
|
{
|
|
protected string medID;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
medID = Crypt.Decrypt(Request.QueryString["ID"]);
|
|
|
|
txtMedID.Enabled = false;
|
|
txtMedID.Text = medID;
|
|
}
|
|
|
|
protected void btnCancelMed_OnClick(object sender, EventArgs e)
|
|
{
|
|
Response.Redirect("MediSearch.aspx");
|
|
}
|
|
|
|
protected void btnSaveMed_OnClick(object sender, EventArgs e)
|
|
{
|
|
string id = Val.varchar(txtMedID, 7);
|
|
string medName = Val.varchar(txtMedName, 60);
|
|
string intake = Val.varchar(txtIntake, 30);
|
|
|
|
string frequency = Val.varchar(txtFrequency, length:30);
|
|
string dosage = Val.varchar(txtDosage, length:30);
|
|
string purpose = Val.varchar(txtPurpose, length:100);
|
|
string rxNum = Val.varchar(txtRxNum, 30);
|
|
|
|
|
|
PharmacyDataTier.CreateMedication(id, medName, intake,frequency, dosage, purpose, rxNum);
|
|
Response.Redirect("mediSearch.aspx");
|
|
}
|
|
}
|
|
} |