Aggiunta conferma eliminazione pizza
This commit is contained in:
@@ -328,19 +328,20 @@ namespace PizzaExpress_Client
|
||||
if (!int.TryParse(_txtId.Text, out int id))
|
||||
{
|
||||
MessageBox.Show("Seleziona una pizza da eliminare.");
|
||||
return;
|
||||
}
|
||||
else if (MessageBox.Show("Confermi l'eliminazione della pizza selezionata?", "Conferma eliminazione", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
await _httpClient.DeleteAsync($"api/pizze/{id}");
|
||||
|
||||
await _httpClient.DeleteAsync($"api/pizze/{id}");
|
||||
await CaricaPizze();
|
||||
|
||||
await CaricaPizze();
|
||||
|
||||
_lstPizze.ClearSelected();
|
||||
_txtId.Clear();
|
||||
_txtNome.Clear();
|
||||
_txtPrezzo.Clear();
|
||||
_txtNote.Clear();
|
||||
_cmbCategoria.SelectedIndex = -1;
|
||||
_lstPizze.ClearSelected();
|
||||
_txtId.Clear();
|
||||
_txtNome.Clear();
|
||||
_txtPrezzo.Clear();
|
||||
_txtNote.Clear();
|
||||
_cmbCategoria.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
Reference in New Issue
Block a user