Ejemplo n.º 1
0
        void BtnEditRow_Click(object sender, RoutedEventArgs e)
        {
            TransportCompany transportCompany = dgvTransportCompany.SelectedItem as TransportCompany;

            if (transportCompany == null)
            {
                return;
            }
            TransportCompanySaveWindow window = new TransportCompanySaveWindow(transportCompany);

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

            TransportCompany transportCompany = row.Item as TransportCompany;

            if (transportCompany == null)
            {
                return;
            }

            TransportCompanySaveWindow window = new TransportCompanySaveWindow(transportCompany);

            window.ShowDialog();


            viewSource.View.Refresh();
            dgvTransportCompany.CurrentCell = new DataGridCellInfo(row.Item, dgvTransportCompany.CurrentCell.Column);
        }
Ejemplo n.º 3
0
        void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            TransportCompanySaveWindow window = new TransportCompanySaveWindow();

            window.ShowDialog();
        }