protected void LabSummaryPage() { Session["IsFirstLoad"] = "true"; Page mp = (Page)this.Parent.Page; PlaceHolder ph = (PlaceHolder)mp.FindControl("phForms"); UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms"); Session["CurrentFormName"] = "frmLaboratoryTouch"; Touch.Custom_Forms.frmLaboratoryTouch fr = (frmLaboratoryTouch)mp.LoadControl("~/Touch/Custom Forms/frmLaboratoryTouch.ascx"); fr.ID = "ID" + Session["CurrentFormName"].ToString(); frmLaboratoryTouch theFrm = (frmLaboratoryTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString()); foreach (Control item in ph.Controls) { ph.Controls.Remove(item); //item.Visible = false; } if (theFrm != null) { theFrm.Visible = true; } else { ph.Controls.Add(fr); } ph.DataBind(); upt.Update(); mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();"); }
protected void BtnBack_Click(object sender, EventArgs e) { //Response.Redirect("frmLaboratoryTouch.aspx?patientId=" + Request.QueryString["PatientID"].ToString()); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true); Session["IsFirstLoad"] = "true"; Page mp = (Page)this.Parent.Page; PlaceHolder ph = (PlaceHolder)mp.FindControl("phForms"); UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms"); Session["CurrentFormName"] = "frmLaboratoryTouch"; Touch.Custom_Forms.frmLaboratoryTouch fr = (frmLaboratoryTouch)mp.LoadControl("~/Touch/Custom Forms/frmLaboratoryTouch.ascx"); fr.ID = "ID" + Session["CurrentFormName"].ToString(); frmLaboratoryTouch theFrm = (frmLaboratoryTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString()); foreach (Control item in ph.Controls) { ph.Controls.Remove(item); //item.Visible = false; } if (theFrm != null) { theFrm.Visible = true; } else { ph.Controls.Add(fr); } ph.DataBind(); upt.Update(); mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();"); }