flogin.pas.~11~
来自「delphi2007开发的汽车配件进销存系统.实用级的源码.」· ~11~ 代码 · 共 64 行
~11~
64 行
unit Flogin;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxPC, cxControls, Menus, cxLookAndFeelPainters, cxLabel, StdCtrls,
cxButtons, cxContainer, cxEdit, cxTextEdit, ExtCtrls;
type
TFrmlogin = class(TForm)
cxPageControl1: TcxPageControl;
cxTabSheet1: TcxTabSheet;
cxTextEdit1: TcxTextEdit;
cxButton1: TcxButton;
cxButton2: TcxButton;
cxLabel1: TcxLabel;
cxLabel2: TcxLabel;
cxTextEdit2: TcxTextEdit;
Image1: TImage;
procedure cxButton2Click(Sender: TObject);
procedure cxButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frmlogin: TFrmlogin;
implementation
uses UDM;
{$R *.dfm}
procedure TFrmlogin.cxButton1Click(Sender: TObject);
begin
with DM.connqry do begin
close;
with SQL do begin
Clear;
Add('select * from puser where name=:p_name and psw=:p_psw');
end;
Parameters.ParamByName('p_name').Value:=cxTextEdit1.Text;
Parameters.ParamByName('p_psw').Value:=cxTextEdit2.Text;
Open;
if DM.connqry.RecordCount<=0 then
Application.MessageBox('输入的用户名或密码有误请重新输入?', '提示',
MB_OK + MB_ICONSTOP)
else
Frmlogin.Close;
end;
end;
procedure TFrmlogin.cxButton2Click(Sender: TObject);
begin
Application.Terminate;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?