private void btnSignUp_Click(object sender, EventArgs e) { string UserName = txtAccount.Text.Trim(); string PassWord = txtPassword.Text.Trim(); string FullName = txtFullName.Text.Trim(); string Gender = cbbGender.SelectedItem.ToString(); DateTime DateofBirth = dtpDateOfBirth.Value; string PhoneNumber = txtPhone.Text.Trim(); string Email = txtEmail.Text.Trim(); string Province = cbbProvince.SelectedItem.ToString(); string District = cbbDistrict.SelectedItem.ToString(); string Ward = cbbWard.SelectedItem.ToString(); string Street = txtStreet.Text.Trim(); if (iName == "") { iName = "noImageUser.png"; } string Image = iName; bool check = SignUpController.Register_Customer(UserName, PassWord, FullName, Gender, DateofBirth, PhoneNumber, Email, Image, Province, District, Ward, Street, ref err); if (check == true) { DialogResult dialogResult; dialogResult = MessageBox.Show("Bạn đã tạo tài khoản thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); if (dialogResult == DialogResult.OK) { this.Hide(); frmSignIn form = new frmSignIn(); form.ShowDialog(); this.Close(); } } else { MessageBox.Show("Đăng ký thất bại, xin thử lại lần nữa", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } }