Fix conflitto SCANDALOSO

This commit is contained in:
2026-02-12 09:23:01 +01:00

View File

@@ -196,9 +196,9 @@ namespace PizzaExpress_Client
Padding = new Padding(0, 10, 0, 0) Padding = new Padding(0, 10, 0, 0)
}; };
_btnAggiungi = new Button { Text = "Aggiungi", Width = 120 }; _btnAggiungi = new Button { Text = "Aggiungi", Width = 120, Enabled = false };
_btnAggiorna = new Button { Text = "Aggiorna", Width = 120 }; _btnAggiorna = new Button { Text = "Aggiorna", Width = 120, Enabled = false };
_btnElimina = new Button { Text = "Elimina", Width = 120 }; _btnElimina = new Button { Text = "Elimina", Width = 120, Enabled = false };
_btnAggiungi.Click += async (s, e) => await AggiungiPizza(); _btnAggiungi.Click += async (s, e) => await AggiungiPizza();
_btnAggiorna.Click += async (s, e) => await AggiornaPizza(); _btnAggiorna.Click += async (s, e) => await AggiornaPizza();
@@ -269,6 +269,11 @@ namespace PizzaExpress_Client
_cmbCategoria.Text = p.Categoria; _cmbCategoria.Text = p.Categoria;
_txtNote.Text = p.Note; _txtNote.Text = p.Note;
_cmbStato.Text = p.Stato; _cmbStato.Text = p.Stato;
_btnAggiungi.Enabled = false;
_btnElimina.Enabled = true;
_btnAggiorna.Enabled = true;
_btnCosto.Enabled = true;
} }
// ====================================================================== // ======================================================================
@@ -380,6 +385,11 @@ namespace PizzaExpress_Client
_txtNote.Clear(); _txtNote.Clear();
_cmbCategoria.SelectedIndex = -1; _cmbCategoria.SelectedIndex = -1;
_cmbStato.SelectedIndex = -1; _cmbStato.SelectedIndex = -1;
_btnAggiungi.Enabled = true;
_btnElimina.Enabled = false;
_btnAggiorna.Enabled = false;
_btnCosto.Enabled = false;
} }
} }
} }