Login Page

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Login Page as PDF for free.

More details

  • Words: 2,757
  • Pages: 44
Login Page:

Welcome Page:

Medical Center:

Medical Staff:

Wards:

Beds:

Laboratory:

Pharmacy:

Patients:

Configuration:

Create User Page:

Reception Welcome Page:

New Patient Page:

In Patient Department Page:

In Patient Department Page (Lab Service Charge):

In Patient Department Page (Pharmacy Charge Page):

Discharge Request Page:

Patient Bill Page:

Existing Patient Page:

Out Patient Appointment Page:

Out Patient Ward Page:

AdminMaster.Master.cs Page

Beds Code Page using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class Beds : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void EventBtn(object sender, EventArgs e) { Button eventbtn = (Button)sender; switch (eventbtn.ID) { case"AddBtn": BedsPan.Visible = false; AddPan.Visible = true; break; case"DeleteBtn": BedsPan.Visible = false; DeletePan.Visible = true; break; case"ModifyBtn": BedsPan.Visible = false; ModPan.Visible = true; break; } } OleDbConnection cn = new OleDbConnection(); protected void SaveBtn_Click(object sender, EventArgs e) { string selectwards=WardDrop.SelectedItem.ToString(); string bed=null; if(BedStuRad1.Checked) { bed="Occupied"; } else if(BedStuRad2.Checked) {

bed="Unoccupied"; } cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("insert into Beds values ('" + CodeTxt.Text + "','" + selectwards + "','" + bed + "')", cn); cm.ExecuteNonQuery(); Session["BedAdd"] = CodeTxt.Text; Response.Redirect("Result.aspx"); } }

Create_User Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class Create_User : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } OleDbConnection cn = new OleDbConnection(); protected void CreateBtn_Click(object sender, EventArgs e) { string role=RoleList.Text; cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("insert into UserTable Values ('" + LoginTxt.Text + "','" + Passtxt.Text + "','" + FNameTxt.Text + "','" + LNameTxt.Text + "','"+role+"')",cn); cm.ExecuteNonQuery(); Session["CreateUserMedi"] = LoginTxt.Text; Response.Redirect("Result.aspx");

} protected void Button1_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand olem = new OleDbCommand(); olem.Connection = cn; olem.CommandText = "Delete UserTable Where LoginName=@logname and Pass_word=@pass"; olem.Parameters.Add(new OleDbParameter("@logname", LoginTxt.Text)); olem.Parameters.Add(new OleDbParameter("@pass", Passtxt.Text)); olem.ExecuteNonQuery(); Session["DelUserMedi"] = LoginTxt.Text; Response.Redirect("Result.aspx"); } }

Default Login Page: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } OleDbConnection cn = new OleDbConnection(); protected void LogBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("Select Role from UserTable where Loginname='"+LoginTxt.Text+"' and Pass_word='"+PassTxt.Text+"'",cn); OleDbDataReader rd = cm.ExecuteReader(); if (rd.Read()) { if (rd["Role"].ToString()=="Administrator") {

Cache["AdminUser"] = LoginTxt.Text; Response.Redirect("AdminPage.aspx"); } else if (rd["Role"].ToString() == "Reception") { Cache["User"] = LoginTxt.Text; Response.Redirect("Reception.aspx"); } else if (rd["Role"].ToString() == "Senior Management") { Cache["SinUser"] = LoginTxt.Text; Response.Redirect("SeniorUser.aspx"); }

} else { } }

ErrorLab.Visible = true;

}

DischargeRequest Code Page: using using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Web.UI.HtmlControls;

public partial class DischargeRequest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Session["Discharge"] != null) { DisReqLab.Text = "Descharge Patient"; GenBilBtn.Text = "Go for Bill"; } else if (Session["Bill"] != null) { DisReqLab.Text = "Create Bill for Patient"; GenBilBtn.Text = "Go for print Bill"; } ReqPat.Text = Request.QueryString["PName"]; ReqAgeLab.Text = Request.QueryString["PAge"];

GenRqeLab.Text = Request.QueryString["Gen"]; LPCharge.Text = Request.QueryString["Chr"]; } protected void GenBilBtn_Click(object sender, EventArgs e) { Response.Redirect("PatientBill.aspx? PatientName="+ReqPat.Text+"&PatientAge="+ReqAgeLab.Text+"&Gender="+GenRqeLab. Text+"&LPCharg="+LPCharge.Text+"&Other="+OtherTxt.Text); } }

ExistingPatient Code Page using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class ExistingPatient : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } OleDbConnection cn = new OleDbConnection(); protected void SearchBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("Select * from Patients where Name='" + SearchTxt.Text + "'", cn); OleDbDataReader rd = cm.ExecuteReader(); if (rd.Read()) { NotFound.Visible = false; SearchDetailsPan.Visible = true; PNameTxt.Text = rd[0].ToString(); PAgeTxt.Text = rd[1].ToString(); ExiPatHei.Text = rd[4].ToString(); ExiPatWei.Text = rd[5].ToString(); if (rd[3].ToString() == "In") { Ptype1.Checked=true;

} else {

Ptype2.Checked = true; } if (rd[2].ToString() == "Female") { SexRad2.Checked = true; } else { SexRad1.Checked = true; }

} else {

NotFound.Visible = true; SearchDetailsPan.Visible =false; } } protected void ExisBtn_Click(object sender, EventArgs e) { string sex = null; if (SexRad1.Checked) { sex = "Male"; } else { sex = "Female"; } Response.Redirect("OutPatient.aspx?PName=" + PNameTxt.Text + "&age=" + PAgeTxt.Text + "&Gen=" + sex); } }

Inpatient Code Page: using using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Web.UI.HtmlControls;

public partial class InPatient : System.Web.UI.Page {

protected void Page_Load(object sender, EventArgs e) { PnameTxt.Text = Request.QueryString["PName"]; PAgeTxt.Text = Request.QueryString["age"]; PGenderTxt.Text = Request.QueryString["Gen"]; } protected void PPharBtn_Click(object sender, EventArgs e) { LabSerPan.Visible = false; PharmPan.Visible = true; } protected void LabBtn_Click(object sender, EventArgs e) { PharmPan.Visible = false; LabSerPan.Visible = true; } protected void CanBtn_Click(object sender, EventArgs e) { LabSerPan.Visible = false; } protected void PhrCanBtn_Click(object sender, EventArgs e) { PharmPan.Visible = false; } protected void OkBtn_Click(object sender, EventArgs e) { LabSerPan.Visible = false; LabRs.Visible = true; LabChrgLab.Visible = true; LabRs.Text = LabChargeTxt.Text; } protected void PhrOkBtn_Click(object sender, EventArgs e) { PharmPan.Visible = false; PhrLab.Visible = true; DisRs.Visible = true; DisRs.Text = PhrTxt.Text; } protected void DisReqBtn_Click(object sender, EventArgs e) { int i, x, r; i = Convert.ToInt16(LabRs.Text); x = Convert.ToInt16(DisRs.Text); r = i + x; Response.Redirect("DischargeRequest.aspx? PName="+PnameTxt.Text+"&PAge="+PAgeTxt.Text+"&Gen="+PGenderTxt.Text+"&Chr="+r .ToString()); } protected void DisReqPat_Click(object sender, EventArgs e) { int i, x, r; i = Convert.ToInt16(LabRs.Text); x = Convert.ToInt16(DisRs.Text); r = i + x; Session["Discharge"] = PnameTxt.Text;

Response.Redirect("DischargeRequest.aspx?PName=" + PnameTxt.Text + "&PAge=" + PAgeTxt.Text + "&Gen=" + PGenderTxt.Text + "&Chr=" + r.ToString()); } protected void PBillBtn_Click(object sender, EventArgs e) { int i, x, r; i = Convert.ToInt16(LabRs.Text); x = Convert.ToInt16(DisRs.Text); r = i + x; Session["Bill"] = PnameTxt.Text; Response.Redirect("DischargeRequest.aspx?PName=" + PnameTxt.Text + "&PAge=" + PAgeTxt.Text + "&Gen=" + PGenderTxt.Text + "&Chr=" + r.ToString()); } }

Laboratory Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class Laboratory : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void EventBtn(object sender, EventArgs e) { Button evtbtn = (Button)sender; switch (evtbtn.ID) { case"AddBtn": LaboratoryPan.Visible = false; AddPan.Visible = true; break; case "DeleteBtn": LaboratoryPan.Visible = false; DeletePan.Visible = true; break; case "ModifyBtn": LaboratoryPan.Visible = false; ModLabPan.Visible=true; break;

case "SearchBtn": LaboratoryPan.Visible = false; SearchPan.Visible = true; break; } } OleDbConnection cn = new OleDbConnection(); protected void SaveBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("insert into Laboratary values ('" + CodeTxt.Text + "','" + DescriTxt.Text + "','" + LabChargTxt.Text + "')", cn); cm.ExecuteNonQuery(); Session["LabAdd"] = CodeTxt.Text; Response.Redirect("Result.aspx"); } protected void SearchLabBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbDataAdapter adp = new OleDbDataAdapter("Select * from Laboratary where Code like'%" + SearchTxt.Text + "%'", cn); DataSet ds = new DataSet("Laboratary"); adp.Fill(ds, "Laboratary"); SearchGrid.DataSource = ds; SearchGrid.DataBind(); } }

Medical Staff Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class MedicalStaff : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e) { } OleDbConnection cn=new OleDbConnection (); protected void EventBtn(object sender, EventArgs e) { Button evtbtn = (Button)sender; switch (evtbtn.ID) { case"AddBtn": MedStaffPan.Visible = false; AddPan.Visible = true; break; case "DeleteBtn": MedStaffPan.Visible = false; DelPan.Visible = true; break; case "ModifyBtn": MedStaffPan.Visible = false; ModPan.Visible = true; break; case "SearchBtn": MedStaffPan.Visible = false; SearchPan.Visible = true; break; } } protected void AddMedBtn_Click(object sender, EventArgs e) { string work=null; if(WorkAddRad1.Checked) { work="Day"; } else if(WorkAddRad2.Checked) { work="Night Shift"; } string stafftype=null; if(TypeAddRad1.Checked) { stafftype="Doctor"; } else if (TypeAddRad2.Checked) { stafftype="Junior Doctor"; } else if (TypeAddRad3.Checked) { stafftype="Nurse"; } else if (TypeAddRad4.Checked) { stafftype="Assistant"; }

cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("Insert into Medstaff Values ('" + NameAddTxt.Text + "','" + AddAddTxt.Text + "','" + EmerGAddTxt.Text + "','" + work + "','" + stafftype + "','" + InPatAddTxt.Text + "','" + OutPatAddTxt.Text + "')", cn); cm.ExecuteNonQuery(); Session["StaffAdd"] = NameAddTxt.Text; Response.Redirect("Result.aspx"); } protected void SearchMedBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbDataAdapter adp = new OleDbDataAdapter("Select * from Medstaff where Name like '%" + SearchMedTxt.Text + "%'", cn); DataSet ds = new DataSet("Medstaff"); adp.Fill(ds, "Medstaff"); SearchGrid.DataSource = ds; SearchGrid.DataBind(); } }

Medicenter Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class MidiCenter : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } OleDbConnection cn = new OleDbConnection(); public void MediEvent(object s, EventArgs e) { Button evtbtn = (Button)s; switch (evtbtn.ID)

{

case"AddBtn": MediPan.Visible = false; AddPan.Visible = true; Time_Lab.Text = TimeZone.CurrentTimeZone.StandardName.ToString(); break; case"DeleteBtn": MediPan.Visible = false; DelPan.Visible = true; break; case "ModifyBtn": MediPan.Visible = false; ModPan.Visible = true; break; } } protected void SaveBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("insert into MediCenterTab values ('" + CodeTxt.Text + "','" + NameTxt.Text + "','" + Time_Lab.Text + "')", cn); cm.ExecuteNonQuery(); Session["MedAdd"] = CodeTxt.Text; Response.Redirect("Result.aspx"); } }

New Patient Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class NewPatient : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } OleDbConnection cn = new OleDbConnection(); protected void SubmiBtn_Click(object sender, EventArgs e)

{ string type=null; if(Ptype2.Checked) { type="Out-Patient"; } else { type="In-Patient"; } string sex=null; if(SexRad1.Checked) { sex="Male"; } else { sex="Female"; } cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("Insert into Patients values ('" + PNameTxt.Text + "','" + PAgeTxt.Text + "','" + sex + "','" + type+ "','" + PHeiTxt.Text + "','" + PWeiTxt.Text + "')", cn); cm.ExecuteNonQuery(); if (Ptype2.Checked) { Response.Redirect("OutPatient.aspx?PName=" + PNameTxt.Text + "&age=" + PAgeTxt.Text + "&Gen=" + sex); } else { Response.Redirect("InPatient.aspx?PName=" + PNameTxt.Text + "&age=" + PAgeTxt.Text + "&Gen=" + sex); } } }

OutBill Code Page: using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls; using System.Drawing.Printing; public partial class OutBillPrint : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { PNameT.Text = Request.QueryString["PatientName"]; PAgeT.Text = Request.QueryString["PatientAge"]; PGenderT.Text = Request.QueryString["Gender"]; LPChargT.Text = Request.QueryString["Charg"]; DocName.Text = Request.QueryString["DocName"]; DocFeeTxt.Text = Request.QueryString["DocFee"]; WardCharge.Text = Request.QueryString["WardFee"]; } PrintDocument pd = new PrintDocument(); protected void PrintBtn_Click(object sender, EventArgs e) { pd.Print(); } }

OutPatient Bill Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts;file:///E:\Niit Document\Niit project\HospitalManagement\OutPatBill.aspx.cs using System.Web.UI.HtmlControls; public partial class OutPatBill : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ReqPat.Text = Request.QueryString["PName"]; ReqAgeLab.Text = Request.QueryString["PAge"]; GenRqeLab.Text = Request.QueryString["Gen"]; LPCharge.Text = Request.QueryString["Chr"]; DocAppTxt.Text = Request.QueryString["Doc"]; } protected void OutBillLab_Click(object sender, EventArgs e) { Response.Redirect("OutBillPrint.aspx?PatientName=" + ReqPat.Text + "&PatientAge=" + ReqAgeLab.Text + "&Gender=" + GenRqeLab.Text + "&Charg=" + LPCharge.Text + "&DocName=" + DocAppTxt.Text + "&WardFee=" + WardTxt.Text + "&DocFee=" + DocFeeTxt.Text);

}

}

Outpatient Code Page: using using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Web.UI.HtmlControls;

public partial class OutPatient : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { PnameTxt.Text = Request.QueryString["PName"]; PAgeTxt.Text = Request.QueryString["age"]; PGenderTxt.Text = Request.QueryString["Gen"]; } protected void LabBtn_Click(object sender, EventArgs e) { PharmPan.Visible = false; LabSerPan.Visible = true; } protected void PPharBtn_Click(object sender, EventArgs e) { LabSerPan.Visible = false; PharmPan.Visible = true; } protected void PBillBtn_Click(object sender, EventArgs e) { int i, x, r; i = Convert.ToInt16(LabRs.Text); x = Convert.ToInt16(DisRs.Text); r = i + x; Session["BillOut"] = PnameTxt.Text; Response.Redirect("OutPatBill.aspx?PName=" + PnameTxt.Text + "&PAge=" + PAgeTxt.Text + "&Gen=" + PGenderTxt.Text + "&Chr=" + r.ToString() +"&Doc="+DocNameLab.Text); } protected void OkBtn_Click(object sender, EventArgs e) { LabSerPan.Visible = false; LabRs.Visible = true; LabChrgLab.Visible = true;

LabRs.Text = LabChargeTxt.Text; } protected void CanBtn_Click(object sender, EventArgs e) { LabSerPan.Visible = false; } protected void PhrOkBtn_Click(object sender, EventArgs e) { PharmPan.Visible = false; PhrLab.Visible = true; DisRs.Visible = true; DisRs.Text = PhrTxt.Text; } protected void PhrCanBtn_Click(object sender, EventArgs e) { PharmPan.Visible = false; } protected void AppoBtn_Click(object sender, EventArgs e) { WardPan.Visible = false; AppointPan.Visible = true; } protected void AdmitPtBtn_Click(object sender, EventArgs e) { AppointPan.Visible = false; WardPan.Visible = true; } protected void OkWardBtn_Click(object sender, EventArgs e) { WardNo.Visible = true; PAdmit.Visible = true; WardNo.Text = WardList.SelectedItem.ToString(); WardPan.Visible = false; } protected void CancelWard_Click(object sender, EventArgs e) { WardPan.Visible = false; } protected void OKApp_Click(object sender, EventArgs e) { AppDocLLab.Visible = true; DocNameLab.Visible = true; DocNameLab.Text = DocList.SelectedItem.ToString(); AppointPan.Visible = false; } protected void CancApp_Click(object sender, EventArgs e) { AppointPan.Visible = false; } }

PatientBill Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Drawing.Printing; public partial class PatientBill : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { PNameT.Text = Request.QueryString["PatientName"]; PAgeT.Text = Request.QueryString["PatientAge"]; PGenderT.Text = Request.QueryString["Gender"]; LPChargT.Text = Request.QueryString["LPCharg"]; OtherChrT.Text = Request.QueryString["Other"]; } PrintDocument pd = new PrintDocument(); protected void PrintBtn_Click(object sender, EventArgs e) { pd.Print(); } }

Patient Code Page: using using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Web.UI.HtmlControls;

public partial class Patients : System.Web.UI.Page {

protected void Page_Load(object sender, EventArgs e) { } protected void EventBtn(object sender, EventArgs e) { Button eventbtn = (Button)sender; switch (eventbtn.ID) { case"DeleteBtn": PatientPan.Visible = false; DeletePan.Visible = true; break; case"ModifyBtn": PatientPan.Visible = false; ModifyPan.Visible = true; break; }

}

}

Pharmacy Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class Pharmacy : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void EventBtn(object sender, EventArgs e) { Button eventbtn = (Button)sender; switch (eventbtn.ID) { case "AddBtn": PharmacyPan.Visible = false; AddPan.Visible = true; break; case "DeleteBtn":

PharmacyPan.Visible DeletePan.Visible = break; case "ModifyBtn": PharmacyPan.Visible ModifyPan.Visible = break;

= false; true; = false; true;

} } OleDbConnection cn = new OleDbConnection(); protected void AddPhaBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("insert into Pharmacy values ('"+NameAddTxt.Text+"','"+SaltTxt.Text+"','"+PriceAddTxt.Text+"','"+StokAddTx t.Text+"','"+RecordTxt.Text+"')", cn); cm.ExecuteNonQuery(); Session["PhaAdd"] = NameAddTxt.Text; Response.Redirect("Result.aspx"); } }

Result Code Page: using using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Web.UI.HtmlControls;

public partial class Result : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Session["CreateUserMedi"] != null) { ResLab.Text = "User Created Successfully..."; ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } else if (Session["MedAdd"] != null) { ResLab.Text = "Medicenter Add..";

ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } else if (Session["StaffAdd"] != null) { ResLab.Text = "Medical Staff Add.."; ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } else if (Session["BedAdd"] != null) { ResLab.Text = "New Bed Add.."; ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } else if (Session["WardAdd"] != null) { ResLab.Text = "New Ward Add.."; ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } else if (Session["LabAdd"] != null) { ResLab.Text = "New Laboratory Test Add.."; ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } else if (Session["PhaAdd"] != null) { ResLab.Text = "Medicine Add.."; ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } else if(Session["DelUserMedi"]!=null) { ResLab.Text = "User Deleted.."; ResBtn.Text = "Go to Admin Page"; ResBtn.Click += new EventHandler(callfun); } } public void callfun(object s,EventArgs e) { Session.RemoveAll(); Response.Redirect("AdminPage.aspx"); } }

User Master.Master Code Page: using using using using using using using using using using

System; System.Data; System.Configuration; System.Collections; System.Web; System.Web.Security; System.Web.UI; System.Web.UI.WebControls; System.Web.UI.WebControls.WebParts; System.Web.UI.HtmlControls;

public partial class UserMaster : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { UserLab.Text = (string)Cache["User"].ToString(); } protected void LogBtn_Click(object sender, EventArgs e) { Cache.Remove("User"); Response.Redirect("Default.aspx"); } }

Ward Code Page: using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.OleDb; public partial class Wards : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void EventBtn(object sender, EventArgs e)

{

Button eventbtn = (Button)sender; switch (eventbtn.ID) { case"AddBtn": WardPan.Visible = false; AddPan.Visible = true; break; case "DeleteBtn": WardPan.Visible = false; DeletePan.Visible = true; break; case "ModifyBtn": WardPan.Visible = false; ModPan.Visible = true; break; }

} OleDbConnection cn=new OleDbConnection (); protected void AddWardBtn_Click(object sender, EventArgs e) { cn.ConnectionString = "provider=Microsoft.jet.oledb.4.0; Data Source=" + Server.MapPath("HMS.mdb"); cn.Open(); OleDbCommand cm = new OleDbCommand("Insert into Wards values ('"+CodeTxt.Text+"','"+DescriTxt.Text+"','"+DailyTxt.Text+"')",cn); cm.ExecuteNonQuery(); Session["WardAdd"] = CodeTxt.Text; Response.Redirect("Result.aspx"); } }

Related Documents

Login Page
June 2020 10
Login Page Creation
July 2020 3
Login Page Creation
July 2020 3
Login
November 2019 51
Login
November 2019 50
Login Credentials
November 2019 55