Exemplo n.º 1
0
 private void SuppliersNewButton_OnClick(object sender, RoutedEventArgs e)
 {
     Window dialog = new WindowBase(new SupplierViewDialog())
     {
         Owner = Application.Current.MainWindow
     };
     dialog.Show();
 }
Exemplo n.º 2
0
 private void SuppliersEditButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (SuppliersDataGrid.SelectedIndex > -1)
     {
         var dialog = new WindowBase(new SupplierViewDialog((Supplier)SuppliersDataGrid.SelectedItem))
         {
             Owner = Application.Current.MainWindow
         };
         dialog.Show();
     }
     else
     {
         MessageBox.Show("No supplier selected");
     }
 }