Ejemplo n.º 1
0
        public ClanWarViewModel(int?id, int clanId) : base(clanId)
        {
            if (id != null)
            {
                _clanWar = ClanWarManager.SelectByClanWarId((int)id);
            }

            ClanWarList = ClanWarManager.SelectClanWarsByClanId(clanId);
        }
Ejemplo n.º 2
0
        public ActionResult Index(bool isOverall)
        {
            ActionResult result = View();

            ClanUser clanUser = HttpContext.GetCurrentLoginInformation();

            //TODO //vv If current user was able to get to this point then it belongs to a Clan, but should it be checked still?

            int clanId       = (int)clanUser.clanId;
            int currentWarId = ClanWarManager.SelectClanWarsByClanId(clanId).OrderByDescending(p => p.id).First().id;

            RankingsUpsertViewModel rankings = new RankingsUpsertViewModel(currentWarId, clanId, isOverall);

            ViewBag.IsOverall = isOverall;
            result            = View(rankings);

            return(result);
        }