public ActionResult UpdateJson([DataSourceRequest] DataSourceRequest request, HubOwnerViewModel viewModel) { if (viewModel != null && ModelState.IsValid) { var original = _hubOwnerService.FindById(viewModel.HubOwnerID); original.Name = viewModel.Name; original.LongName = viewModel.LongName; _hubOwnerService.EditHubOwner(original); } return(Json(new[] { viewModel }.ToDataSourceResult(request, ModelState))); }
public ActionResult HubOwnerUpdate([DataSourceRequest] DataSourceRequest request, HubOwnerViewModel hubOwner) { if (hubOwner != null && ModelState.IsValid) { var result = _hubOwnerService.FindById(hubOwner.HubOwnerID); if (result != null) { result.Name = hubOwner.Name; result.LongName = hubOwner.LongName; _hubOwnerService.EditHubOwner(result); } } return(Json(new[] { hubOwner }.ToDataSourceResult(request, ModelState))); }
// // GET: /HubOwners/Details/5 public virtual ViewResult Details(int id) { HubOwner HubOwner = _hubOwnerService.FindById(id); return(View(HubOwner)); }