Esempio n. 1
0
        //
        // GET: EditMode
        // Displays Clan Info in edit mode
        public ActionResult EditMode()
        {
            int?clanId = ClanManager.GetClanId(User.Identity.GetUserId());

            ClanInfoViewModel model = new ClanInfoViewModel((int)clanId, editMode: true);

            return(View("Index", model));
        }
Esempio n. 2
0
        //
        // GET: ClanInfo
        // Displays the Clan Info Tab
        public ActionResult Index()
        {
            int?clanId = ClanManager.GetClanId(User.Identity.GetUserId());

            if (clanId != null && clanId != 0)
            {
                ClanInfoViewModel clanInfo = new ClanInfoViewModel((int)clanId, editMode: false);

                return(View(clanInfo));
            }

            // Needs to be changed to redirect to a custom error page. ES
            return(RedirectToAction("JoinOrRegister", "MyClan"));
        }