Esempio n. 1
0
        private void ButtonAddStop(object sender, RoutedEventArgs e)
        {
            Лекарство a       = new Лекарство();
            AddDrug   addDrug = new AddDrug(model, a);

            addDrug.ShowDialog();
            DataGrid.SelectedItem = a;
        }
Esempio n. 2
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            Лекарство a = DataGrid.SelectedItem as Лекарство;

            using (CollectionViewSource.GetDefaultView(Drugss).DeferRefresh())
            {
                AddDrug addDrug = new AddDrug(model, a)
                {
                    Owner = this
                };
                addDrug.ShowDialog();
            }
        }