public ActionResult CloseOrOpen(int id, bool isClose) { try { // TODO: Add delete logic here tk.CloseOrOpen(id, isClose); return(RedirectToAction("Details", new { id = id })); } catch { return(RedirectToAction("Details", new { id = id })); } }