Module SalesP.wo
1Use cWebBusinessProcess.pkg
2Use DataDict.pkg
3Use cWebReport.pkg
4Use SalesP.DD
5
6Object oSalesP is a cWebBusinessProcess
7 Set pbClearAfterSave to False
8 Set psDescription to "Sales Person: Entry, Reporting, Maintenance"
9
10 Object SalesP_DD is a Salesp_DataDictionary
11 Send DefineAllExtendedFields
12 End_Object // SalesP_DD
13
14 Set Main_DD to SalesP_DD
15
16 Object oReport is a cWebReport
17
18 Procedure OnPageTop
19 Send WriteHtmlTableBegin 'border="0" width="99%" Class="ReportTable"'
20
21 Send WriteHtmlRowBegin
22 Send WriteHtmlCellHeader 'ID' 'Class="Header" Align="left"'
23 Send WriteHtmlCellHeader 'Sales Person Name' 'Class="Header" Align="left"'
24 Send WriteHtmlRowEnd
25 End_Procedure // OnPageTop
26
27 Procedure OnBody
28 String sText sId sName
29
30 Get ddValueEncode "Salesp.ID" To sId
31 Get ddValueEncode "Salesp.Name" To sName
32 Send WriteHtmlRowBegin
33 Get AddRowIdLink sId To sText
34 Send WriteHtmlCell sText 'Class="Data" Align="left"'
35 Send WriteHtmlCell sName 'Class="Data" Align="left"'
36 Send WriteHtmlRowEnd
37 End_Procedure // OnBody
38
39 Procedure OnPageBottom
40 Send WriteHtmlTableEnd
41 End_Procedure // OnPageBottom
42
43 Function RunSalesPList Integer iIndex RowId riStart Integer iMax Returns rowId
44 Rowid riEnd
45 Integer iStat
46
47 Set piOrdering To iIndex
48 Set piMaxCount To iMax
49 Set piMaxCountBreakLevel To 0
50 Set priStartRowId To riStart
51 Get DoRunReport To iStat
52 Get priLastRowId To riEnd
53 Function_Return riEnd
54 End_Function // RunSalesPList
55
56 End_Object // oReport
57
58 { Published = True }
59 { Description = "" }
60 Procedure SetHRefName string sName
61 Set psHRefname of oReport to sName
62 End_Procedure // SetHRefName
63
64 { Published = True }
65 { Description = "" }
66 Function RunSalesPList integer iIndex string sStart integer iMax Returns String
67 RowId riEnd
68 Get RunSalesPList of oReport iIndex (DeserializeRowId(sStart)) iMax to riEnd
69 Function_return (SerializeRowId(riEnd))
70 End_Function // RunSalesPList
71
72 // Register WBO interfaces
73 Send RegisterStandardInterface
74 // Send RegisterDebugInterface
75 // Send RegisterFullErrorInterface
76 // Send RegisterAutoEntryInterface
77
78End_Object // oSalesP
79