protected void Page_Load(object sender, EventArgs e) { try { if (!this.IsPostBack) { //((Main)Master).AuthenticateUser(); if (Session["USER"] == null) { bizMessage bizM = new bizMessage(); this.ucMessanger1.ProcessMessage("Session: " + bizM.GetMessageText("SessionMissing"), Enums.enMsgType.Err, "", null, true); return; } ((Main)Master).HeaderTitle = "Assign Oportunities "; bizUser.enGageUser user = (bizUser.enGageUser)Session["USER"]; PopulateFilters(); FilterGridsUtilities.PopulateRegionsBranchesAndExecutives(user, ddlFilterRegion, ddlFilterBranch, ddlFilterExcutives, (user.Role == (int)Enums.enUserRole.Executive || user.Role == (int)Enums.enUserRole.Branch) ? false : true, true); FilterGridsUtilities.PopulateRegionsBranchesAndExecutives(user, ddlRegion, ddlBranch, ddlExecutive, (user.Role == (int)Enums.enUserRole.Executive || user.Role == (int)Enums.enUserRole.Branch) ? false : true, false); ddlFilterRegion_SelectedIndexChanged(ddlRegion, new EventArgs()); ddlFilterBranch_SelectedIndexChanged(ddlRegion, new EventArgs()); PopulateFollowUps(); } } catch (Exception ex) { bizLog.InsertExceptionLog(ex); Response.Redirect("~/ErrorPage.aspx", false); } }
protected void ddlBranch_SelectedIndexChanged(object sender, EventArgs e) { try { bizUser.enGageUser user = (bizUser.enGageUser)Session["USER"]; FilterGridsUtilities.PopulateExecutives(user, ddlBranch, ddlExecutive, DisableExecutives); } catch (Exception ex) { bizLog.InsertExceptionLog(ex); Response.Redirect("~/ErrorPage.aspx", false); } }
protected void Page_Load(object sender, EventArgs e) { try { using (Timeline.Capture("FollowUps.aspx", "ASP.NET")) { if (!this.IsPostBack) { //((Main)Master).AuthenticateUser(); /********************************/ /* Start Section Authentication */ /********************************/ Stopwatch authenticationStopwatch = Stopwatch.StartNew(); if (Session["USER"] == null) { bizMessage bizM = new bizMessage(); this.ucMessanger1.ProcessMessage("Session: " + bizM.GetMessageText("SessionMissing"), Enums.enMsgType.Err, "", null, true); return; } ((Main)Master).HeaderTitle = "Opportunities on-the-go"; bizUser.enGageUser user = (bizUser.enGageUser)Session["USER"]; authenticationStopwatch.Stop(); Debug.WriteLine("Authentication stop watch " + authenticationStopwatch.ElapsedMilliseconds); /*************************/ /* Start Section Filters */ /*************************/ Stopwatch filtersStopWatch = Stopwatch.StartNew(); PopulateFilters(); filtersStopWatch.Stop(); Debug.WriteLine("Filters stop watch " + filtersStopWatch.ElapsedMilliseconds); /*****************/ /* Start Regions */ /*****************/ Stopwatch regionsStopWatch = Stopwatch.StartNew(); FilterGridsUtilities.PopulateRegionsBranchesAndExecutives(user, ddlRegion, ddlBranch, ddlExecutive, (user.Role == (int)Enums.enUserRole.Executive || user.Role == (int)Enums.enUserRole.Branch) ? false : true, true); regionsStopWatch.Stop(); Debug.WriteLine("Regions stop watch " + regionsStopWatch.ElapsedMilliseconds); /********************/ /* Start Follow Ups */ /********************/ Stopwatch followupsStopWatch = Stopwatch.StartNew(); PopulateFollowUps(); followupsStopWatch.Stop(); Debug.WriteLine("Followups stop watch " + followupsStopWatch.ElapsedMilliseconds); ddlRegion_SelectedIndexChanged(ddlRegion, new EventArgs()); ddlBranch_SelectedIndexChanged(ddlRegion, new EventArgs()); } } } catch (Exception ex) { bizLog.InsertExceptionLog(ex); Response.Redirect("~/ErrorPage.aspx", false); } }