예제 #1
0
        private void Add()
        {
            wAddUpdateTarif add = new wAddUpdateTarif(context, true);

            if (add.ShowDialog() == true)
            {
                MessageBox.Show("Объект добавлен");
            }
        }
예제 #2
0
        private void Update()
        {
            var item = (TTarif)dgdTarif.SelectedItem as TTarif;

            wAddUpdateTarif update = new wAddUpdateTarif(context, false);

            update.DataContext = item;
            if (update.ShowDialog() == true)
            {
                MessageBox.Show("Объект изменён");
            }
        }