Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /ServerController.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (hide annotations) (download) (as text)
Sat Aug 27 13:22:00 2016 UTC (7 years, 6 months ago) by yamat0jp
File MIME type: text/x-pascal
File size: 1518 byte(s)
暫く制作から離れたいのでコミット
データベースに追加したフィールドがありますメンテナンスフォームも一応表示できます
1 yamat0jp 1 unit ServerController;
2    
3     interface
4    
5     uses
6     SysUtils, Classes, IWServerControllerBase, IWBaseForm, HTTPApp,
7     // For OnNewSession Event
8 yamat0jp 2 UserSessionUnit, IWApplication, IWAppForm, IW.Browser.Browser;
9 yamat0jp 1
10     type
11     TIWServerController = class(TIWServerControllerBase)
12     procedure IWServerControllerBaseNewSession(ASession: TIWApplication);
13 yamat0jp 19 procedure IWServerControllerBaseBeforeRender(ASession: TIWApplication;
14     AForm: TIWBaseForm; var VNewForm: TIWBaseForm);
15 yamat0jp 1
16     private
17 yamat0jp 19
18 yamat0jp 1 public
19     end;
20    
21 yamat0jp 19 function UserSession: TIWUserSession;
22     function IWServerController: TIWServerController;
23 yamat0jp 1
24     implementation
25    
26     {$R *.dfm}
27    
28     uses
29 yamat0jp 19 IWInit, IWGlobal, Unit14, Unit3, Unit13;
30 yamat0jp 1
31     function IWServerController: TIWServerController;
32     begin
33     Result := TIWServerController(GServerController);
34     end;
35    
36     function UserSession: TIWUserSession;
37     begin
38     Result := TIWUserSession(WebApplication.Data);
39     end;
40    
41 yamat0jp 19 procedure TIWServerController.IWServerControllerBaseBeforeRender
42     (ASession: TIWApplication; AForm: TIWBaseForm; var VNewForm: TIWBaseForm);
43 yamat0jp 1 begin
44 yamat0jp 19 if (AForm is TMasterFOrm = false)and(DM.FDTable3.FieldByName('ENABLE').AsBoolean = false) then
45     begin
46     VNewForm := TMentenance.Create(WebApplication);
47     AForm.Release;
48     AForm := nil;
49     end;
50     end;
51    
52     procedure TIWServerController.IWServerControllerBaseNewSession
53     (ASession: TIWApplication);
54     begin
55 yamat0jp 2 ASession.Data := TIWUserSession.Create(nil, ASession);
56 yamat0jp 1 end;
57    
58     initialization
59    
60 yamat0jp 19 TIWServerController.SetServerControllerClass;
61    
62 yamat0jp 1 end.

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26