예제 #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();
        }
예제 #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);
        }
예제 #3
0
        void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            TransportCompanySaveWindow window = new TransportCompanySaveWindow();

            window.ShowDialog();
        }