borrow.pas
来自「一个很简单的三层数据库程序,包括毕业论文, 因为简单,所以容易供参考学习!」· PAS 代码 · 共 75 行
PAS
75 行
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.
//此源码由程序太平洋收集整理发布,任何人都可自由转载,但需保留本站信息
//╭⌒╮┅~ ¤ 欢迎光临程序太平洋╭⌒╮
//╭⌒╭⌒╮╭⌒╮~╭⌒╮ ︶ ,︶︶
//,︶︶︶︶,''︶~~ ,''~︶︶ ,''
//╔ ╱◥███◣═╬╬╬╬╬╬╬╬╬╗
//╬ ︱田︱田 田 ︱ ╬
//╬ http://www.5ivb.net ╬
//╬ ╭○╮● ╬
//╬ /■\/■\ ╬
//╬ <| || 有希望,就有成功! ╬
//╬ ╬
//╚╬╬╬╬╬╬╬╬╬╬╗ ╔╬╬╬╬╝
//
//说明:
//专业提供VB、.NET、Delphi、ASP、PB源码下载
//包括:程序源码,控件,商业源码,系统方案,开发工具,书籍教程,技术文档
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?