-
Notifications
You must be signed in to change notification settings - Fork 0
/
vente_nw.clw
executable file
·136 lines (132 loc) · 5.17 KB
/
vente_nw.clw
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
MEMBER('ventekweb.clw')
MAP
! WebServer : ActiveTemplate = CloseButton(ABC)
! WebServer : ActiveTemplate = IncludeNetTalkObject(NetTalk)
! WebServer : ActiveTemplate = NetWebServerLogging(NetTalk)
! WebServer : ActiveTemplate = NetWebServerPerformance(NetTalk)
! WebServer : ActiveTemplate = NetWebServerSettings(NetTalk)
! WebServer : ActiveTemplate = NetWebServerGracefulClose(NetTalk)
INCLUDE('ventekweb003.Inc'),ONCE ! In WebHandler so make all procedures in scope
END
! ----------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------
! These procedures support the NetTalk Web Server templates. They are sufficiently generic
! that there is no need to put them in the application true, however are dependant on the
! dictionary and/or application such that they need to be generated, and cannot be inserted
! as methods in the class.
! ----------------------------------------------------------------------------------------
NetWebRelationManager PROCEDURE (FILE p_file)
RM &RelationManager
CODE
RM &= NULL
If p_FILE &= NULL then Return RM.
If p_File &= Relate:vendas.Me.File then RM &= Relate:vendas.
Return RM
! ----------------------------------------------------------------------------------------
NetWebFileNamed PROCEDURE (string p_file)
F &File
CODE
F &= NULL
Case Lower(p_file)
Of 'vendas'
F &= vendas
End
Return F
! ----------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------
! ----------------------------------------------------------------------------------------
NetWebDLL_ventekweb_SendFile PROCEDURE (NetWebServerWorker p_web, string p_Filename, String p_Parent)
loc:parent string(252) ! should always be a lower-case string
loc:done Long
loc:filename string(252)
CODE
loc:parent = p_parent
loc:filename = p_filename
do CaseStart:ventekweb
Return Loc:Done
! ----------------------------------------------------------------
SendFile:ventekweb:R1 Routine
Case lower(loc:filename)
of 'indexpage'
orof 'index.htm'
IndexPage(p_web)
loc:Done = 1 ; Exit
of 'pagefootertag'
orof 'pagefootertag' & '_' & loc:parent
p_web.Ajax = 1
PageFooterTag(p_web)
p_web.Sendfooter(12)
loc:Done = 1
of 'browsevendas'
orof 'browsevendas' & '_' & loc:parent
p_web.MakePage('Browsevendas',Net:Web:Browse,0,'Vendas',,,) !sf1
loc:Done = 1
of 'pageheadertag'
orof 'pageheadertag' & '_' & loc:parent
p_web.Ajax = 1
PageHeaderTag(p_web)
p_web.Sendfooter(12)
loc:Done = 1
End ! Case Loc:filename
! ----------------------------------------------------------------------
ServicesAndMethods:ventekweb routine
!------------------------------------------------------------------------
Case:Updatevendas Routine
Case lower(loc:filename)
of 'updatevendas'
p_web.MakePage('Updatevendas',Net:Web:Form,0,'Update Vendas',,,)
loc:Done = 1 ; Exit
of p_web.nocolon('updatevendas_tabchanged')
Updatevendas(p_web,Net:Web:Div)
loc:Done = 1 ; Exit
of p_web.nocolon('updatevendas_nexttab_0')
Updatevendas(p_web,Net:Web:NextTab)
p_web.Sendfooter(5)
loc:Done = 1 ; Exit
of p_web.nocolon('updatevendas_tab_0')
orof p_web.nocolon('updatevendas_ven:tipovenda_value')
orof p_web.nocolon('updatevendas_ven:tipovenda_value')
orof p_web.nocolon('updatevendas_ven:vendasap_value')
orof p_web.nocolon('updatevendas_ven:vendasap_value')
orof p_web.nocolon('updatevendas_ven:quantidade_value')
orof p_web.nocolon('updatevendas_ven:quantidade_value')
Updatevendas(p_web,Net:Web:Div)
p_web.Sendfooter(11)
loc:Done = 1 ; exit
End ! Case
!------------------------------------------------------------------------
Case:LoginForm Routine
Case lower(loc:filename)
of 'loginform'
p_web.MakePage('LoginForm',Net:Web:Form,0,,,,)
loc:Done = 1 ; Exit
of p_web.nocolon('loginform_tabchanged')
LoginForm(p_web,Net:Web:Div)
loc:Done = 1 ; Exit
of p_web.nocolon('loginform_nexttab_0')
LoginForm(p_web,Net:Web:NextTab)
p_web.Sendfooter(5)
loc:Done = 1 ; Exit
of p_web.nocolon('loginform_tab_0')
orof p_web.nocolon('loginform_loc:login_value')
orof p_web.nocolon('loginform_loc:login_value')
orof p_web.nocolon('loginform_loc:password_value')
orof p_web.nocolon('loginform_loc:password_value')
orof p_web.nocolon('loginform_loc:remember_value')
orof p_web.nocolon('loginform_loc:remember_value')
orof p_web.nocolon('loginform_loc:hash_value')
orof p_web.nocolon('loginform_loc:hash_value')
LoginForm(p_web,Net:Web:Div)
p_web.Sendfooter(11)
loc:Done = 1 ; exit
End ! Case
!------------------------------------------------------------------------
CaseStart:ventekweb routine
do ServicesAndMethods:ventekweb
if loc:done then exit.
do SendFile:ventekweb:R1
if loc:done then exit.
do Case:Updatevendas
if loc:done then exit.
do Case:LoginForm
if loc:done then exit.