📄 u_form_login.pas
字号:
unit U_Form_Login;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, StdCtrls, ButtonExCtl, ExtCtrls;
type
TForm_Login = class(TForm)
Image1: TImage;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
edit: TButtonExCtl;
exit: TButtonExCtl;
ComboBox1: TComboBox;
Edit1: TEdit;
ADOQuery1: TADOQuery;
procedure exitClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure editClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form_Login: TForm_Login;
implementation
{$R *.dfm}
uses uAdoSet,uGlobal,u_Form_MainMenu;
procedure TForm_Login.exitClick(Sender: TObject);
begin
Close;
end;
procedure TForm_Login.FormCreate(Sender: TObject);
begin
combobox1.Items.Add('张海燕');
///combobox1.Items.Add('鲍士东');
ShowPloyForm(image1.picture.Bitmap,handle);
end;
procedure TForm_Login.editClick(Sender: TObject);
var
param,param1:TStringList;
strSql:string;
begin
param:=TStringList.Create;
param1:=TStringList.Create;
param.Clear;
param1.Clear;
setDbFlag('HRManage');
//////验证登陆信息是否合法/////////////
param.Add('HR1');/////条件1
param.Add(trim(combobox1.text));/////用户名称条件
param.Add(trim(edit1.text));////用户密码条件
strSql:='Select * From HRLogin Where deptName=:s1 and userName=:s2 and UserPwd=:s3';
if isRecordExist(AdoQuery1,strSql,param) then ////验证是否存在
begin
////得到登陆信息///////////////
////////////////////////////////
Application.CreateForm(TForm_MainMenu, Form_MainMenu);
///Form_MainMenu.Show;
end
else
begin
ShowMessage('输入用户名称或密码有误...');
//exit;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -