예제 #1
0
 public ActionResult New()
 {
     var name = new Name();
     if (Request.IsAjaxRequest())
     {
         return PartialView("NewPartial", name);
     }
     return View(name);
 }
예제 #2
0
 public ActionResult Create(Name form)
 {
     _repository.Insert(form);
     _repository.Commit();
     if (Request.IsAjaxRequest())
     {
         return PartialView("ListPartial", form);
     }
     return RedirectToAction("Index");
 }
예제 #3
0
 public ActionResult Update(Name form)
 {
     var original = _repository.FindSingle<Name>(n => n.Id == form.Id);
     original.First = form.First ?? string.Empty;
     original.Last = form.Last ?? string.Empty;
     _repository.Commit();
     if (Request.IsAjaxRequest())
     {
         return PartialView("ListPartial", original);
     }
     return RedirectToAction("Index");
 }
예제 #4
0
 partial void DeleteName(Name instance);
예제 #5
0
 partial void UpdateName(Name instance);
예제 #6
0
 partial void InsertName(Name instance);