public AddWindowViewModel(AddAndEditEmployeeWindow addEmployeeOpen) { addEmployee = addEmployeeOpen; newEmployee = new vwEmployee(); locationList = Service.Service.GetAllLocations(); managerList = Service.Service.GetAllManagers(); genderList = Service.Service.GetAllGenders(); backgroundWorker.DoWork += DoWorkAdd; }
/// <summary> /// Constructor for updating employee /// </summary> public AddWindowViewModel(AddAndEditEmployeeWindow addEmployeeOpen, vwEmployee employee) { isEditingWindow = true; addEmployee = addEmployeeOpen; newEmployee = employee; locationList = Service.Service.GetAllLocations(); managerList = Service.Service.GetAllManagers(employee.employeeId); genderList = Service.Service.GetAllGenders(); backgroundWorker.DoWork += DoWorkAdd; }