public bool SetUserActiveState(bool active, int employeeID) { bool result = false; try { if (active) { result = 1 == _userAccessor.ActivateEmployee(employeeID); } else { result = 1 == _userAccessor.DeactivateEmployee(employeeID); } if (result == false) { throw new ApplicationException("Employee record not updated."); } } catch (Exception ex) { throw new ApplicationException("Update failed!", ex); } return(result); }
public bool SetEmployeeActiveState(bool active, int employeeID) { bool result = false; try { if (active) { result = (1 == _userAccessor.ActivateEmployee(employeeID)); } else { result = (1 == _userAccessor.DeactivateEmployee(employeeID)); } } catch (Exception ex) { throw new ApplicationException("Active Status Change Failed", ex); } return(result); }