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

38 lines
1.2 KiB
C#
Raw Normal View History

2024-03-21 18:17:57 -04:00
using System;
using System.Web.UI;
namespace FWA_MAIN
{
public partial class medNew : Page
{
2024-04-03 15:21:33 -04:00
protected string medID;
2024-03-21 18:17:57 -04:00
protected void Page_Load(object sender, EventArgs e)
{
2024-04-03 15:21:33 -04:00
medID = Crypt.Decrypt(Request.QueryString["ID"]);
2024-03-21 18:17:57 -04:00
2024-04-03 15:21:33 -04:00
txtMedID.Enabled = false;
txtMedID.Text = medID;
2024-03-21 18:17:57 -04:00
}
2024-04-03 15:21:33 -04:00
protected void btnCancelMed_OnClick(object sender, EventArgs e)
2024-03-21 18:17:57 -04:00
{
2024-04-03 15:21:33 -04:00
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");
2024-03-21 18:17:57 -04:00
}
}
}