📄 qiehuan.pas
字号:
unit qiehuan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, ADODB;
type
TPopForm = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Label3: TLabel;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
ADOTable1: TADOTable;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
PopForm: TPopForm;
implementation
uses unit1,stu_use;
{$R *.dfm}
procedure TPopForm.Button1Click(Sender: TObject);
var
results:boolean ;
begin
ADOTable1.Close ;
ADOTable1.Open ;
ADOTable1.Active;
if edit1.Text='' then
application.MessageBox('用户名不能为空','提示',mb_ok)
else if edit2.Text='' then
application.messagebox('密码不能为空','警告',mb_ok)
else
if ADOTable1.Locate('users'+';'+'password',VarArrayOf([Edit1.Text,Edit2.Text]),[locaseinsensitive]) then
begin
user_no := Edit1.Text ;
Form4.Show ;
close ;
end
else
showmessage('密码错误或用户不存在');
edit1.Clear ;
edit2.Clear ;
end;
procedure TPopForm.Button2Click(Sender: TObject);
begin
Form4.Close ;
close ;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -