예제 #1
0
        private void OnSalaryAdded(SalaryAddedMessage message)
        {
            EditableSalaryViewModel salaryViewModel = new EditableSalaryViewModel(salaryValidator);

            salaryViewModel.LoadEntity(message.Content);
            Salaries.Add(salaryViewModel);
            exportCommand.RaiseCanExecuteChanged();
        }
예제 #2
0
        private void AddSalaries(IEnumerable <Salary> importedCollection)
        {
            foreach (var item in importedCollection)
            {
                EditableSalaryViewModel itemViewModel = new EditableSalaryViewModel(salaryValidator);
                itemViewModel.LoadEntity(item);
                Salaries.Add(itemViewModel);
            }

            exportCommand.RaiseCanExecuteChanged();
        }