private void ButtonAnhadirNuevoAvitu_Click(object sender, RoutedEventArgs e)
 {
     if (indiceCarrera != -1)
     {
         Avituallamiento avitu = new Avituallamiento(logicaNegocio);
         avitu.Show();
     }
 }
 private void ButtonModificarAvi_Click(object sender, RoutedEventArgs e)
 {
     if (TablaAvituallamientos.SelectedIndex != -1)
     {
         AvituallamientoClase avituallamiento = new AvituallamientoClase();
         avituallamiento = (AvituallamientoClase)TablaAvituallamientos.SelectedItem; //tenemos el producto seleccionado
         Avituallamiento avituPantalla = new Avituallamiento(logicaNegocio);
         avituPantalla.Show();
     }
     else
     {
         MessageBox.Show("ERROR!! Debes seleccionar un avituallamiento");
     }
 }
예제 #3
0
        private void ButtonAnhadirAvitu_Click(object sender, RoutedEventArgs e)
        {
            if (TablaProductosTotales.SelectedIndex != -1)
            {
                Producto producto = (Producto)TablaProductosTotales.SelectedItem;//tenemos el producto seleccionado
                logicaNegocio.anhadirProductoAlAvituallamiento(producto);


                this.Close();
                Avituallamiento avitu = new Avituallamiento(logicaNegocio);
                avitu.Show();
            }
            else
            {
                MessageBox.Show("ERROR!! Debes seleccionar un producto");
            }
        }