예제 #1
0
        public ExcuteResultEnum DeleteBcGroup(int groupId)
        {
            if (EntityExecution.GetEntityCount2<BcUserInfoEntity>(n => n.GroupId == groupId && n.DeleteFlag == false) > 0)
                return ExcuteResultEnum.IsOccupied;

            BcGroupEntity entity = new BcGroupEntity() { GroupId = groupId };
            EntityExecution.DeleteEntity(entity);
            return ExcuteResultEnum.Success;
        }
        private BcGroupEntity PrepareFormData()
        {
            //校验参数的合法性
            this.txtGroupName.Text.InitValidation("组别名称").NotEmpty().ShorterThan(25);

            var entity = new BcGroupEntity();
            entity.GroupId = int.Parse(this.hdGroupId.Value);
            entity.GroupName = this.txtGroupName.Text;
            return entity;
        }
예제 #3
0
 public void UpdateBcGroup(BcGroupEntity entity) { EntityExecution.UpdateEntity(entity); }
예제 #4
0
 public void AddNewBcGroup(BcGroupEntity entity)
 {
     entity.GroupId = null;
     EntityExecution.InsertEntity(entity);
 }