private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs) { var window = new EditExchangeWindow((Exchange)ExchangesGrid.SelectedItem); window.ShowDialog(); CollectionViewSource.GetDefaultView(ExchangesGrid.ItemsSource).Refresh(); }
private void ModifyBtn_Click(object sender, RoutedEventArgs e) { if (ExchangesGrid.SelectedItems.Count == 0) { return; } var window = new EditExchangeWindow((Exchange)ExchangesGrid.SelectedItem); window.ShowDialog(); CollectionViewSource.GetDefaultView(ExchangesGrid.ItemsSource).Refresh(); }
private void AddBtn_Click(object sender, RoutedEventArgs e) { var window = new EditExchangeWindow(null); window.ShowDialog(); if (window.ExchangeAdded) { using (var entityContext = new MyDBContext()) { Exchanges.Add(entityContext.Exchanges.First(x => x.Name == window.TheExchange.Name)); } } }
private void ModifyBtn_Click(object sender, RoutedEventArgs e) { if (ExchangesGrid.SelectedItems.Count == 0) return; var window = new EditExchangeWindow((Exchange)ExchangesGrid.SelectedItem); window.ShowDialog(); CollectionViewSource.GetDefaultView(ExchangesGrid.ItemsSource).Refresh(); }