?? 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 + -