Compare commits
2 Commits
1.0.4
...
248b12a6b0
| Author | SHA1 | Date | |
|---|---|---|---|
| 248b12a6b0 | |||
| de1c6821c1 |
@@ -12,7 +12,7 @@ namespace PizzaExpress_Client
|
||||
private readonly TextBox _txtId, _txtNome, _txtPrezzo, _txtRicerca, _txtNote;
|
||||
private readonly ComboBox _cmbCategoria, _cmbStato;
|
||||
|
||||
private readonly Button _btnAggiungi, _btnAggiorna, _btnElimina, _btnElenco, _btnCosto, _btnNuovaPizza;
|
||||
private readonly Button _btnAggiungi, _btnAggiorna, _btnElimina, _btnElenco, _btnIngredienti, _btnNuovaPizza;
|
||||
|
||||
public GestionePizzeForm()
|
||||
{
|
||||
@@ -48,17 +48,16 @@ namespace PizzaExpress_Client
|
||||
AutoSize = true
|
||||
};
|
||||
|
||||
_btnCosto = new Button
|
||||
_btnIngredienti = new Button
|
||||
{
|
||||
Text = "Costo",
|
||||
Location = new Point(900, 15),
|
||||
Size = new Size(70, 30),
|
||||
Enabled = false
|
||||
Text = "Ingredienti",
|
||||
Location = new Point(870, 15),
|
||||
Size = new Size(104, 30)
|
||||
};
|
||||
_btnCosto.Click += BtnCosto_Click;
|
||||
_btnIngredienti.Click += BtnIngredienti_Click;
|
||||
|
||||
pnlTop.Controls.Add(lblTitolo);
|
||||
pnlTop.Controls.Add(_btnCosto);
|
||||
pnlTop.Controls.Add(_btnIngredienti);
|
||||
|
||||
// ======================================================
|
||||
// PANNELLO SINISTRO
|
||||
@@ -367,7 +366,7 @@ namespace PizzaExpress_Client
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
private void BtnCosto_Click(object? sender, EventArgs e)
|
||||
private void BtnIngredienti_Click(object? sender, EventArgs e)
|
||||
{
|
||||
if (_lstPizze.SelectedItem == null)
|
||||
{
|
||||
@@ -375,15 +374,7 @@ namespace PizzaExpress_Client
|
||||
return;
|
||||
}
|
||||
|
||||
var s = _lstPizze.SelectedItem.ToString();
|
||||
var parts = s.Split('-');
|
||||
|
||||
if (parts.Length >= 3)
|
||||
{
|
||||
string nome = parts[1].Trim();
|
||||
string prezzo = parts[2].Replace("€", "").Trim();
|
||||
MessageBox.Show($"La pizza {nome} costa {prezzo}€.");
|
||||
}
|
||||
MessageBox.Show("Funzionalità Ingredienti non ancora implementata.");
|
||||
}
|
||||
|
||||
private void PulisciCampi()
|
||||
|
||||
Reference in New Issue
Block a user