public ActionResult Edit(int id, IEnumerable <ClanMemberStatsViewModel> memberRankingsFromForm) { ActionResult result = View(); RankingsUpsertViewModel rankingsModelView = new RankingsUpsertViewModel(memberRankingsFromForm.ToList()); RankingsManager.Upsert(rankingsModelView.WarRankings); rankingsModelView = new RankingsUpsertViewModel(id, memberRankingsFromForm.Select(p => p.ClanId).First()); ViewBag.WarId = id; result = View(rankingsModelView); return(result); }
public ActionResult Edit(int id) { 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; ViewBag.WarId = id; ViewBag.IsWarFinalized = ClanWarManager.SelectByClanWarId(id).isFinalized; RankingsUpsertViewModel rankings = new RankingsUpsertViewModel(id, clanId); result = View(rankings); return(result); }
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); }