borrow.pas
来自「利用Delphi6.0和MS Server2000为主要开发工具」· PAS 代码 · 共 56 行
PAS
56 行
unit borrow;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, DBGrids;
type
TFm_borrow = class(TForm)
Label1: TLabel;
Label2: TLabel;
DBGrid1: TDBGrid;
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Fm_borrow: TFm_borrow;
implementation
uses data;
{$R *.dfm}
procedure TFm_borrow.Button1Click(Sender: TObject);
begin
fm_data.Cd_borrow.Insert;
fm_data.Cd_borrow.fieldbyname('cardNo').AsString:=edit1.Text;
fm_data.Cd_borrow.FieldByName('bookNo').AsString:=edit2.Text;
fm_data.Cd_borrow.FieldByName('borrowdate').AsDateTime:=date;
try
fm_data.cd_borrow.Post;
fm_data.Cd_borrow.ApplyUpdates(0);
showmessage('图书证办理成功');
except
showmessage('图书证办理失败');
end;
end;
procedure TFm_borrow.Button2Click(Sender: TObject);
begin
close;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?