protected void Page_Load(object sender, EventArgs e) { LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); setNotifications(); if (!(this.IsPostBack)) { setUrls(); } #region QueryStringBlock if (Request.QueryString["id"] == null) { } else { string EncID = Request.QueryString["id"]; int DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910")); MySessionManager.AppID = DecID; //int DecID = Convert.ToInt32(EncID); MySessionManager.ClientID = Convert.ToInt32(loanApp.getClientID(MySessionManager.AppID)); } LoanType = Convert.ToInt32(loanApp.GetLoanType(MySessionManager.AppID, MySessionManager.ClientID)); setLoanTypeTabs(LoanType); showLoanAppInfo(); if (!(Request.QueryString["ops"] == null)) { if (!(Request.QueryString["tab"] == null)) { if (!(Request.QueryString["tab"] == "")) currentTab = int.Parse(Request.QueryString["tab"]); else currentTab = Convert.ToInt32(MySessionManager.CurrentTab); ops = Request.QueryString["ops"].ToString(); setTab(currentTab); MySessionManager.CurrentTab = currentTab.ToString(); MySessionManager.OpsTab = "load"; string urlpath = util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab"); urlpath = util.RemoveQueryStringByKey(urlpath, "ops"); Response.Redirect(urlpath); } else { if (!(Request.QueryString["tab"] == "")) currentTab = int.Parse(Request.QueryString["tab"]); else if (LoanType == 2 || LoanType == 3) currentTab = 2; else currentTab = 0; ops = "load"; setTab(currentTab); MySessionManager.CurrentTab = currentTab.ToString(); MySessionManager.OpsTab = "load"; util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab"); util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "ops"); } } else { ops = MySessionManager.OpsTab.ToString(); //For handling the tabs if (!(MySessionManager.CurrentTab == "")) currentTab = int.Parse(MySessionManager.CurrentTab); else if (LoanType == 2 || LoanType == 3) { currentTab = 2; MySessionManager.CurrentTab = currentTab.ToString(); } else { currentTab = 0; MySessionManager.CurrentTab = currentTab.ToString(); } setTab(currentTab); } #endregion if ((!(util.alert() == "")) && (MySessionManager.skipAlert == 0)) { this.pAlertmsg.InnerText = util.alert(); // Define the name and type of the client scripts on the page. String csname1 = "PopupScript"; String csname2 = "ButtonClickScript"; Type cstype = this.GetType(); // Get a ClientScriptManager reference from the Page class. ClientScriptManager cs = Page.ClientScript; // Check to see if the startup script is already registered. if (!cs.IsStartupScriptRegistered(cstype, csname1)) { String cstext1 = "alertMessage();"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); } MySessionManager.skipAlert = 1; } }
public void loadTab(int id, string ops) { try { LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); LoanType = Convert.ToInt32(loanApp.GetLoanType(MySessionManager.AppID, MySessionManager.ClientID)); if (LoanType == 1) { for (int j = 0; j < indie.Length; j++) { if (indie[j] == id) { if (ops == "Next") { int m = j + 1; setTab(indie[m]); MySessionManager.CurrentTab = indie[m].ToString(); } else if (ops == "Previous") { if (j > 0) { int m = j - 1; setTab(m); MySessionManager.CurrentTab = indie[m].ToString(); } } } } } else if (LoanType == 2 || LoanType == 3) { for (int j = 0; j < cor.Length; j++) { if (cor[j] == id) { if (ops == "Next") { int m = j + 1; setTab(cor[m]); MySessionManager.CurrentTab = cor[m].ToString(); } else if (ops == "Previous") { if (j > 0) { int m = j - 1; setTab(cor[m]); MySessionManager.CurrentTab = cor[m].ToString(); } } } } } else if (LoanType == 4) { for (int j = 0; j < ent.Length; j++) { if (ent[j] == id) { if (ops == "Next") { int m = j + 1; setTab(ent[m]); MySessionManager.CurrentTab = ent[m].ToString(); } else if (ops == "Previous") { if (j > 0) { int m = j - 1; setTab(ent[m]); MySessionManager.CurrentTab = ent[m].ToString(); } } } } } } catch (Exception ex) { } }
public void loadTab(int id,string ops) { try { LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); LoanType = Convert.ToInt32(loanApp.GetLoanType(MySessionManager.AppID, MySessionManager.ClientID)); if (LoanType == 1) { for (int j = 0; j < indie.Length; j++) { if (indie[j] == id) { if (ops == "Next") { int m = j + 1; setTab(indie[m]); MySessionManager.CurrentTab = indie[m].ToString(); } else if (ops == "Previous") { if (j > 0) { int m = j - 1; setTab(m); MySessionManager.CurrentTab = indie[m].ToString(); } } } } } else if (LoanType == 2 || LoanType == 3) { for (int j = 0; j < cor.Length; j++) { if (cor[j] == id) { if (ops == "Next") { int m = j + 1; setTab(cor[m]); MySessionManager.CurrentTab = cor[m].ToString(); } else if (ops == "Previous") { if (j > 0) { int m = j - 1; setTab(cor[m]); MySessionManager.CurrentTab = cor[m].ToString(); } } } } } else if (LoanType == 4) { for (int j = 0; j < ent.Length; j++) { if (ent[j] == id) { if (ops == "Next") { int m = j + 1; setTab(ent[m]); MySessionManager.CurrentTab = ent[m].ToString(); } else if (ops == "Previous") { if (j > 0) { int m = j - 1; setTab(ent[m]); MySessionManager.CurrentTab = ent[m].ToString(); } } } } } } catch (Exception ex) { } }
protected void Page_Load(object sender, EventArgs e) { LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter(); setNotifications(); if (!(this.IsPostBack)) { setUrls(); } #region QueryStringBlock if (Request.QueryString["id"] == null) { } else { string EncID = Request.QueryString["id"]; int DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910")); MySessionManager.AppID = DecID; //int DecID = Convert.ToInt32(EncID); MySessionManager.ClientID = Convert.ToInt32(loanApp.getClientID(MySessionManager.AppID)); } LoanType = Convert.ToInt32(loanApp.GetLoanType(MySessionManager.AppID, MySessionManager.ClientID)); setLoanTypeTabs(LoanType); showLoanAppInfo(); if (!(Request.QueryString["ops"] == null)) { if (!(Request.QueryString["tab"] == null)) { if (!(Request.QueryString["tab"] == "")) { currentTab = int.Parse(Request.QueryString["tab"]); } else { currentTab = Convert.ToInt32(MySessionManager.CurrentTab); } ops = Request.QueryString["ops"].ToString(); setTab(currentTab); MySessionManager.CurrentTab = currentTab.ToString(); MySessionManager.OpsTab = "load"; string urlpath = util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab"); urlpath = util.RemoveQueryStringByKey(urlpath, "ops"); Response.Redirect(urlpath); } else { if (!(Request.QueryString["tab"] == "")) { currentTab = int.Parse(Request.QueryString["tab"]); } else if (LoanType == 2 || LoanType == 3) { currentTab = 2; } else { currentTab = 0; } ops = "load"; setTab(currentTab); MySessionManager.CurrentTab = currentTab.ToString(); MySessionManager.OpsTab = "load"; util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab"); util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "ops"); } } else { ops = MySessionManager.OpsTab.ToString(); //For handling the tabs if (!(MySessionManager.CurrentTab == "")) { currentTab = int.Parse(MySessionManager.CurrentTab); } else if (LoanType == 2 || LoanType == 3) { currentTab = 2; MySessionManager.CurrentTab = currentTab.ToString(); } else { currentTab = 0; MySessionManager.CurrentTab = currentTab.ToString(); } setTab(currentTab); } #endregion if ((!(util.alert() == "")) && (MySessionManager.skipAlert == 0)) { this.pAlertmsg.InnerText = util.alert(); // Define the name and type of the client scripts on the page. String csname1 = "PopupScript"; String csname2 = "ButtonClickScript"; Type cstype = this.GetType(); // Get a ClientScriptManager reference from the Page class. ClientScriptManager cs = Page.ClientScript; // Check to see if the startup script is already registered. if (!cs.IsStartupScriptRegistered(cstype, csname1)) { String cstext1 = "alertMessage();"; cs.RegisterStartupScript(cstype, csname1, cstext1, true); } MySessionManager.skipAlert = 1; } }