public ActionResult Delete(JobCardView jobCard) { try { if (jobCard.JobCardID != 0) { JobCardManager manager = new JobCardManager(); manager.DeleteJobCard(jobCard); return(RedirectToAction("Index")); } return(View(jobCard)); } catch { return(View()); } }