-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTop100DomainsUnit.pas
50 lines (39 loc) · 1.2 KB
/
Top100DomainsUnit.pas
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
unit Top100DomainsUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses,
uniGUIClasses, uniGUIForm, uniGUIBaseClasses, uniBasicGrid, uniDBGrid;
type
TTop100Domains = class(TUniForm)
UniDBGrid1: TUniDBGrid;
procedure UniFormShow(Sender: TObject);
procedure UniFormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
function Top100Domains: TTop100Domains;
implementation
{$R *.dfm}
uses
MainModule;
function Top100Domains: TTop100Domains;
begin
Result := TTop100Domains(UniMainModule.GetFormInstance(TTop100Domains));
end;
procedure TTop100Domains.UniFormClose(Sender: TObject;
var Action: TCloseAction);
begin
UniMainModule.ReportGen.Close;
end;
procedure TTop100Domains.UniFormShow(Sender: TObject);
begin
UniMainModule.ReportGen.Close;
UniMainModule.ReportGen.SQL.Clear;
UniMainModule.ReportGen.SQl.Add('select url_base, count(url_base) from weblogs group by url_base ' +
'order by count(url_base)desc');
UniMainModule.ReportGen.Open;
end;
end.