squestion sanswer vb.net aaa

时间:2017-06-29 06:43:14

标签: mysql vb.net

MysqlConn.Open()
command.Connection = MysqlConn
command.CommandType = CommandType.Text
command.CommandText = "select securityq from admin.customer where securityq = @secuq"
With command.Parameters
   .AddWithValue("@secuq", Label2.Text)
End With
READER = command.ExecuteReader
If READER.HasRows Then
  command.CommandText = "select securitya from admin.customer where securitya = @secuqa"
  With command.Parameters
    .AddWithValue("@secuqa", TextBox2.Text)
  End With
End If

If Label2.Text = TextBox2.Text Or TextBox2.Text = Label2.Text Then
  Panel1.Visible = False
  Panel2.Visible = False
  Panel3.Visible = True
  READER.Close()
Else
  MessageBox.Show(" Incorrect Answer! Please try again. " & count & " tries left")
  TextBox2.Clear()
  Count -= 1
End If

计数正在运行,但安全问题和安全答案匹配无法正常工作

If Count = 0 Then
  MessageBox.Show(" Please contact Admin", " Error! ", MessageBoxButtons.OK, MessageBoxIcon.Error)
  Login.Show()
  Me.Hide()
End If

0 个答案:

没有答案