Exemple #1
0
        private void button1_Click(object sender, EventArgs e) // Đăng kí Sim
        {
            string name    = txtName.Text;
            string address = txtAddress.Text;
            string CMND    = txtPass.Text;
            string phone   = textBox1.Text;
            string job     = textBox2.Text;
            string email   = textBox4.Text;


            int id = int.Parse(textBox3.Text);

            if (cus.AddCus(id, name, address, job, CMND, phone, email) == true && cus.SaveCusSim(name, phone) == true && bill.AddCusBill(name, CMND, address) == true)
            {
                MessageBox.Show(" Thêm dữ liệu thành công");
                txtName.Text    = "";
                txtAddress.Text = "";
                CMND            = txtPass.Text = "";
                phone           = textBox1.Text = "";
                job             = textBox2.Text = "";
                email           = textBox4.Text = "";
            }
            else
            {
                MessageBox.Show(" Lưu thất bại ");
            }
        }