Пример #1
0
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="folder">数据实体</param>
        public void Update(FolderVO folder)
        {
            // check
            FolderEntity entity = folder.ToFolderEntity();

            this.CheckEntity(entity);
            FolderDA.Update(entity);
        }
Пример #2
0
        /// <summary>
        /// 插入数据
        /// </summary>
        /// <param name="folder">数据实体</param>
        public void Insert(FolderVO folder)
        {
            FolderEntity entity = folder.ToFolderEntity();

            this.CheckEntity(entity);
            if (!entity.ParentId.HasValue)
            {
                throw new BusinessException("父节点Id不允许为空");
            }
            else if (CheckParentIsDeleted(entity.ParentId.Value))
            {
                throw new BusinessException("父节点已被删除,请重新刷新页面进行操作");
            }
            FolderDA.Insert(entity);
        }