CNSA-216-FP/FWA_MAIN/preNew.aspx.cs

40 lines
1.2 KiB
C#

using System;
using System.Web.UI;
namespace FWA_MAIN
{
public partial class preNew : Page
{
protected string preID;
protected void Page_Load(object sender, EventArgs e)
{
preID = Crypt.Decrypt(Request.QueryString["ID"]);
txtRxNum.Enabled = false;
txtRxNum.Text = preID;
}
protected void btnCancelPre_OnClick(object sender, EventArgs e)
{
Response.Redirect("Prescription.aspx");
}
protected void btnSavePat_OnClick(object sender, EventArgs e)
{
string rxnum = Val.varchar(txtRxNum, 11);
int allow = Val.IntType(txtAllowed);
int used = Val.IntType(txtUsed);
string medid = Val.MedID(txtMedID);
string phyid = Val.PhyID(txtPhysID);
string patid = Val.PatID(txtPatID);
DateTime start = Val.Date(txtStart);
DateTime end = Val.Date(txtEnd);
PharmacyDataTier.CreatePrescription2(rxnum,patid,medid,phyid,used,allow,start,end);
PharmacyDataTier.RefreshRefill(rxnum);
Response.Redirect("Prescription.aspx");
}
}
}