Aggiunta conferma eliminazione pizza
This commit is contained in:
@@ -328,9 +328,9 @@ namespace PizzaExpress_Client
|
|||||||
if (!int.TryParse(_txtId.Text, out int id))
|
if (!int.TryParse(_txtId.Text, out int id))
|
||||||
{
|
{
|
||||||
MessageBox.Show("Seleziona una pizza da eliminare.");
|
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();
|
||||||
@@ -342,6 +342,7 @@ namespace PizzaExpress_Client
|
|||||||
_txtNote.Clear();
|
_txtNote.Clear();
|
||||||
_cmbCategoria.SelectedIndex = -1;
|
_cmbCategoria.SelectedIndex = -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
private void BtnCosto_Click(object? sender, EventArgs e)
|
private void BtnCosto_Click(object? sender, EventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user