Пример #1
0
 public ActionResult ContinueGame(int Id)
 {
     try
     {
         if (Session["Account"] == null)
         {
             return(RedirectToAction("SingupAndSignin", "Account"));
         }
         else
         {
             var gameBusiness   = new GameBusiness();
             var encounterGame  = gameBusiness.GetEncounterById(Id);
             var game           = gameBusiness.GetGameInfo(encounterGame.GameId);
             var continueGameVM = new ContinueGameViewModel()
             {
                 Game             = game,
                 EncounterArchive = encounterGame
             };
             return(View(continueGameVM));
         }
     }
     catch
     {
         return(RedirectToAction("SingupAndSignin", "Account"));
     }
 }
Пример #2
0
        public JsonResult GetCotinueGame(int Id)
        {
            var gameBusiness = new GameBusiness();
            var encounter    = gameBusiness.GetEncounterById(Id);
            var game         = gameBusiness.GetGameInfo(encounter.GameId);

            return(Json(game, JsonRequestBehavior.AllowGet));
        }