Example #1
0
 public ActionResult HubOwnerDestroy([DataSourceRequest] DataSourceRequest request, HubOwnerViewModel hubOwner)
 {
     if (hubOwner != null && ModelState.IsValid)
     {
         var result = _hubOwnerService.FindById(hubOwner.HubOwnerID);
         if (result != null)
         {
             _hubOwnerService.DeleteHubOwner(result);
         }
     }
     return(Json(ModelState.ToDataSourceResult()));
 }
Example #2
0
        public ActionResult DeleteJson([DataSourceRequest] DataSourceRequest request, HubOwnerViewModel viewModel)
        {
            var original = _hubOwnerService.FindById(viewModel.HubOwnerID);

            _hubOwnerService.DeleteHubOwner(original);

            return(Json(new[] { viewModel }.ToDataSourceResult(request, ModelState)));
        }