public List <ChartOfAccount> GetChartOfAccountsByCompany(Company company) { if (company == null) { throw new ArgumentNullException(nameof(company)); } return(ExecuteFaultHandledOperation(() => { var chart_of_accounts = new List <ChartOfAccount>(); var comp = new CompanyData() { CompanyKey = company.CompanyKey }; var chart_of_accounts_data = _chart_of_accounts_repo.GetAll(comp); foreach (ChartOfAccountsData chart_of_account_data in chart_of_accounts_data) { var chart_of_account = _chart_of_accounts_es.Map(chart_of_account_data); chart_of_accounts.Add(chart_of_account); } return chart_of_accounts; })); }
public void LoadDataGrid() { dataGrid.ItemsSource = ChartOfAccountsRepository.GetAll(); dataGrid.AutoGeneratingColumn += DataGridAnswers_AutoGeneratingColumn; }