示例#1
0
        public void AddNewOccupation()
        {
            Occupation newOccupation = new Occupation
            {
                Name = _jobTitle
            };

            _employeeRepository.AddNewOccupation(newOccupation);

            // when a new occupation is added, need to update the combobox
            var occupations = _employeeRepository.getAllOccupations();

            Occupations.Clear();
            Occupations.AddRange(occupations);
        }