Example #1
0
 private void btCrear_Click(object sender, RoutedEventArgs e)
 {
     if (tipo == "animal")
     {
         var        seleccionado = (BomberoComboBox)dgUnidades.SelectedItem;
         AnimalForm form         = new AnimalForm();
         form.ShowDialog();
         obtenerAnimales();
     }
     else if (tipo == "CausaEnfermedadComun")
     {
         var seleccionado = (BomberoComboBox)dgUnidades.SelectedItem;
         CausaEnfermedadComunForm form = new CausaEnfermedadComunForm();
         form.ShowDialog();
         obtenerEnfermedadesComunes();
     }
     else if (tipo == "causaIntoxicacion")
     {
         var seleccionado      = (BomberoComboBox)dgUnidades.SelectedItem;
         IntoxicacionForm form = new IntoxicacionForm();
         form.ShowDialog();
         obtenerCausasDeIntoxicacion();
     }
     else if (tipo == "causaSuicidio")
     {
         var seleccionado       = (BomberoComboBox)dgUnidades.SelectedItem;
         CausaSuicidioForm form = new CausaSuicidioForm();
         form.ShowDialog();
         obtenerCausasSuicidio();
     }
     else if (tipo == "grado")
     {
         var       seleccionado = (BomberoComboBox)dgUnidades.SelectedItem;
         GradoForm form         = new GradoForm();
         form.ShowDialog();
         obtenerGrado();
     }
     else if (tipo == "medioSolicitud")
     {
         var       seleccionado = (BomberoComboBox)dgUnidades.SelectedItem;
         MedioForm form         = new MedioForm();
         form.ShowDialog();
         obtenerMedioSolicitud();
     }
     else if (tipo == "rol")
     {
         var             seleccionado = (BomberoComboBox)dgUnidades.SelectedItem;
         Formularios.Rol form         = new Formularios.Rol();
         form.ShowDialog();
         obtenerRoles();
     }
     else if (tipo == "tipoServicio")
     {
         var seleccionado            = (BomberoComboBox)dgUnidades.SelectedItem;
         TipoServicioVariosForm form = new TipoServicioVariosForm();
         form.ShowDialog();
         obtenerTiposDeServicio();
     }
     else if (tipo == "tipoUnidad")
     {
         var            seleccionado = (BomberoComboBox)dgUnidades.SelectedItem;
         TipoUnidadForm form         = new TipoUnidadForm();
         form.ShowDialog();
         obtenerTiposUnidad();
     }
     else if (tipo == "tipoVehiculo")
     {
         var          seleccionado = (BomberoComboBox)dgUnidades.SelectedItem;
         VehiculoForm form         = new VehiculoForm();
         form.ShowDialog();
         obtenerTiposUnidad();
     }
     actualizarGrid();
 }
 public EditVehiculoForm(VehiculoForm veh)
 {
     InitializeComponent();
     this.vehiculo = veh;
 }
 public CreateVehiculoForm(VehiculoForm vehi)
 {
     InitializeComponent();
     this.vehiculo = vehi;
 }