コード例 #1
0
        public ActionResult Draw(DrawModel draw)
        {
            DrawLoadCombos();

            if (!draw.DateFrom.HasValue && !draw.DateTo.HasValue)
            {
                draw.DateFrom = DateTime.Now.AddDays(-7);
                draw.DateTo   = DateTime.Now.AddDays(7);
            }

            List <DrawModel> draws = DrawDAC.Get(draw);

            return(View(draws));
        }
コード例 #2
0
        private void PlayLoadCombos(int?GameId = null, DateTime?DateFrom = null)
        {
            List <PlayStatusModel> oStatus = PlayDAC.StatusGet();

            ViewBag.Status = oStatus;
            List <GameModel> oGames = PlayDAC.GamesGet();

            ViewBag.Games = oGames;
            if (GameId.HasValue && DateFrom.HasValue)
            {
                List <DrawModel> oDraws = DrawDAC.Get(new DrawModel {
                    GameId = GameId, DateFrom = DateFrom
                });
                ViewBag.Draws = oDraws;
            }
        }