public ActionResult Delete(int id) { try { ClassHandler iHandler = new ClassHandler(); if (iHandler.DeleteClass(id)) { ViewBag.AlertMsg = "Item Deleted successfully"; } return(RedirectToAction("Index")); } catch (Exception) { return(View()); } }
public void DeleteClass(int cid) { classHandler = new ClassHandler(); classHandler.DeleteClass(cid); }