Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public IList <SiteBlockEntity> GetList(SiteBlockQuery query)
        {
            ISiteBlockService       service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>();
            IList <SiteBlockEntity> list    = service.GetSiteBlockList(query);

            return(list);
        }
Ejemplo n.º 3
0
        public SiteBlockEntity GetModel(SiteBlockQuery query)
        {
            ISiteBlockService service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>();
            SiteBlockEntity   model   = service.GetSiteBlockModel(query.BlockID);

            return(model);
        }
Ejemplo n.º 4
0
        public Pager <SiteBlockEntity> GetPageList(SiteBlockQuery query)
        {
            ISiteBlockService       service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>();
            Pager <SiteBlockEntity> pager   = service.GetSiteBlockPageList(query);

            return(pager);
        }
Ejemplo n.º 5
0
        public ExecResult Save(SiteBlockEntity model)
        {
            ISiteBlockService service = ServiceContainer.Instance.Container.Resolve <ISiteBlockService>();

            return(service.Save(model));
        }