PageRenderTime 42ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/BaliEnterpriseSystems/BaliEnterpriseSystems/Best.Master.cs

https://github.com/sirivedula/BEST
C# | 54 lines | 50 code | 4 blank | 0 comment | 10 complexity | 89702f4ead95f3e3d414dfb1e723f44f MD5 | raw file
  1. using System;
  2. using System.Collections;
  3. using System.Configuration;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Security;
  8. using System.Web.UI;
  9. using System.Web.UI.HtmlControls;
  10. using System.Web.UI.WebControls;
  11. using System.Web.UI.WebControls.WebParts;
  12. using System.Xml.Linq;
  13. namespace BaliEnterpriseSystems
  14. {
  15. public partial class Best : System.Web.UI.MasterPage
  16. {
  17. protected void Page_Init(object sender, EventArgs e)
  18. {
  19. }
  20. protected void Page_Load(object sender, EventArgs e)
  21. {
  22. if (HttpContext.Current.Session["CurrentUser"] == null)
  23. {
  24. Response.Redirect("Logout.aspx");
  25. }
  26. else if ((!Utils.User.BestUser.IsLoggedIn) && Utils.User.BestUser.initialPassword)
  27. {
  28. Response.Redirect("InitialPasswordChage.aspx");
  29. }
  30. else if (!Utils.User.BestUser.IsLoggedIn)
  31. {
  32. Response.Redirect("NotLoggedIn.aspx");
  33. }
  34. ltrUserName.Text = Utils.User.BestUser.userName;
  35. ltrMainMenu.Text = UtilMenu.MainMenu();
  36. string CenterId = "";
  37. if (HttpContext.Current.Session["UserCenter"] == null)
  38. {
  39. CenterId = Utils.User.BestUser.CurrentCenterId;
  40. HttpContext.Current.Session["UserCenter"] = CenterId;
  41. }
  42. CenterId = HttpContext.Current.Session["UserCenter"].ToString();
  43. if (string.IsNullOrEmpty(CenterId))
  44. {
  45. CenterId = "No Center Assigned";
  46. }
  47. ltrChangeCenter.Text = "<a href=\"ChangeCenter.aspx\" style=\"color:#fff;text-decoration:none;\"><img src=\"images/coins.png\" alt=\"center\" style=\"vertical-align:bottom;\"/>&nbsp;" + CenterId + "</a>";
  48. }
  49. }
  50. }