Compare commits
3 Commits
d6c81f8d17
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| b9d2769f6d | |||
| 2b6ee05a67 | |||
| e8782f17c2 |
@@ -52,7 +52,8 @@ namespace PizzaExpress_Client
|
||||
{
|
||||
Text = "Costo",
|
||||
Location = new Point(900, 15),
|
||||
Size = new Size(70, 30)
|
||||
Size = new Size(70, 30),
|
||||
Enabled = false
|
||||
};
|
||||
_btnCosto.Click += BtnCosto_Click;
|
||||
|
||||
@@ -196,9 +197,9 @@ namespace PizzaExpress_Client
|
||||
Padding = new Padding(0, 10, 0, 0)
|
||||
};
|
||||
|
||||
_btnAggiungi = new Button { Text = "Aggiungi", Width = 120 };
|
||||
_btnAggiorna = new Button { Text = "Aggiorna", Width = 120 };
|
||||
_btnElimina = new Button { Text = "Elimina", Width = 120 };
|
||||
_btnAggiungi = new Button { Text = "Aggiungi", Width = 120, Enabled = false };
|
||||
_btnAggiorna = new Button { Text = "Aggiorna", Width = 120, Enabled = false };
|
||||
_btnElimina = new Button { Text = "Elimina", Width = 120, Enabled = false };
|
||||
|
||||
_btnAggiungi.Click += async (s, e) => await AggiungiPizza();
|
||||
_btnAggiorna.Click += async (s, e) => await AggiornaPizza();
|
||||
@@ -209,7 +210,7 @@ namespace PizzaExpress_Client
|
||||
pnlButtons.Controls.Add(_btnAggiorna);
|
||||
pnlButtons.Controls.Add(_btnElimina);
|
||||
|
||||
pnlRight.Controls.Add(pnlButtons, 1, 6);
|
||||
pnlRight.Controls.Add(pnlButtons, 1, 7);
|
||||
|
||||
// ======================================================
|
||||
Controls.Add(pnlRight);
|
||||
@@ -268,6 +269,12 @@ namespace PizzaExpress_Client
|
||||
_txtPrezzo.Text = p.Prezzo.ToString();
|
||||
_cmbCategoria.Text = p.Categoria;
|
||||
_txtNote.Text = p.Note;
|
||||
_cmbStato.Text = p.Stato;
|
||||
|
||||
_btnAggiungi.Enabled = false;
|
||||
_btnElimina.Enabled = true;
|
||||
_btnAggiorna.Enabled = true;
|
||||
_btnCosto.Enabled = true;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
@@ -387,6 +394,11 @@ namespace PizzaExpress_Client
|
||||
_txtNote.Clear();
|
||||
_cmbCategoria.SelectedIndex = -1;
|
||||
_cmbStato.SelectedIndex = -1;
|
||||
|
||||
_btnAggiungi.Enabled = true;
|
||||
_btnElimina.Enabled = false;
|
||||
_btnAggiorna.Enabled = false;
|
||||
_btnCosto.Enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user