//GET: Bracket Edit public ActionResult Edit(int id) { var db = new BracketService(); var detail = db.GetBracketById(id); var characterList = new SelectList(db.Characters(), "CharacterId", "CharacterName"); ViewBag.FirstCharacterId = characterList; ViewBag.SecondCharacterId = characterList; ViewBag.ThirdCharacterId = characterList; ViewBag.FourthCharacterId = characterList; ViewBag.FifthCharacterId = characterList; ViewBag.SixthCharacterId = characterList; ViewBag.SeventhCharacterId = characterList; ViewBag.EighthCharacterId = characterList; var model = new BracketEdit { BracketId = detail.BracketId, Location = detail.Location, TournamentName = detail.TournamentName, FirstCharacterId = detail.FirstCharacterEightId, SecondCharacterId = detail.SecondCharacterEightId, ThirdCharacterId = detail.ThirdCharacterEightId, FourthCharacterId = detail.FourthCharacterEightId, FifthCharacterId = detail.FifthCharacterEightId, SixthCharacterId = detail.SixthCharacterEightId, SeventhCharacterId = detail.SeventhCharacterEightId, EighthCharacterId = detail.EighthCharacterEightId, }; return(View(model)); }
//GET: Battle Delete public ActionResult Delete(int id) { var svc = new BracketService(); var model = svc.GetBracketById(id); return(View(model)); }
//POST: Bracket Details public ActionResult Details(int id) { var svc = new BracketService(); var model = svc.GetBracketById(id); if (!ModelState.IsValid) { return(View(model)); } return(View(model)); }