public ExecResult Del(SiteBlockQuery query) { ExecResult execResult = new ExecResult(); ISiteBlockService service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>(); Int64[] BlockIDs = query.BlockIDs; if (BlockIDs == null) { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "没有删除任何数据!"; return(execResult); } string msg = string.Empty; bool result = service.BatchDeleteSiteBlock(BlockIDs); if (result) { execResult.result = EnumJsonResult.success.ToString(); execResult.msg = "删除内容块成功!"; } else { execResult.result = EnumJsonResult.failure.ToString(); execResult.msg = "删除内容块失败!"; } return(execResult); }
public IList <SiteBlockEntity> GetList(SiteBlockQuery query) { ISiteBlockService service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>(); IList <SiteBlockEntity> list = service.GetSiteBlockList(query); return(list); }
public SiteBlockEntity GetModel(SiteBlockQuery query) { ISiteBlockService service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>(); SiteBlockEntity model = service.GetSiteBlockModel(query.BlockID); return(model); }
public Pager <SiteBlockEntity> GetPageList(SiteBlockQuery query) { ISiteBlockService service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>(); Pager <SiteBlockEntity> pager = service.GetSiteBlockPageList(query); return(pager); }
public ExecResult Save(SiteBlockEntity model) { ISiteBlockService service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>(); return(service.Save(model)); }