private void btnDangNhap_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtUser.Text.Trim())) { MessageBox.Show("Không được bỏ trống" + lblUsername.Text.ToLower()); this.txtUser.Focus(); return; } if (string.IsNullOrEmpty(this.txtPass.Text)) { MessageBox.Show("Không được bỏ trống" + lblPass.Text.ToLower()); this.txtPass.Focus(); return; } int kq = dn.Check_Config(); //hàm Check_Config() thuộc Class QL_NguoiDung if (kq == 0) { ProcessLogin();// Cấu hình phù hợp xử lý đăng nhập } if (kq == 1) { MessageBox.Show("Chuỗi cấu hình không tồn tại");// Xử lý cấu hình ProcessConfig(); return; } if (kq == 2) { MessageBox.Show("Chuỗi cấu hình không phù hợp");// Xử lý cấu hình ProcessConfig(); return; } }