コード例 #1
0
 public ActionResult Edit(int id, FilmProducer smodel)
 {
     try
     {
         FilmProducerDBHandler sdb = new FilmProducerDBHandler();
         sdb.UpdateDetails(smodel);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
コード例 #2
0
 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());
     }
 }