public virtual ActionResult Delete(PagePublishingQueueItem[] model) { var result = new JsonResultData(ModelState); result.RunWithTry((resultEntry) => { foreach (var item in model) { item.Site = Site; ServiceFactory.PageManager.PagePublishingProvider.Remove(item); } }); return Json(result); }
public virtual ActionResult Delete(PagePublishingQueueItem[] model) { var result = new JsonResultEntry(); try { foreach (var item in model) { item.Site = Site; ServiceFactory.PageManager.PagePublishingProvider.Remove(item); } result.SetSuccess(); } catch (Exception e) { result.SetFailed().AddException(e); } return Json(result); }