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; }
public void UpdateBcGroup(BcGroupEntity entity) { EntityExecution.UpdateEntity(entity); }
public void AddNewBcGroup(BcGroupEntity entity) { entity.GroupId = null; EntityExecution.InsertEntity(entity); }