protected void Page_Load(object sender, EventArgs e) { try { string strPreviousPage = ""; if (Request.UrlReferrer != null) { strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1]; if (Session["AdvisorID"] == null || Session["AdvisorID"].ToString() == "") { Response.Redirect("../AdminLogin.aspx", false); } else { if (!IsPostBack) { ViewState["ps"] = 5; _objComman.GetCountry(ddlCountry); _objComman.GetProvince(ddlProvince); _objComman.GetCity(ddlCity); btnUpdate.Visible = false; BindLocation(); } } } if (strPreviousPage == "") { Response.Redirect("~/AdminLogin.aspx"); } } catch { message.ForeColor = System.Drawing.Color.Red; message.Text = "Something went wrong, please contact administrator"; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true); } }
protected void Page_Load(object sender, EventArgs e) { try { string strPreviousPage = ""; if (Request.UrlReferrer != null) { strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1]; if (Session["SAID"] == null || Session["SAID"].ToString() == "") { Response.Redirect("../ClientLogin.aspx", false); } else { if (!IsPostBack) { _objComman.GetCountry(ddlCountry); _objComman.GetProvince(ddlProvince); _objComman.GetAccountType(ddlAccountType); _objComman.getRecordsPerPage(DropPage); _objComman.getRecordsPerPage(DropPage1); _objComman.getRecordsPerPage(dropPage2); _objComman.getRecordsPerPage(DropPageDocuments); BindParentDetails(); chkClientAddress.Visible = false; GetClientAddress(); //btnUpdateParents.Visible = false; BindAddressDetails(); BindBankDetails(); Disable(); BindDocumentList(); } if (this.IsPostBack) { if (Request.Form[TabName.UniqueID].Contains("gvParent")) { TabName.Value = "tab1"; } else if (Request.Form[TabName.UniqueID].Contains("gdvBankList")) { TabName.Value = "tab2"; } else if (Request.Form[TabName.UniqueID].Contains("gvAddress")) { TabName.Value = "tab3"; } else if (Request.Form[TabName.UniqueID].Contains("gvDocumentsList")) { TabName.Value = "tabDocumentsList"; } else { TabName.Value = Request.Form[TabName.UniqueID]; } } } } if (strPreviousPage == "") { Response.Redirect("~/ClientLogin.aspx"); } } catch { lblTitle.Text = "Warning!"; lblTitle.ForeColor = System.Drawing.Color.Red; message.ForeColor = System.Drawing.Color.Red; message.Text = "Sorry, Something went wrong, please contact administrator"; ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true); } }