public ActionResult _SelectAutoGenerateColumns() { var customers = SessionCustomerRepository.All(); return(View(new GridModel { Data = customers, Total = customers.Count })); }
public ActionResult _SaveAutoColumnsEditing(string id) { EditableCustomer customer = SessionCustomerRepository.One(p => p.CustomerID == id); TryUpdateModel(customer); SessionCustomerRepository.Update(customer); return(View(new GridModel(SessionCustomerRepository.All()))); }
public ActionResult ClientRowTemplate_Delete(string id) { var customer = SessionCustomerRepository.One(c => c.CustomerID == id); if (customer != null) { SessionCustomerRepository.Delete(customer); } return(View(new GridModel(SessionCustomerRepository.All()))); }
public ActionResult _DeleteAutoColumnsEditing(string id) { EditableCustomer customer = SessionCustomerRepository.One(p => p.CustomerID == id); if (customer != null) { //Delete the record SessionCustomerRepository.Delete(customer); } //Rebind the grid return(View(new GridModel(SessionCustomerRepository.All()))); }
public ActionResult ServerRowTemplate_Update(string id) { var customer = SessionCustomerRepository.One(c => c.CustomerID == id); if (customer != null) { if (TryUpdateModel(customer)) { SessionCustomerRepository.Update(customer); return(RedirectToAction("ServerRowTemplate", this.GridRouteValues())); } } return(View("ServerRowTemplate", SessionCustomerRepository.All())); }
public ActionResult ClientRowTemplate_Select() { var customers = SessionCustomerRepository.All(); return(View(new GridModel(customers))); }
public ActionResult AutoGenerateColumns() { return(View(SessionCustomerRepository.All())); }
public ActionResult ServerRowTemplate() { var customers = SessionCustomerRepository.All(); return(View(customers)); }