Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int n = 0;

            try
            {
                n = Convert.ToInt32(textBox7.Text);
            }
            catch (Exception error)
            {
                Console.WriteLine(error);
                MessageBox.Show("numero civico non valido, RINSERIRE");
            }

            if (n != 0 && check())
            {
                Indirizzo indirizzo = new Indirizzo(textBox6.Text, n, textBox8.Text, comboBox1.SelectedItem.ToString());
                string    id        = concessionaria.generatoreIDCliente();
                Cliente   cliente   = new Cliente(textBox1.Text, textBox2.Text, textBox3.Text, textBox5.Text, textBox9.Text, id, indirizzo);
                concessionaria.registrazioneUtente(cliente);
                MessageBox.Show("Registrazione avvenuta con successo... Il suo id: " + id);
                this.Close();
            }
            else
            {
                MessageBox.Show("Riempire tutti i campi");
            }
        }
Пример #2
0
        private void provinciaLoad()
        {
            Indirizzo indirizzo = new Indirizzo();

            foreach (string prov in indirizzo.abbr())
            {
                comboBox1.Items.Add(prov);
            }
        }
Пример #3
0
 public Cliente(string n, string s, string c, string e, string p, string d, Indirizzo i)
 {
     name      = n;
     surname   = s;
     contact   = c;
     email     = e;
     password  = p;
     id        = d;
     indirizzo = i;
 }
Пример #4
0
 public Cliente()
 {
     name      = "z";
     surname   = "z";
     contact   = "z";
     email     = "[email protected]";
     password  = "******";
     id        = "z";
     indirizzo = new Indirizzo();
 }