Ejemplo n.º 1
0
        void BtnEditModificationRow_Click(object sender, RoutedEventArgs e)
        {
            Modification modification = dgvModification.SelectedItem as Modification;

            if (modification == null)
            {
                return;
            }
            ModificationSaveWindow window = new ModificationSaveWindow(null, modification);

            window.ShowDialog();
        }
Ejemplo n.º 2
0
        void BtnAddModification_Click(object sender, RoutedEventArgs e)
        {
            Equipment equipment = dgvEquipment.SelectedItem as Equipment;

            if (equipment == null)
            {
                MessageBox.Show("Выберите оборудование!");
                return;
            }
            ModificationSaveWindow window = new ModificationSaveWindow(equipment);

            window.ShowDialog();
            SetModificationSource();
        }
Ejemplo n.º 3
0
        //Дабл клик по строке таблицы - открывает окно редактирования
        private void ModificationRowDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DataGridRow row = sender as DataGridRow;

            Modification modification = row.Item as Modification;

            if (modification == null)
            {
                return;
            }

            ModificationSaveWindow window = new ModificationSaveWindow(null, modification);

            window.ShowDialog();

            modificationViewSource.View.Refresh();
            dgvModification.CurrentCell = new DataGridCellInfo(row.Item, dgvModification.CurrentCell.Column);
        }