protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Page.Header.DataBind(); try { if (Session["Rolls"] == null) { //Response.Redirect("~/Login.aspx"); ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Your session has been expired');window.location ='https://eapdea.gov.in/ppr/Login.aspx';", true); } else { BindPpprApprovalRequest(); BindNotificationForMark(); BindNotificationMessage(); DataSet ds = new DataSet(); MenuItem itemdashboard = new MenuItem(); itemdashboard.Text = "Home"; if (Session["Roll"] != null) { string Roll = Session["Rolls"].ToString(); if (Roll == "1") { itemdashboard.NavigateUrl = "~/Authenticate/LinMin/Default.aspx"; } else if (Roll == "4") { itemdashboard.NavigateUrl = "~/Authenticate/LinMin/Default.aspx"; } else if (Roll == "3") { itemdashboard.NavigateUrl = "~/Authenticate/DEAAdmin/Default.aspx"; } else if (Roll == "2") { itemdashboard.NavigateUrl = "~/Authenticate/DEAAdmin/Default.aspx"; } else if (Roll == "5") { itemdashboard.NavigateUrl = "~/Authenticate/admin/Default.aspx"; } else if (Roll == "6") { itemdashboard.NavigateUrl = "~/Authenticate/mdb/mdbpprmisreport.aspx"; } } MainMenu.Items.Add(itemdashboard); obj = new AuthenticatedModuleBL(); ds = obj.getLoginRollMenuBL(Session["Rolls"].ToString()); if (ds.Tables[0].Rows.Count > 0) { ds.Relations.Add("ChildRows", ds.Tables[0].Columns["ModuleId"], ds.Tables[1].Columns["ModuleId"]); foreach (DataRow level1datarow in ds.Tables[0].Rows) { MenuItem item = new MenuItem(); item.Text = level1datarow["ModuleName"].ToString(); //itemdashboard.NavigateUrl = Session["Rolls"].ToString() == "2" ? "~/Authenticate/DEAAdmin/Default.aspx" : "~/Authenticate/linmin/Default.aspx"; DataRow[] level2datarows = level1datarow.GetChildRows("ChildRows"); foreach (DataRow level2datarow in level2datarows) { MenuItem Childitem = new MenuItem(); Childitem.Text = level2datarow["FunctionName"].ToString(); Childitem.NavigateUrl = level2datarow["FunctionAddress"].ToString(); if (level2datarow["FunctionAddress"].ToString().Contains(".pdf")) { Childitem.Target = "_blank"; } item.ChildItems.Add(Childitem); } MainMenu.Items.Add(item); } } MenuItem itemlogout = new MenuItem(); itemlogout.Text = "Logout"; itemlogout.NavigateUrl = "~/Logout.aspx"; MenuItem ContactUs = new MenuItem(); ContactUs.Text = "Contact Us"; ContactUs.NavigateUrl = "~/Authenticate/LinMin/Contactus.aspx"; MenuItem itemchangepass = new MenuItem(); itemchangepass.Text = "Change Password"; itemchangepass.NavigateUrl = "~/Authenticate/Admin/ChangePassword.aspx"; MainMenu.Items.Add(itemchangepass); MainMenu.Items.Add(ContactUs); MainMenu.Items.Add(itemlogout); } } catch (Exception ex) { LogError(ex); } } }
protected void Page_Load(object sender, EventArgs e) { Session["PPRId"] = null; Session["PPR2"] = null; string currentPage = Path.GetFileName(Request.Url.AbsolutePath); if (Request.Cookies["PPRCookie"] != null) { HttpCookie getCookie = Request.Cookies.Get("PPRCookie"); string userName = getCookie.Values["ministry"].ToString(); Session["ministry"] = getCookie.Values["ministry"].ToString(); Session["Rolls"] = getCookie.Values["Rolls"].ToString(); Session["LoginId"] = getCookie.Values["LoginId"].ToString(); Session["UserId"] = getCookie.Values["UserId"].ToString(); } if (!IsPostBack) { // Page.Header.DataBind(); // DisplayLastIpDetails(); // DisplayLastLoginDetails(); try { if (Session["Rolls"] == null) { //Response.Redirect("~/Login.aspx"); //ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Your session has been expired');window.location ='https://eapdea.gov.in/ppr/Login.aspx';", true); } else { BindPendingTask(); // BindNotificationForMark(); // BindNotificationMessage(); DataSet ds = new DataSet(); MenuItem itemdashboard = new MenuItem(); itemdashboard.Text = "DashBoard"; if (Session["Rolls"] != null) { string Roll = Session["Rolls"].ToString(); if (Roll == "1") { itemdashboard.NavigateUrl = "~/Authenticate/admin/Default.aspx"; } else if (Roll == "4") { itemdashboard.NavigateUrl = "~/Authenticate/LinMin/Default.aspx"; } else if (Roll == "3") { itemdashboard.NavigateUrl = "~/Authenticate/Nodalofficer/Default.aspx"; } else if (Roll == "2") { itemdashboard.NavigateUrl = "~/Authenticate/DEAAdmin/Default.aspx"; } else if (Roll == "5") { itemdashboard.NavigateUrl = "~/Authenticate/admin/Default.aspx"; } else if (Roll == "6") { itemdashboard.NavigateUrl = "~/Authenticate/mdb/mdbpprmisreport.aspx"; } } MainMenu.Items.Add(itemdashboard); obj = new AuthenticatedModuleBL(); ds = obj.getLoginRollMenuBL(Session["Rolls"].ToString()); if (ds.Tables[0].Rows.Count > 0) { ds.Relations.Add("ChildRows", ds.Tables[0].Columns["ModuleId"], ds.Tables[1].Columns["ModuleId"]); foreach (DataRow level1datarow in ds.Tables[0].Rows) { MenuItem item = new MenuItem(); item.Text = level1datarow["ModuleName"].ToString(); //itemdashboard.NavigateUrl = Session["Rolls"].ToString() == "2" ? "~/Authenticate/DEAAdmin/Default.aspx" : "~/Authenticate/linmin/Default.aspx"; item.NavigateUrl = "javascript:;"; DataRow[] level2datarows = level1datarow.GetChildRows("ChildRows"); foreach (DataRow level2datarow in level2datarows) { MenuItem Childitem = new MenuItem(); Childitem.Text = level2datarow["FunctionName"].ToString(); Childitem.NavigateUrl = level2datarow["FunctionAddress"].ToString(); if (level2datarow["FunctionAddress"].ToString().Contains(".pdf")) { Childitem.Target = "_blank"; } item.ChildItems.Add(Childitem); if (Childitem.NavigateUrl.ToString().Contains(currentPage)) { Title.Text = "PPR - " + Childitem.Text.ToString(); } } MainMenu.Items.Add(item); } } MenuItem itemlogout = new MenuItem(); itemlogout.Text = "Logout"; itemlogout.NavigateUrl = "~/Logout.aspx"; MenuItem ContactUs = new MenuItem(); ContactUs.Text = "Contact Us"; ContactUs.NavigateUrl = "~/Authenticate/LinMin/Contactus.aspx"; MenuItem itemchangepass = new MenuItem(); itemchangepass.Text = "Change Password"; itemchangepass.NavigateUrl = "~/Authenticate/Admin/ChangePassword.aspx"; MainMenu.Items.Add(itemchangepass); MainMenu.Items.Add(ContactUs); MainMenu.Items.Add(itemlogout); } } catch (Exception ex) { LogError(ex); } } }
protected void Page_Load(object sender, EventArgs e) { string currentPage = Path.GetFileName(Request.Url.AbsolutePath); Session["PPRId"] = null; Session["PPR2"] = null; if (Request.Cookies["PPRCookie"] != null) { HttpCookie getCookie = Request.Cookies.Get("PPRCookie"); string userName = getCookie.Values["ministry"].ToString(); Session["ministry"] = getCookie.Values["ministry"].ToString(); Session["Rolls"] = getCookie.Values["Rolls"].ToString(); Session["LoginId"] = getCookie.Values["LoginId"].ToString(); Session["UserId"] = getCookie.Values["UserId"].ToString(); } if (!IsPostBack) { Session["PPRId"] = null; Page.Header.DataBind(); try { DataSet ds = new DataSet(); if (Session["Rolls"] == null) { //Response.Redirect("~/Login.aspx"); //ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Your session has been expired');window.location ='../Default.aspx';", true); } else { BindPpprApprovalRequest(); //BindNotificationForMark(); //BindNotificationMessage(); MenuItem itemdashboard = new MenuItem(); itemdashboard.Text = "DashBoard"; if (Session["Rolls"] != null) { string Roll = Session["Rolls"].ToString(); if (Roll == "1") { itemdashboard.NavigateUrl = "~/Authenticate/admin/Default.aspx"; } else if (Roll == "4") { itemdashboard.NavigateUrl = "~/Authenticate/LinMin/Default.aspx"; } else if (Roll == "3") { itemdashboard.NavigateUrl = "~/Authenticate/Nodalofficer/Default.aspx"; } else if (Roll == "2") { itemdashboard.NavigateUrl = "~/Authenticate/DEAAdmin/Default.aspx"; } else if (Roll == "5") { itemdashboard.NavigateUrl = "~/Authenticate/admin/Default.aspx"; } else if (Roll == "6") { itemdashboard.NavigateUrl = "~/Authenticate/admin/filterreport.aspx"; } } MainMenu.Items.Add(itemdashboard); obj = new AuthenticatedModuleBL(); ds = obj.getLoginRollMenuBL(Session["Rolls"].ToString()); } MenuItem DocumentLog = new MenuItem(); DocumentLog.Text = "Document Log"; DocumentLog.NavigateUrl = "~/DocumentLogModule.aspx"; MainMenu.Items.Add(DocumentLog); MenuItem PPR = new MenuItem(); PPR.Text = "PPR"; PPR.NavigateUrl = "~/PPRModule.aspx"; MainMenu.Items.Add(PPR); MenuItem Posed = new MenuItem(); Posed.Text = "Posed"; Posed.NavigateUrl = "~/PosedModule.aspx"; MainMenu.Items.Add(Posed); MenuItem Pipeline = new MenuItem(); Pipeline.Text = "Pipeline"; Pipeline.NavigateUrl = "~/PipelineModule.aspx"; MainMenu.Items.Add(Pipeline); MenuItem LoanNegotiation = new MenuItem(); LoanNegotiation.Text = "Loan Negotiation"; LoanNegotiation.NavigateUrl = "~/LoanNegotiationModule.aspx"; MainMenu.Items.Add(LoanNegotiation); MenuItem BoardApproval = new MenuItem(); BoardApproval.Text = "Board Approval"; BoardApproval.NavigateUrl = "~/BoardApprovalModule.aspx"; MainMenu.Items.Add(BoardApproval); MenuItem LoanSigning = new MenuItem(); LoanSigning.Text = "Loan Signing"; LoanSigning.NavigateUrl = "~/LoanSigningModule.aspx"; MainMenu.Items.Add(LoanSigning); MenuItem LoanEffectiveness = new MenuItem(); LoanEffectiveness.Text = "Loan Effectiveness"; LoanEffectiveness.NavigateUrl = "~/LoanEffectiveness.aspx"; MainMenu.Items.Add(LoanEffectiveness); MenuItem OnGoing = new MenuItem(); OnGoing.Text = "OnGoing"; OnGoing.NavigateUrl = "~/OnGoing.aspx"; MainMenu.Items.Add(OnGoing); MenuItem itemlogout = new MenuItem(); itemlogout.Text = "Logout"; itemlogout.NavigateUrl = "~/Logout.aspx"; MenuItem ContactUs = new MenuItem(); ContactUs.Text = "Contact Us"; ContactUs.NavigateUrl = "~/Authenticate/LinMin/Contactus.aspx"; MenuItem itemchangepass = new MenuItem(); itemchangepass.Text = "Change Password"; itemchangepass.NavigateUrl = "~/Authenticate/Admin/ChangePassword.aspx"; MainMenu.Items.Add(itemchangepass); MainMenu.Items.Add(ContactUs); MainMenu.Items.Add(itemlogout); } catch (Exception ex) { Alert.show("Session has been expire!"); LogError(ex); } } }