Exemplo n.º 1
0
        public ExcuteResultEnum DeleteBcGroup(int groupId)
        {
            if (EntityExecution.Count<BcUserInfoEntity>(n => n.GroupId == groupId && n.DeleteFlag == false) > 0)
                return ExcuteResultEnum.IsOccupied;

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

            var entity = new BcGroupEntity();
            entity.GroupId = int.Parse(hdGroupId.Value);
            entity.GroupName = txtGroupName.Text;
            return entity;
        }
Exemplo n.º 3
0
 public void UpdateBcGroup(BcGroupEntity entity)
 {
     entity.Update();
 }
Exemplo n.º 4
0
 public void AddNewBcGroup(BcGroupEntity entity)
 {
     entity.GroupId = null;
     entity.Insert();
 }