Home > database >  About the PB
About the PB

Time:09-24

Help!!!!!! Using PB as system login interface code
Int li_n local variable
String id, gs_pw gs_admin global variable

Id=sle_userid. Text
Select the PWD, qx
Into: gs_pw, : gs_admin
The from yhb
Where id=: id;
If id="" or sle_pw. Text=" "then
Messagebox (" prompt ", "user name and password cannot be empty")
The else
If gs_pw=sle_pw. Text then
If gs_admin='1' then
Open (w_student)
The else
If gs_admin='2' then
Open (w_teacher)
The else
Open (w_admin)
End the if
End the if
Close (the parent)
The else
Li_n=li_n - 1
If li_n & lt; & gt; 0 then
Messagebox (" prompt ", "user name and password cannot be empty")
The else
Messagebox (" prompt ", "error more than three times automatically exit")
End the if

CodePudding user response:

More than three times automatically quit useful
Can restart login to enter three times

CodePudding user response:

Li_n should be declared as an instance variable, rather than a local variable
And statement should be assigned to it when the initial value
Instance variables had better begin with ii_
So, you should declare instance variables:
Int ii_n=3
  • Related