예제 #1
0
        public JsonResult StatusUpdate(PlayModel play)
        {
            play.ModifiedBy = 1;

            PlayModel playmodel = PlayDAC.Upsert(play, true);

            return(Json(playmodel, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        private void DrawLoadCombos()
        {
            List <DrawStatusModel> oStatus = DrawDAC.StatusGet();

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

            ViewBag.Games = oGames;
        }
예제 #3
0
        public ActionResult PlayLoto(long?Id)
        {
            PlayModel oPlay = PlayDAC.Get(new PlayModel {
                Id = Id
            }, true).FirstOrDefault();

            PlayLoadCombos(oPlay.Game.Id, oPlay.CreatedOn);

            return(View(oPlay));
        }
예제 #4
0
        public ActionResult Play(PlayModel play)
        {
            try
            {
                PlayLoadCombos();

                List <PlayModel> oLst = PlayDAC.Get(play, false);

                return(View(oLst));
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #5
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;
            }
        }