void BtnEditRow_Click(object sender, RoutedEventArgs e) { Seller seller = dgvSeller.SelectedItem as Seller; if (seller == null) { return; } SellerSaveWindow window = new SellerSaveWindow(seller); window.ShowDialog(); }
//Дабл клик по строке таблицы - открывает окно редактирования private void RowDoubleClick(object sender, MouseButtonEventArgs e) { DataGridRow row = sender as DataGridRow; Seller seller = row.Item as Seller; if (seller == null) { return; } SellerSaveWindow window = new SellerSaveWindow(seller); window.ShowDialog(); viewSource.View.Refresh(); dgvSeller.CurrentCell = new DataGridCellInfo(row.Item, dgvSeller.CurrentCell.Column); }
void BtnAdd_Click(object sender, RoutedEventArgs e) { SellerSaveWindow window = new SellerSaveWindow(); window.ShowDialog(); }