Пример #1
0
        public void RemoveUser(int userId)
        {
            User user = _userRepository.GetId(userId);

            if (user != null)
            {
                user.IsDeleted = true;
                _userRepository.Update(user);
                _userRepository.Save();
            }
        }
Пример #2
0
        public async Task <bool> Update(SynchronousDb synchronousDb)
        {
            bool result = false;
            await repository.Update(synchronousDb, (item, err) => {
                if (err == null)
                {
                    result = true;
                }
            });

            return(result);
        }
        public async Task <DataBase> AddOrModifyDataBaseAsync(DataBase model, string sOperator)
        {
            DataBase entityDataBase;

            if (model.Id == 0)
            {
                entityDataBase = _mapper.Map <DataBase>(model);
                await _DataBaseRepository.AppendAsync(entityDataBase, sOperator);
            }
            else
            {
                entityDataBase = await _DataBaseRepository.SelectAsync(model.Id);

                if (entityDataBase != null)
                {
                    //_mapper.Map(model, entityDataBase);
                    entityDataBase.SdataBaseName = model.SdataBaseName;
                    _DataBaseRepository.Update(entityDataBase, sOperator);
                }
            }
            return(entityDataBase);
        }
Пример #4
0
 public void UpdateOtdel(Otdel otdel)
 {
     _otdelRepository.Update(otdel);
     _otdelRepository.Save();
 }
Пример #5
0
 /// <summary>
 /// 根据id修改作业
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public bool Update(JobQuartzOutPut input)
 {
     return(_dataBaseRepository.Update(input));
 }
Пример #6
0
 public void UpdateRole(Role role)
 {
     _roleRepository.Update(role);
     _roleRepository.Save();
 }
Пример #7
0
 public void UpdateDepartment(Department department)
 {
     _departmentRepository.Update(department);
     _departmentRepository.Save();
 }
Пример #8
0
 public void UpdateRight(Right right)
 {
     _rightRepository.Update(right);
     _rightRepository.Save();
 }
Пример #9
0
 public void UpdateOtgulRecord(OtgulRecord otgulRecord)
 {
     _otgulRecordRepository.Update(otgulRecord);
     _otgulRecordRepository.Save();
 }