Пример #1
0
        public bool Update(Employee employee)
        {
            int id = _cityLogic.SelectIdByName(employee.City);

            if (id == 0)
            {
                _cityLogic.Insert(new City {
                    Name = employee.City
                });
            }

            try
            {
                return(_employeeDao.Update(employee) != 0);
            }
            catch
            {
                return(false);
            }
        }
Пример #2
0
 public void Update(long id, EmployeeParam param)
 {
     Data.Entity.Employee oldEntity = EmployeeDao.Find(id);
     Data.Entity.Employee newEntity = EmployeeParamConverter.Convert(param, null);
     EmployeeDao.Update(newEntity);
 }