protected void Page_Load(object sender, EventArgs e) { ICustomList LPTFListMgr; try { if (!IsPostBack) { (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text = "Customize Lists >> "; (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "LPTF Patient Transfer"; LPTFListMgr = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration"); DataSet theDS = LPTFListMgr.GetLPTFPatientTransfer(1); this.grdMasterLPTFPatientTransfer.DataSource = theDS.Tables[0]; 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 { LPTFListMgr = null; } }
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); } ICustomList LPTFListMgr; try { if (!IsPostBack) { //(Master.FindControl("lblRoot") as Label).Text = " » Customize Lists"; //(Master.FindControl("lblMark") as Label).Visible = false; //(Master.FindControl("lblheader") as Label).Text = "LPTF Patient Transfer"; //(Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text = "Customize Lists >> "; //(Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "LPTF Patient Transfer"; //ViewState["FID"] = Request.QueryString["Fid"].ToString(); ViewState["FID"] = Convert.ToString(Request.QueryString["Fid"] == null ? "0" : Request.QueryString["Fid"]); LPTFListMgr = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration"); DataSet theDS = LPTFListMgr.GetLPTFPatientTransfer(1); this.grdMasterLPTFPatientTransfer.DataSource = theDS.Tables[0]; if (ViewState["grdDataSource"] == null) { ViewState["grdDataSource"] = theDS.Tables[0]; } ViewState["SortDirection"] = "Desc"; BindGrid(); AuthenticationManager Authentication = new AuthenticationManager(); if (Authentication.HasFunctionRight(Convert.ToInt32(ViewState["FID"]), FunctionAccess.Add, (DataTable)Session["UserRight"]) == false) { btnAdd.Enabled = false; } } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); return; } finally { LPTFListMgr = null; } }