コード例 #1
0
ファイル: ReportController.cs プロジェクト: CivilPol/Vodigi
 private void SavePageState(ReportPlayerScreenContentLogPageState pagestate)
 {
     Session["ReportPlayerScreenContentLogPageState"] = pagestate;
 }
コード例 #2
0
ファイル: ReportController.cs プロジェクト: CivilPol/Vodigi
        private ReportPlayerScreenContentLogPageState GetReportPlayerScreenContentLogPageState()
        {
            try
            {
                ReportPlayerScreenContentLogPageState pagestate = new ReportPlayerScreenContentLogPageState();

                // Initialize the session values if they don't exist - need to do this the first time controller is hit
                if (Session["ReportPlayerScreenContentLogPageState"] == 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.ContentName = String.Empty;
                    pagestate.ContentType = String.Empty;
                    pagestate.StartDate = DateTime.Today.AddDays(-30).ToShortDateString();
                    pagestate.EndDate = DateTime.Today.ToShortDateString();
                    pagestate.SortBy = "DisplayDateTime";
                    pagestate.AscDesc = "Desc";
                    pagestate.PageNumber = 1;
                    Session["ReportPlayerScreenContentLogPageState"] = pagestate;
                }
                else
                {
                    pagestate = (ReportPlayerScreenContentLogPageState)Session["ReportPlayerScreenContentLogPageState"];
                }
                return pagestate;
            }
            catch { return new ReportPlayerScreenContentLogPageState(); }
        }