protected void Page_Load(object sender, EventArgs e) { MasterPage.RequiredPermission = 5100; MasterPage.IsSecure = true; if (Session["Curr_Patron"] == null) { Response.Redirect("Default.aspx"); } if (!IsPostBack) { PatronsRibbon.GetByAppContext(this); } if (!IsPostBack) { var patron = (Patron)Session["Curr_Patron"]; MasterPage.PageTitle = string.Format("{0} - {1} {2} ({3})", "Patron Badges", patron.FirstName, patron.LastName, patron.Username); LoadData(); } }
protected void Page_Load(object sender, EventArgs e) { MasterPage.RequiredPermission = 5100; MasterPage.AdditionalRequiredPermission = 2200; MasterPage.IsSecure = true; if (Session["Curr_Patron"] == null) { Response.Redirect("Default.aspx"); } if (!IsPostBack) { PatronsRibbon.GetByAppContext(this); var patron = Session["Curr_Patron"] as DAL.Patron; if (patron == null) { Response.Redirect("Default.aspx"); } MasterPage.PageTitle = string.Format("Patron Program Reward Codes - {0}", DisplayHelper.FormatName(patron.FirstName, patron.LastName, patron.Username)); var programCodes = DAL.ProgramCodes.GetAllForPatron(patron.PID); if (programCodes != null && programCodes.Tables.Count > 0 && programCodes.Tables[0].Rows.Count > 0) { EarnedCodeRepeater.DataSource = programCodes; EarnedCodeRepeater.DataBind(); NoCode.Visible = false; } else { NoCode.Visible = true; } } }
protected void Page_Load(object sender, EventArgs e) { MasterPage.RequiredPermission = 5100; MasterPage.IsSecure = true; if (Session["Curr_Patron"] == null) { Response.Redirect("Default.aspx"); } if (!IsPostBack) { PatronsRibbon.GetByAppContext(this); var patron = (Patron)Session["Curr_Patron"]; MasterPage.PageTitle = string.Format("{0} - {1} {2} ({3})", "Patron Notification", patron.FirstName, patron.LastName, patron.Username); } if (!IsPostBack) { lblPK.Text = Session["NID"] == null ? "" : Session["NID"].ToString(); dv.ChangeMode(lblPK.Text.Length == 0 ? DetailsViewMode.Insert : DetailsViewMode.Edit); Page.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { MasterPage.RequiredPermission = 5100; MasterPage.IsSecure = true; if (Session["Curr_Patron"] == null) { Response.Redirect("Default.aspx"); } var patron = (Patron)Session["Curr_Patron"]; MasterPage.PageTitle = string.Format("{0} - {1} {2} ({3})", "Add Patron Badge", patron.FirstName, patron.LastName, patron.Username); if (!IsPostBack) { PatronsRibbon.GetByAppContext(this); } if (!IsPostBack) { lblPK.Text = string.Empty; dv.ChangeMode(DetailsViewMode.Insert); Page.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { MasterPage.RequiredPermission = 5100; MasterPage.AdditionalRequiredPermission = 5300; MasterPage.IsSecure = true; if (Session["Curr_Patron"] == null) { Response.Redirect("Default.aspx"); } if (!IsPostBack) { PatronsRibbon.GetByAppContext(this); var patron = (Patron)Session["Curr_Patron"]; MasterPage.PageTitle = string.Format("{0} - {1} {2} ({3})", "Patron Reviews", patron.FirstName, patron.LastName, patron.Username); } _mStrSortExp = String.Empty; if (!IsPostBack) { _mStrSortExp = String.Empty; } else { if (null != ViewState["_SortExp_"]) { _mStrSortExp = ViewState["_SortExp_"] as String; } if (null != ViewState["_Direction_"]) { _mSortDirection = (SortDirection)ViewState["_Direction_"]; } } }
protected void Page_Load(object sender, EventArgs e) { MasterPage.RequiredPermission = 5100; MasterPage.IsSecure = true; string currentPatronMode = Session["CURR_PATRON_MODE"] as string; if (!string.IsNullOrEmpty(currentPatronMode)) { switch (currentPatronMode) { case "ADDSUB": MasterPage.PageTitle = "Add Patron SUB Account"; break; case "ADDNEW": MasterPage.PageTitle = "Add Patron Account"; break; case "EDIT": MasterPage.PageTitle = "Patron Account Details"; break; } } if (!IsPostBack) { PatronsRibbon.GetByAppContext(this); } if (!IsPostBack) { if (Request.QueryString["pid"] != null) { int pid = -1; if (int.TryParse(Request.QueryString["pid"].ToString(), out pid)) { Session["CURR_PATRON_ID"] = pid; Session["CURR_PATRON_MODE"] = "EDIT"; var p = Patron.FetchObject(pid); Session["CURR_PATRON"] = p; Response.Redirect(Request.Url.AbsolutePath); } } if (Session["Curr_Patron"] == null) { PatronCtl1.PatronID = string.Empty; PatronCtl1.MasterPatronID = string.Empty; PatronCtl1.LoadControl(); } else { PatronCtl1.PatronID = Session["CURR_PATRON_ID"].ToString(); if (Session["CURR_PATRON_MODE"].ToString() == "EDIT") { var p = Patron.FetchObject(int.Parse(Session["CURR_PATRON_ID"].ToString())); if (p.MasterAcctPID != 0) { PatronCtl1.MasterPatronID = p.MasterAcctPID.ToString(); } else { PatronCtl1.MasterPatronID = string.Empty; } } PatronCtl1.LoadControl(); } } //Session["CURR_PATRON_ID"] = key; //Session["CURR_PATRON"] = Patron.FetchObject(key); }