public ActionResult DeleteConfirmed(int id) { Referee referee = refereeService.GetById((int)id); refereeService.Delete(referee); return(RedirectToAction("Details", "Tournaments", new { id = referee.TournamentId, active = "Referees" })); }
public ActionResult Delete(int id) { Referee referee = refereeService.Get(id); try { if (referee != null) { refereeService.Delete(referee); refereeService.Commit(); SuccessMessage(FormMessages.DeleteSuccess); } } catch (Exception) { ErrorMessage(FormMessages.DeleteFail); } return(RedirectToAction("Index")); }