public ActionResult Edit(int id, FilmProducer smodel) { try { FilmProducerDBHandler sdb = new FilmProducerDBHandler(); sdb.UpdateDetails(smodel); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(FilmProducer smodel) { try { if (ModelState.IsValid) { FilmProducerDBHandler sdb = new FilmProducerDBHandler(); if (sdb.AddFilmProducer(smodel)) { ViewBag.Message = "FilmProducer Details Added Successfully"; ModelState.Clear(); } } return(View()); } catch { return(View()); } }