public virtual ActionResult DailyList()
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageGameDailyStatistics))
            {
                return(AccessDeniedView());
            }

            var model = new GameDailyStatisticsListModel();

            model.BeginDate      = DateTime.Now.AddDays(-7);
            model.AvailableGames = GameType.ScratchCard.ToSelectList(false).ToList();

            return(View(model));
        }
        public virtual ActionResult GameDailyList(DataSourceRequest command, GameDailyStatisticsListModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageGameDailyStatistics))
            {
                return(AccessDeniedView());
            }

            model.EndDate = model.EndDate.AddDays(1);

            var list = _gameStatisticsService.GetGameStatisticsByDate(model.GameType, model.BeginDate, model.EndDate, command.Page - 1, command.PageSize);

            var gridModel = new DataSourceResult
            {
                Data  = _gameStatisticsModelFactory.PrepareGameDailyStatisticsListModel(list),
                Total = list.TotalCount
            };

            return(Json(gridModel));
        }
        public virtual ActionResult ExportXmlAll(GameDailyStatisticsListModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageGameDailyStatistics))
            {
                return(AccessDeniedView());
            }

            model.EndDate = model.EndDate.AddDays(1);

            var list = _gameStatisticsService.GetGameStatisticsByDate(model.GameType, model.BeginDate, model.EndDate);

            try
            {
                var xml = _exportManager.ExportGameDailyStatisticToXml(list);
                return(new XmlDownloadResult(xml, "游戏每日流水.xml"));
            }
            catch (Exception exc)
            {
                //ErrorNotification(exc);
                return(RedirectToAction("List"));
            }
        }