コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }