예제 #1
0
        private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
        {
            var window = new EditExchangeWindow((Exchange)ExchangesGrid.SelectedItem);

            window.ShowDialog();
            CollectionViewSource.GetDefaultView(ExchangesGrid.ItemsSource).Refresh();
        }
예제 #2
0
        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();
        }
예제 #3
0
        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));
                }
            }
        }
예제 #4
0
        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();
        }
예제 #5
0
 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));
         }
     }
 }
예제 #6
0
 private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
 {
     var window = new EditExchangeWindow((Exchange)ExchangesGrid.SelectedItem);
     window.ShowDialog();
     CollectionViewSource.GetDefaultView(ExchangesGrid.ItemsSource).Refresh();
 }