LoginForm1: TLoginForm1;
Implementation
USES the
Admin_main;
{$R *. DFM}
Procedure TLoginForm1. Button1Click (Sender: TObject);
The begin
With Query1 do
The begin
The Close;
SQL. The Clear;
SQL. The Add (' select password, quanxian from login_user ");
SQL. The Add (' where the username=: name ');
ParamByName (' name '). The Value:=Edit1. Text;
The Open;
If FieldByName (" password "). Value<> Null then
The begin
If fieldbyname (" password "). Value=https://bbs.csdn.net/topics/Edit2.Text then
The begin
If FieldByName (' quanxian). Value='https://bbs.csdn.net/topics/admin' then
The begin
LoginForm1. Hide;
AdminMainForm1. Show;
End
The else ShowMessage (' student login ');
End
The else ShowMessage (' wrong password);
End
The else ShowMessage (' user does not exist ');
end;
end;
Perform show method can appear the following error, I baidu said set performance is that what you can, but I tried did not solve the problem, only to turn to
CodePudding user response:
AdminMainForm1 didn't build it,CodePudding user response: