예제 #1
0
        public bool DeleteEmployee(Employee employee)
        {
            bool isDeleted;
            try
            {
                isDeleted = _userAccessor.DeleteEmployee(employee.EmployeeId, employee.FirstName, employee.LastName);
            }
            catch (Exception ex)
            {

                throw new ApplicationException("Unable to delete Employee: " + employee.EmployeeId, ex);
            }
            return isDeleted;
        }
예제 #2
0
        public bool RemoveEmployee(int employeeID)
        {
            bool oneRowRemoved = false;

            try
            {
                oneRowRemoved = (1 == _userAccessor.DeleteEmployee(employeeID));
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Employee Could Not Be Removed", ex);
            }

            return(oneRowRemoved);
        }