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; }
private void Set_rows() { this.available_rows = DatabaseHandler.Get_currencies(GlobalVariables.temporary_file_path); this.datagrid_rows = this.available_rows; this.Update_table(); }