public ActionResult Create(MaterialView material) { try { if (ModelState.IsValid) { JobCardManager manager = new JobCardManager(); manager.CreateMaterial(material); return(RedirectToAction("Index")); } return(View()); } catch { return(View()); } }