private void OnAdd() { SelectedItem = new EmployeeViewModel(new Data.Employee(), eventAggregator); SelectedItem.Current.Status = Status.Added; this.Employers.Add(SelectedItem); RaiseRefresh(); }
private void LoadCountry(EmployeeViewModel target) { if (target == null) { SelectedCountry = null; return; } else { var country = Countries.FirstOrDefault(p => p.Current.Id == target.Current.CountryID); if (country != null) { SelectedCountry = country; eventAggregator.GetEvent<ComboChangeEvent>().Publish(SelectedCountry); } } }