📄 inforeport.pas
字号:
unit InfoReport;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, RpCon, RpConDS, RpDefine, RpRave, StdCtrls, Mask, DBCtrls,
Buttons, RpConBDE, DB, DBTables;
type
TFormInfoReport = class(TForm)
GroupBox1: TGroupBox;
BTNInfo: TBitBtn;
GroupBox2: TGroupBox;
BTNPhoto: TBitBtn;
RvTableConnection1: TRvTableConnection;
RvProject1: TRvProject;
RvTableConnection2: TRvTableConnection;
RvProject2: TRvProject;
BTNClose: TButton;
Table1: TTable;
Table2: TTable;
procedure BTNInfoClick(Sender: TObject);
procedure BTNPhotoClick(Sender: TObject);
procedure BTNCloseClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FormInfoReport: TFormInfoReport;
implementation
uses Main;
{$R *.dfm}
procedure TFormInfoReport.BTNInfoClick(Sender: TObject);
begin
with Table1 do
if not Active then
Open;
RvProject1.Execute;
end;
procedure TFormInfoReport.BTNPhotoClick(Sender: TObject);
begin
with Table2 do
if not Active then
Open;
RvProject2.Execute;
end;
procedure TFormInfoReport.BTNCloseClick(Sender: TObject);
begin
Self.Close;
end;
procedure TFormInfoReport.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
with Table1 do
if Active then
try
Active := not Active;
except
ShowMessage('无法关闭基本信息数据库!');
raise;
end;
with Table2 do
if Active then
try
Active := not Active;
except
ShowMessage('无法关闭照片信息数据库!');
raise;
end;
RvProject1.Destroy;
RvProject2.Destroy;
RvTableConnection1.Destroy;
RvTableConnection2.Destroy;
FormMain.Show;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -