Exemplo n.º 1
0
        private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
        {
            var window = new EditExchangeWindow((Exchange)ExchangesGrid.SelectedItem);

            window.ShowDialog();
            CollectionViewSource.GetDefaultView(ExchangesGrid.ItemsSource).Refresh();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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));
                }
            }
        }
Exemplo n.º 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();
        }
Exemplo n.º 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));
         }
     }
 }
Exemplo n.º 6
0
 private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
 {
     var window = new EditExchangeWindow((Exchange)ExchangesGrid.SelectedItem);
     window.ShowDialog();
     CollectionViewSource.GetDefaultView(ExchangesGrid.ItemsSource).Refresh();
 }