protected void Page_Load(object sender, EventArgs e) { ILabFunctions LabManager; int PatientID; PatientID = Convert.ToInt32(Request.QueryString["PatientId"]); try { if (!IsPostBack) { LabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet theDS = (DataSet)LabManager.GetPatientLabOrder(PatientID.ToString()); ViewState["grddata"] = theDS; ViewState["gridSortDirection"] = "Desc"; this.grdLabOrderList.DataSource = theDS.Tables[0].DefaultView; this.grdLabOrderList.DataBind(); BindLaboratoryGrid(); } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); return; } }
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); } ILabFunctions LabManager; int PatientID; PatientID = Convert.ToInt32(Session["PatientId"]); try { if (!IsPostBack) { LabManager = (ILabFunctions)ObjectFactory.CreateInstance("BusinessProcess.Laboratory.BLabFunctions, BusinessProcess.Laboratory"); DataSet theDS = (DataSet)LabManager.GetPatientLabOrder(PatientID.ToString()); ViewState["grddata"] = theDS; ViewState["gridSortDirection"] = "Desc"; this.grdLabOrderList.DataSource = theDS.Tables[0].DefaultView; this.grdLabOrderList.DataBind(); BindLaboratoryGrid(); } } catch (Exception err) { MsgBuilder theBuilder = new MsgBuilder(); theBuilder.DataElements["MessageText"] = err.Message.ToString(); IQCareMsgBox.Show("#C1", theBuilder, this); return; } }