//ham thuc thi khi nhan nut cap nhat thong tin private void btInfo_Click(object sender, EventArgs e) { //check null if (txtFullName.Text != "" && txtAge.Text != "" && txtAddress.Text != "" && txtPhoneNumber.Text != "" && cbGender.Text != "") { //kiem tra tuoi la so if (checkNumber(txtAge.Text)) { //kiem tra sdt la so if (checkNumber(txtPhoneNumber.Text)) { //kiem tra cap nhat if (balAccount.UpdateInfoAccount(info.AccID, txtFullName.Text, txtAddress.Text, Convert.ToInt32(txtAge.Text), cbGender.Text, txtPhoneNumber.Text)) { //thanh cong MessageBox.Show("Cập nhật thành công"); InfoUser.statusClose = 2; } else { //that bai MessageBox.Show("Cập nhật thất bại"); } } else { //Ngược Lại //Thông báo cho khách hàng MessageBox.Show("sdt chỉ được nhập số"); } } else { //Ngược Lại //Thông báo cho khách hàng MessageBox.Show("tuổi chỉ được nhập số"); } } else { //Ngược LẠi //Thông Báo cho khách hàng MessageBox.Show("Hãy điền đủ thông tin"); } }