Esempio n. 1
0
 public ActionResult Create(PersonModel personModel)
 {
     if (ModelState.IsValid)
     {
         DataRow row = personModel.ToDataRow<PersonModel>();
         personBusiness.AddPerson(row);
         return RedirectToAction("Index");
     }
     return View();
 }
Esempio n. 2
0
 public ActionResult Edit(PersonModel pm)
 {
     if (ModelState.IsValid)
     {
         DataRow row = pm.ToDataRow<PersonModel>();
         personBusiness.EditPerson(row);
         return RedirectToAction("Index");
     }
     return View(pm);
 }