public void Set_rows(List <RegistryRow> rows) { this.available_rows = rows ; double summatory = 0; foreach (RegistryRow row in this.available_rows) { summatory += row.Amount * DatabaseHandler.Get_single_currency(GlobalVariables.temporary_file_path, row.Currency) / DatabaseHandler.Get_single_currency(GlobalVariables.temporary_file_path, SearchResultsCurrencyButton.Content.ToString()); } SearchResultsSummatory.Text = summatory.ToString(); SearchResultsDialogDataGrid.ItemsSource = this.available_rows; }
public void Set_rows() { this.available_rows = DatabaseHandler.Get_registries(GlobalVariables.temporary_file_path, new RegistrySearchCondition { Default_search = true }); ; double summatory = 0; foreach (RegistryRow row in this.available_rows) { summatory += row.Amount * DatabaseHandler.Get_single_currency(GlobalVariables.temporary_file_path, row.Currency) / DatabaseHandler.Get_single_currency(GlobalVariables.temporary_file_path, RegistryCurrencyButton.Content.ToString()); } RegistrySumatory.Text = summatory.ToString(); RegistryViewDataGrid.ItemsSource = this.available_rows; }