ukc.pas
资源名称:连锁药店源码.rar [点击查看]
上传用户:jiete_yjc
上传日期:2010-02-11
资源大小:422k
文件大小:2k
源码类别:
医药行业
开发平台:
Delphi
- unit ukc;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, Buttons, DBGridEh, ComCtrls, ExtCtrls,udm,PrnDbgeh,
- Grids;
- type
- Tfkc = class(TForm)
- Label1: TLabel;
- TabControl1: TTabControl;
- Label3: TLabel;
- TabControl2: TTabControl;
- print: TBitBtn;
- DBGridEh1: TDBGridEh;
- PrintDBGridEh1: TPrintDBGridEh;
- BitBtn3: TBitBtn;
- BitBtn5: TBitBtn;
- procedure FormShow(Sender: TObject);
- procedure BitBtn5Click(Sender: TObject);
- procedure printClick(Sender: TObject);
- procedure BitBtn3Click(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- fkc: Tfkc;
- implementation
- {$R *.dfm}
- procedure Tfkc.FormShow(Sender: TObject);
- begin
- label3.Caption:=datetimetostr(date);
- bitbtn5.Click;
- end;
- procedure Tfkc.BitBtn5Click(Sender: TObject);
- var sqlstr:string;
- begin
- sqlstr:='select a.* ,b.* from ypzdk a,kc b where a.id=b.ypid ' ;
- adodm.ttemp.Close;
- adodm.ttemp.CommandText:= sqlstr;
- adodm.ttemp.Open;
- end;
- procedure Tfkc.printClick(Sender: TObject);
- begin
- printdbgrideh1.Title.Text:=' 库 存 一 览 表' ;
- printdbgrideh1.AfterGridText.Text:=datetostr(date);
- printdbgrideh1.Preview;
- end;
- procedure Tfkc.BitBtn3Click(Sender: TObject);
- begin
- close;
- end;
- procedure Tfkc.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- adodm.ttemp.Close;
- action:=cafree;
- end;
- end.