예제 #1
0
        private void ShowVehicleButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DataRow dr = dsSelected.Tables[0].Rows[DataGridVehicle.SelectedIndex];

                MainVehicle assignmentWindow = new MainVehicle(dr);
                assignmentWindow.ShowDialog();
            }
            catch (IndexOutOfRangeException)
            {
                MessageBoxResult result = MessageBox.Show("Para ver el detalle de un vehículo, selecciona un elemento de la lista",
                                                          "Confirmation",
                                                          MessageBoxButton.OK,
                                                          MessageBoxImage.Warning);
            }
        }
예제 #2
0
        private void AddVehicle_Click(object sender, RoutedEventArgs e)
        {
            MainVehicle vehicleWindow = new MainVehicle();

            vehicleWindow.ShowDialog();
        }