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