Пример #1
0
 private void btnEliminar_Click(object sender, EventArgs e)
 {
     if (surtidorSeleccionado != null)
     {
         fachada.eliminarSurtidor(surtidorSeleccionado.numeroSerie);
         listaSurtidores.Items.Clear();
         foreach (Surtidor s in fachada.getListaSurtidores())
         {
             listaSurtidores.Items.Add(s);
         }
         listaSurtidores.Show();
         surtidorSeleccionado = null;
         borrarDatos();
     }
     else
     {
         MessageBox.Show("Debe seleccionar un surtidor");
     }
 }