Esempio n. 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            Motorizzazione mt = new Motorizzazione();

            if (listView2.SelectedItems.Count > 0)
            {
                if (listView2.SelectedItems[0].SubItems[6].Text == "-" && listView2.SelectedItems[0].SubItems[0].Text != "in attesa...")
                {
                    foreach (Offerta offerta in conc.Offerte)
                    {
                        if (offerta.Veicolo.Id == listView2.SelectedItems[0].SubItems[5].Text)
                        {
                            offerta.Veicolo.Targa = mt.getPlate();
                            offerta.Veicolo.AnnoImmatricolazione = DateTime.Now.Year;
                            MessageBox.Show("Targa: " + offerta.Veicolo.Targa + ", Anno Immatricolazione: " + offerta.Veicolo.AnnoImmatricolazione);
                            conc.saveList();
                            secondVisualizer();
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Ordine in attesa oppure targa già presente");
                }
            }
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            textBox3.Enabled = false;
            Motorizzazione mtr   = new Motorizzazione();
            string         targa = mtr.getPlate();

            textBox3.Text = targa;
        }