Esempio n. 1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Database db = new Database(this);

            db.INSERT_NEW_CUSTOMER();
            window.UpdateData();
            window.Id = 1;
            this.Close();
        }
Esempio n. 2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            Customers model = new Customers
            {
                Id               = ID,
                Name             = textBox1.Text,
                Surname          = textBox2.Text,
                Phone            = maskedTextBox1.Text,
                Model            = textBox3.Text,
                Date             = dateTimePicker1.Value,
                Description      = textBox4.Text,
                Description_Long = textBox5.Text,
                LastUpdate       = DateTime.Now,
                IsActive         = ACTIVE
            };

            db.UPDATE_CUSTOMER(model);
            window.UpdateData();
            this.Close();
        }