private void btnPrepararCapacitacion_Click(object sender, RoutedEventArgs e)
 {
     if (cboMateriales.SelectedIndex == -1)
     {
         MessageBox.Show("Seleccione un material");
         cboMateriales.Focus();
     }
     else if (txtCantidad.Text == String.Empty)
     {
         MessageBox.Show("Seleccione la cantidad de materiales");
         txtCantidad.Focus();
     }
     else if (cboCapacitacion.SelectedIndex == -1)
     {
         MessageBox.Show("Seleccione una capacitación");
         cboCapacitacion.Focus();
     }
     else
     {
         bool resultado = _mane.SetMaterialCapacitacion(cboMateriales.SelectedItem.ToString(), Int32.Parse(txtCantidad.Text), Int32.Parse(cboCapacitacion.SelectedItem.ToString()));
         if (resultado)
         {
             MessageBox.Show("Capacitación preparada correctamente", "Éxito");
         }
         else
         {
             MessageBox.Show("Capacitación no se preparó correctamente", "Error");
         }
     }
 }