예제 #1
0
 public ActionResult Edit(Person person)
 {
     if (ModelState.IsValid)
     {
         PersonService.UpdatePerson(person);
         return RedirectToAction(INDEX_VIEW);
     }
     else
     {
         return View(GetModel(person));
     }
 }
예제 #2
0
 public PersonViewModel(Person person)
 {
     Person = person;
 }
예제 #3
0
 public void UpdatePerson(Person person)
 {
     person.CreatedDate = DateTime.Now;
     PersonRepository.UpdatePerson(person);
 }
예제 #4
0
 public void DeletePerson(Person person)
 {
     PersonRepository.DeletePerson(person);
 }
예제 #5
0
 public ActionResult Delete(Person person)
 {
     PersonService.DeletePerson(person);
     return Json(JSON_SUCCESS, JsonRequestBehavior.AllowGet);
 }
예제 #6
0
 private PersonViewModel GetModel(Person person)
 {
     return new PersonViewModel(person);
 }