?? enter_log.~pas
字號(hào):
unit enter_log;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, ExtCtrls, DB, DBTables, StdCtrls, Buttons,
ComCtrls;
type
Tlogin_log = class(TForm)
Panel1: TPanel;
Label1: TLabel;
Edit1: TEdit;
DateTimePicker1: TDateTimePicker;
BitBtn1: TBitBtn;
Label2: TLabel;
BitBtn2: TBitBtn;
Query1: TQuery;
DataSource1: TDataSource;
Bevel1: TBevel;
Bevel2: TBevel;
DBGrid1: TDBGrid;
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
login_log: Tlogin_log;
implementation
{$R *.dfm}
procedure Tlogin_log.BitBtn2Click(Sender: TObject);
begin
if edit1.Text='' then
begin
messagebeep(0);
showmessage('請(qǐng)輸入查詢值!');
edit1.SetFocus;
exit;
end;
with Query1 do
begin
close;
SQL.Clear;
SQL.Add('select* from login_log where 操作員=:str1');
parambyName('str1').AsString:=Trim(edit1.Text);
prepare;
open;
end;
if Query1.Eof then
begin
messagebeep(0);
showmessage('沒(méi)有此相關(guān)記錄!');
edit1.SetFocus;
exit;
end
end;
procedure Tlogin_log.BitBtn1Click(Sender: TObject);
begin
with Query1 do
begin
close;
SQL.Clear;
SQL.Add('select* from login_log where 登陸日期=:str1');
parambyName('str1').AsString:=dateToStr(DateTimePicker1.Date);
prepare;
open;
end;
if Query1.Eof then
begin
messagebeep(0);
showmessage('沒(méi)有此相關(guān)記錄!');
exit;
end
end;
end.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -