public EditEmployeeViewModel(EditEmployeeView editEmployeeViewOpen, vwEmployee employeeToEdit) { editEmployeeView = editEmployeeViewOpen; this.employee = employeeToEdit; sector = employeeToEdit.SectorName; GenderList = serviceEmployee.GetAllGender(); LocationList = serviceEmployee.GetAllLocations(); ManagerList = serviceEmployee.GetAllManagers(employee); //gets user initial values before editing CheckIsEmployeeChanged = new vwEmployee { Name = employeeToEdit.Name, Surname = employeeToEdit.Surname, NumberOfIdentityCard = employeeToEdit.NumberOfIdentityCard, PhoneNumber = employeeToEdit.PhoneNumber, JMBG = employeeToEdit.JMBG, Gender = employeeToEdit.Gender, Sector = employeeToEdit.Sector, SectorName = employeeToEdit.SectorName, Location = employeeToEdit.Location, Manager = employee.Manager }; }