?? studentlogin.~pas
字號:
unit studentlogin;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, DBTables, StdCtrls;
type
TForm9 = class(TForm)
Label1: TLabel;
Label2: TLabel;
i_user1: TEdit;
Label3: TLabel;
i_passwd1: TEdit;
B_login1: TButton;
B_cancel1: TButton;
T_user1: TTable;
procedure B_login1Click(Sender: TObject);
procedure B_cancel1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form9: TForm9;
implementation
uses studentsystem, teacherlogin, studentsys, teach;
{$R *.dfm}
procedure TForm9.B_login1Click(Sender: TObject);
begin
try
T_user1.Filter :='ID='''+i_user1.text+'''';
T_user1.Filtered :=true;
T_user1.Open ;
except
Application.MessageBox ('請與系統管理員聯系','數據庫連接錯誤',MB_OK);
Application.Terminate ;
end;
if T_user1.RecordCount =1 then
begin
if T_user1['PASSWD']=i_passwd1.Text then
begin
if T_user1['AUTHORITY']='1' then
begin
form9.Hide;
form13.show;
i_user1.Text :=' ';
i_passwd1.Text :=' ';
end
else
Application.MessageBox('請選擇合適的登錄軟件','用戶權限錯誤',MB_OK);
end
else
Application.MessageBox('請確認密碼,注意大小寫','密碼不正確',MB_OK);
end
else
Application.MessageBox('請確認用戶名是否正確!','無此用戶',MB_OK);
end;
procedure TForm9.B_cancel1Click(Sender: TObject);
begin
form9.Hide ;
form3.show;
end;
procedure TForm9.FormCreate(Sender: TObject);
begin
i_user1.Text :=' ';
i_passwd1.Text :=' ';
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -