Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ado_project dd = new ado_project();

            try
            {
                Int64  idd                  = value;
                string comp_name            = textBox1.Text;
                string contact_person       = textBox2.Text;
                string address              = textBox3.Text;
                Int64  phone_prim           = Int64.Parse(maskedTextBox1.Text);
                Int64  phone_alt            = Int64.Parse(maskedTextBox2.Text);
                string email                = textBox4.Text;
                Int64  card_numm            = Int64.Parse(maskedTextBox3.Text);
                Int64  cardverification_num = Int64.Parse(maskedTextBox4.Text);
                string cardtype             = comboBox1.Text.ToString();
                Int64  expiration_month     = Int64.Parse(comboBox2.Text.ToString());
                Int64  expiration_year      = Int64.Parse(comboBox3.Text.ToString());
                string card_holder          = textBox5.Text;

                string shipping_address = textBox6.Text;
                string sales_person     = textBox7.Text;
                string customer_note    = textBox8.Text;
                string customer_group   = comboBox6.Text.ToString();
                dd.update_customer(idd, comp_name, contact_person, address, phone_prim, phone_alt, email, card_numm, cardverification_num, cardtype, expiration_month, expiration_year, card_holder, shipping_address, sales_person, customer_note, customer_group);
                MessageBox.Show("done");
                textBox1.Text       = "";
                textBox2.Text       = "";
                textBox3.Text       = "";
                maskedTextBox1.Text = "";
                maskedTextBox2.Text = "";
                textBox4.Text       = "";
                maskedTextBox3.Text = "";
                maskedTextBox4.Text = "";
                comboBox1.Text      = "";
                comboBox2.Text      = "";
                comboBox3.Text      = "";
                textBox5.Text       = "";
                textBox6.Text       = "";
                textBox7.Text       = "";
                textBox8.Text       = "";
                comboBox6.Text      = "";
            }
            catch (Exception)
            { MessageBox.Show("Try Again"); }
        }