示例#1
0
        public virtual void DeleteSys(int postId)
        {
            ContentPost post = ContentPost.findById(postId);

            if (post == null)
            {
                return;
            }
            post.SaveStatus = SaveStatus.SysDelete;
            post.update();
            ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.SysDelete, "PostId=" + post.Id);
        }
示例#2
0
        public virtual void Restore(int id)
        {
            ContentPost post = ContentPost.findById(id);

            if (post == null)
            {
                return;
            }
            post.SaveStatus = SaveStatus.Normal;
            post.update();

            ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.Normal, "PostId=" + post.Id);
        }
示例#3
0
 public virtual void DeleteBatch(string ids)
 {
     ContentPost.updateBatch("set SaveStatus=" + SaveStatus.Delete, "Id in (" + ids + ")");
     ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.Delete, "PostId in(" + ids + ")");
 }
示例#4
0
 public virtual void Delete(ContentPost post)
 {
     post.SaveStatus = SaveStatus.Delete;
     post.update();
     ContentPostSection.updateBatch("SaveStatus=" + SaveStatus.Delete, "PostId=" + post.Id);
 }