예제 #1
0
        private ReportPlayerScreenLogPageState GetReportPlayerScreenLogPageState()
        {
            try
            {
                ReportPlayerScreenLogPageState pagestate = new ReportPlayerScreenLogPageState();

                // Initialize the session values if they don't exist - need to do this the first time controller is hit
                if (Session["ReportPlayerScreenLogPageState"] == null)
                {
                    int accountid = 0;
                    if (Session["UserAccountID"] != null)
                        accountid = Convert.ToInt32(Session["UserAccountID"]);

                    pagestate.AccountID = accountid;
                    pagestate.PlayerName = String.Empty;
                    pagestate.ScreenName = String.Empty;
                    pagestate.StartDate = DateTime.Today.AddDays(-30).ToShortDateString();
                    pagestate.EndDate = DateTime.Today.ToShortDateString();
                    pagestate.SortBy = "DisplayDateTime";
                    pagestate.AscDesc = "Desc";
                    pagestate.PageNumber = 1;
                    Session["ReportPlayerScreenLogPageState"] = pagestate;
                }
                else
                {
                    pagestate = (ReportPlayerScreenLogPageState)Session["ReportPlayerScreenLogPageState"];
                }
                return pagestate;
            }
            catch { return new ReportPlayerScreenLogPageState(); }
        }
예제 #2
0
 private void SavePageState(ReportPlayerScreenLogPageState pagestate)
 {
     Session["ReportPlayerScreenLogPageState"] = pagestate;
 }