Example #1
0
        public ActionResult CreateUser()
        {
            if (HttpContext.User.IsInRole("Gamer"))
            {
                return(RedirectToAction("Index", "Dashboard"));
            }

            try
            {
                _model.GamerTypes          = _service.GetAllGamerTypes();
                _model.SelectListGamerType = GetSelectListItems(_service.GetAllGamerTypeNames());
            }
            catch (BeerException e)
            {
                _model.ErrorMessage = e.Message;
            }

            return(View(_model));
        }