protected void Page_Load(object sender, EventArgs e) { if (Session["AppLocation"] == null || Session.Count == 0 || Session["AppUserID"].ToString() == "") { IQCareMsgBox.Show("SessionExpired", this); Response.Redirect("~/frmlogin.aspx", true); } if (this.IsPostBack != true) { ViewState["ListName"] = Request.QueryString["LstName"].ToString(); if (Request.QueryString["TableName"] == "PreDefinedDruglist") { DataSet thePharmacyDS = new DataSet(); IPediatric PediatricManager; PediatricManager = (IPediatric)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BPediatric, BusinessProcess.Pharmacy"); thePharmacyDS = PediatricManager.GetPediatricFields(1); Session["DrugData"] = thePharmacyDS.Tables[0]; BindList(); } if (Request.QueryString["TableName"] == "PreDefinedLablist") { lblHeader.Text = "Predefined Lab List"; DataSet theLabDS = new DataSet(); ILabFunctions LabManager; LabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); theLabDS = LabManager.GetLabs(); Session["DrugData"] = theLabDS.Tables[0]; BindLabList(); } } }
protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack != true) { ViewState["ListName"] = Request.QueryString["LstName"].ToString(); if (Request.QueryString["TableName"] == "PreDefinedDruglist") { DataSet thePharmacyDS = new DataSet(); IPediatric PediatricManager; PediatricManager = (IPediatric)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BPediatric, BusinessProcess.Pharmacy"); thePharmacyDS = PediatricManager.GetPediatricFields(1); Session["DrugData"] = thePharmacyDS.Tables[0]; BindList(); } if (Request.QueryString["TableName"] == "PreDefinedLablist") { lblHeader.Text = "Predefined Lab List"; DataSet theLabDS = new DataSet(); ILabFunctions LabManager; LabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); theLabDS = LabManager.GetLabs(); Session["DrugData"] = theLabDS.Tables[0]; BindLabList(); } } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { ILabMst LabManager; try { if (!IsPostBack) { (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text = "Customize Lists >> "; (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "Laboratory"; LabManager = (ILabMst)ObjectFactory.CreateInstance("BusinessProcess.Administration.BLabMst, BusinessProcess.Administration"); DataSet theDS = LabManager.GetLabs(); if (Request.QueryString["LabID"] != null) { mainLabId = int.Parse(Request.QueryString["LabID"]); DataView dv = theDS.Tables[0].DefaultView; dv.RowFilter = "LabTestID=" + mainLabId; DataTable theDt = dv.ToTable(); grdLab.DataSource = theDt; H1.InnerText = theDt.Rows[0]["LabName"] + " Parameters"; } else { // string theUrl = string.Format("{0}?Name={1}&Fid={2}", "frmAdmin_LaboratoryTestMaster.aspx", "Add", ViewState["FID"].ToString()); Response.Redirect(theUrl, true); } this.grdLab.DataBind(); ViewState["gridSortDirection"] = "Desc"; ViewState["FID"] = Request.QueryString["Fid"].ToString(); if (ViewState["grdDataSource"] == null) { ViewState["grdDataSource"] = theDS.Tables[0]; } ViewState["SortDirection"] = "Desc"; BindGrid(); } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); return; } finally { LabManager = null; } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { if (Session["AppLocation"] == null || Session.Count == 0 || Session["AppUserID"].ToString() == "") { IQCareMsgBox.Show("SessionExpired", this); Response.Redirect("~/frmlogin.aspx", true); } ILabMst LabManager; try { if (!IsPostBack) { //(Master.FindControl("lblRoot") as Label).Text = " » Customize Lists"; //(Master.FindControl("lblMark") as Label).Visible = false; //(Master.FindControl("lblheader") as Label).Text = "Laboratory"; //(Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text = "Customize Lists >> "; //(Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "Laboratory"; LabManager = (ILabMst)ObjectFactory.CreateInstance("BusinessProcess.Administration.BLabMst, BusinessProcess.Administration"); DataSet theDS = LabManager.GetLabs(); DataView theDV = new DataView(theDS.Tables[0]); theDV.RowFilter = "DataType='Group'"; DataTable theDt = theDV.ToTable(); this.grdLab.DataSource = theDt; this.grdLab.DataBind(); ViewState["gridSortDirection"] = "Desc"; ViewState["FID"] = Request.QueryString["Fid"].ToString(); if (ViewState["grdDataSource"] == null) { ViewState["grdDataSource"] = theDt; } ViewState["SortDirection"] = "Desc"; BindGrid(); } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); return; } finally { LabManager = null; } }
protected void Page_Load(object sender, EventArgs e) { ///////////////////////////////////////////////////////////////////// // Code Written By : Pankaj Kumar // Written Date : 25th July 2006 // Modify Date : Rakhi Tyagi // Modification Date : 22 Feb 2007 // Description : Lab test List // /// ///////////////////////////////////////////////////////////////// ILabMst LabManager; try { if (!IsPostBack) { //(Master.FindControl("lblRoot") as Label).Text = " » Customize Lists"; //(Master.FindControl("lblMark") as Label).Visible = false; //(Master.FindControl("lblheader") as Label).Text = "Laboratory"; (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text = "Customize Lists >> "; (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "Laboratory"; LabManager = (ILabMst)ObjectFactory.CreateInstance("BusinessProcess.Administration.BLabMst, BusinessProcess.Administration"); DataSet theDS = LabManager.GetLabs(); this.grdLab.DataSource = theDS.Tables[0]; this.grdLab.DataBind(); ViewState["gridSortDirection"] = "Desc"; ViewState["FID"] = Request.QueryString["Fid"].ToString(); if (ViewState["grdDataSource"] == null) { ViewState["grdDataSource"] = theDS.Tables[0]; } ViewState["SortDirection"] = "Desc"; BindGrid(); } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); return; } finally { LabManager = null; } }