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 Review", patron.FirstName, patron.LastName, patron.Username);
            }


            if (!IsPostBack)
            {
                lblPK.Text = Session["PRID"] == null ? "" : Session["PRID"].ToString();
                if (lblPK.Text.Length == 0)
                {
                    Response.Redirect("PatronReviews.aspx");
                }
                else
                {
                    dv.ChangeMode(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");
            }

            if (!IsPostBack)
            {
                PatronsRibbon.GetByAppContext(this);

                var patron = (Patron)Session["Curr_Patron"];
                MasterPage.PageTitle = string.Format("{0} - {1} {2} ({3})", "Patron Log Entry", patron.FirstName, patron.LastName, patron.Username);
            }


            if (!IsPostBack)
            {
                if (Session["PLID"] == null || Session["PLID"].ToString() == "")
                {
                    PatronLogEntryCtl1.PatronID       = Session["CURR_PATRON_ID"].ToString();
                    PatronLogEntryCtl1.PatronPointsID = "";
                    PatronLogEntryCtl1.LoadControl();
                }
                else
                {
                    PatronLogEntryCtl1.PatronID       = Session["CURR_PATRON_ID"].ToString();
                    PatronLogEntryCtl1.PatronPointsID = Session["PLID"].ToString();
                    PatronLogEntryCtl1.LoadControl();
                }
            }
        }
Exemplo n.º 3
0
        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("Patron Notification - {0}",
                                                     DisplayHelper.FormatName(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");
            }

            if (!IsPostBack)
            {
                PatronsRibbon.GetByAppContext(this);

                var patron = (Patron)Session["Curr_Patron"];
                MasterPage.PageTitle = string.Format("{0} - {1} {2} ({3})", "Patron Notifications", 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_"];
                }
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 5100;
            MasterPage.IsSecure           = true;
            MasterPage.PageTitle          = "Patron Search";

            _mStrSortExp = String.Empty;
            if (!IsPostBack)
            {
                _mStrSortExp             = "Username";
                _mSortDirection          = SortDirection.Ascending;
                ViewState["_SortExp_"]   = _mStrSortExp;
                ViewState["_Direction_"] = _mSortDirection;
            }
            else
            {
                if (null != ViewState["_SortExp_"])
                {
                    _mStrSortExp = ViewState["_SortExp_"] as String;
                }

                if (null != ViewState["_Direction_"])
                {
                    _mSortDirection = (SortDirection)ViewState["_Direction_"];
                }
            }

            int pageSize = 10;

            if (int.TryParse(SRPSettings.GetSettingValue("PageSize"), out pageSize))
            {
                gv1.PageSize = pageSize;
            }
            else
            {
                this.Log().Error("CR Patron Default couldn't parse page size: {0}",
                                 SRPSettings.GetSettingValue("PageSize"));
            }

            if (!IsPostBack)
            {
                PatronsRibbon.GetByAppContext(this);

                if (Filter.WasFiltered())
                {
                    //Filter.LoadDropdowns();
                    Filter.GetFilterSessionValues();
                    DoFilter();
                }
                else
                {
                    gv1.DataSourceID = null;
                    gv1.DataBind();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 5100;
            MasterPage.IsSecure           = true;
            if (Session["CURR_PATRON_MODE"].ToString() == "ADDSUB")
            {
                MasterPage.PageTitle = string.Format("{0}", "Add Patron SUB Account");
            }
            if (Session["CURR_PATRON_MODE"].ToString() == "ADDNEW")
            {
                MasterPage.PageTitle = string.Format("{0}", "Add Patron Account");
            }

            if (Session["CURR_PATRON_MODE"].ToString() == "EDIT")
            {
                MasterPage.PageTitle = string.Format("{0}", "Patron Account Details");
            }

            if (!IsPostBack)
            {
                PatronsRibbon.GetByAppContext(this);
            }

            if (!IsPostBack)
            {
                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);
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 5100;
            MasterPage.IsSecure           = true;
            MasterPage.PageTitle          = string.Format("{0}", "Patron Search");

            _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_"];
                }
            }

            gv1.PageSize = int.Parse(SRPSettings.GetSettingValue("PageSize"));

            if (!IsPostBack)
            {
                PatronsRibbon.GetByAppContext(this);
            }

            if (!IsPostBack)
            {
                if (Filter.WasFiltered())
                {
                    Filter.LoadDropdowns();
                    Filter.GetFilterSessionValues();
                    DoFilter();
                }
                else
                {
                    gv1.DataSourceID = "";
                    gv1.DataBind();
                }
            }
        }
        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})", "Add Patron Prizes", patron.FirstName, patron.LastName, patron.Username);
            }
        }
Exemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPage.RequiredPermission = 5100;
            MasterPage.IsSecure           = true;

            _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_"];
                }
            }

            gv1.PageSize = int.Parse(SRPSettings.GetSettingValue("PageSize"));

            if (Session["Curr_Patron"] == null)
            {
                Response.Redirect("Default.aspx");
            }

            if (!IsPostBack)
            {
                PatronsRibbon.GetByAppContext(this);
            }


            if (!IsPostBack)
            {
                GetData();
            }
        }
        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;
                }
            }
        }
Exemplo n.º 11
0
        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 = "";
                dv.ChangeMode(DetailsViewMode.Insert);
                Page.DataBind();
            }
        }
Exemplo n.º 12
0
        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);
        }