-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuData.pas
More file actions
59 lines (49 loc) · 1.56 KB
/
uData.pas
File metadata and controls
59 lines (49 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
unit uData;
interface
uses
System.SysUtils, System.Classes, Data.DB, dxmdaset, cxClasses,
dxCore, cxLookAndFeels,
dxSkinsForm, dxBackend, dxBackend.ConnectionString.SQL,
dxBackend.ConnectionString.JSON, dxBackend.ConnectionString.JSON.DataSet;
type
TDataModule1 = class(TDataModule)
mdLayouts: TdxMemData;
dsLayouts: TDataSource;
mdLayoutsLayout: TBlobField;
mdLayoutsName: TWideStringField;
dxBackendDataConnectionManager1: TdxBackendDataConnectionManager;
mdRevenueByIndustry: TdxMemData;
mdRevenueByIndustryCity: TStringField;
mdRevenueByIndustryIndustry: TStringField;
mdRevenueByIndustryState: TStringField;
mdRevenueByIndustryLatitude: TFloatField;
mdRevenueByIndustryLongitude: TFloatField;
mdRevenueByIndustryRevenue: TCurrencyField;
RevenueByIndustryConnection: TdxBackendDataSetJSONConnection;
RevenueByIndustryConnectionItem1: TdxBackendDataSetCollectionItem;
mdLayoutsState: TBlobField;
procedure DataModuleCreate(Sender: TObject);
procedure DataModuleDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
DataModule1: TDataModule1;
implementation
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
const
DataFileName = 'data.dat';
procedure TDataModule1.DataModuleCreate(Sender: TObject);
begin
if FileExists(DataFileName) then
mdLayouts.LoadFromBinaryFile(DataFileName)
end;
procedure TDataModule1.DataModuleDestroy(Sender: TObject);
begin
if mdLayouts.RecordCount > 0 then
mdLayouts.SaveToBinaryFile(DataFileName)
end;
end.