Пример #1
0
        private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var p  = dg.CurrentItem as Product;
            var ew = new EditWindow();

            ew.DataContext = p;
            ew.ShowDialog();
        }
Пример #2
0
        private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var p  = dg.CurrentItem as ProductViewModel;
            var ew = new EditWindow(p.ProductID);

            if (ew.ShowDialog().Value)
            {
                VM.GetAllProducts();
            }
        }