📄 countfeedm.pas
字号:
unit CountFeeDM;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db, ADODB;
type
TDMCountFee = class(TDataModule)
cnnCountFee: TADOConnection;
tblFeeRate: TADOTable;
tblFeeStation: TADOTable;
tblFestival: TADOTable;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function ActiveDM() : integer;
end;
var
DMCountFee: TDMCountFee;
implementation
uses
GlobalUnit,ConstUnit;
{$R *.DFM}
{ TDMCountFee }
function TDMCountFee.ActiveDM: integer;
begin
if not cnnCountFee.Connected then
begin
cnnCountFee.ConnectionString := GetLocalStr();
cnnCountFee.Connected := True;
with tblFeeRate do
begin
Connection := cnnCountFee;
TableName := 'fee_rate';
Active := True;
end;
with tblFeeStation do
begin
Connection := cnnCountFee;
TableName := 'fee_station';
Active := True;
end;
with tblFestival do
begin
Connection := cnnCountFee;
TableName := 'adm_festival';
Active := True;
end;
end;
Result := 1;
end;
procedure TDMCountFee.DataModuleCreate(Sender: TObject);
begin
Self.ActiveDM;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -