d-mandantfw.w 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. /* Connected Databases
  4. anadat PROGRESS
  5. */
  6. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  7. {adecomm/appserv.i}
  8. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables
  9. /*------------------------------------------------------------------------
  10. File:
  11. Description: from DATA.W - Template For SmartData objects in the ADM
  12. Input Parameters:
  13. <none>
  14. Output Parameters:
  15. <none>
  16. Modified: February 24, 1999
  17. ------------------------------------------------------------------------*/
  18. /* This .W file was created with the Progress AppBuilder. */
  19. /*----------------------------------------------------------------------*/
  20. /* Create an unnamed pool to store all the widgets created
  21. by this procedure. This is a good default which assures
  22. that this procedure's triggers and internal procedures
  23. will execute in this procedure's storage, and that proper
  24. cleanup will occur on deletion of the procedure. */
  25. CREATE WIDGET-POOL.
  26. /* *************************** Definitions ************************** */
  27. /* Parameters Definitions --- */
  28. /* Local Variable Definitions --- */
  29. DEF VAR xWhere AS CHAR NO-UNDO.
  30. DEF VAR xSort AS CHAR NO-UNDO.
  31. DEF VAR Firma AS CHAR NO-UNDO.
  32. DEF VAR SAktiv AS LOG NO-UNDO INIT FALSE.
  33. /* _UIB-CODE-BLOCK-END */
  34. &ANALYZE-RESUME
  35. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  36. /* ******************** Preprocessor Definitions ******************** */
  37. &Scoped-define PROCEDURE-TYPE SmartDataObject
  38. &Scoped-define DB-AWARE yes
  39. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  40. /* Db-Required definitions. */
  41. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  42. &GLOBAL-DEFINE DB-REQUIRED TRUE
  43. &ENDIF
  44. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  45. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  46. &Scoped-define QUERY-NAME Query-Main
  47. /* Internal Tables (found by Frame, Query & Browse Queries) */
  48. &Scoped-define INTERNAL-TABLES Steuer
  49. /* Definitions for QUERY Query-Main */
  50. &Scoped-Define ENABLED-FIELDS Firma Firma1 Firma2 Strasse Ort Fwi01 Fwi02 Fwi03 Fwi04 Fwi05 Fwi06 Fwi07~
  51. Fwi08 Fwi09 Fwi10 Fwc01 Fwc02 Fwc03 Fwc04 Fwc05 Fwc06 Fwc07 Fwc08 Fwc09~
  52. Fwc10 Fwi11 Fwi12 Fwi13 Fwi14 Fwi15 Fwi16 Fwi17 Fwi18 Fwi19 Fwi20 Fwi21~
  53. Fwi22 Fwi23 Fwi24 Fwi25 Fwi26 Fwi27 Fwi28 Fwi29 Fwi30
  54. &Scoped-define ENABLED-FIELDS-IN-Steuer Firma Firma1 Firma2 Strasse Ort ~
  55. Fwi01 Fwi02 Fwi03 Fwi04 Fwi05 Fwi06 Fwi07 Fwi08 Fwi09 Fwi10 Fwc01 Fwc02 ~
  56. Fwc03 Fwc04 Fwc05 Fwc06 Fwc07 Fwc08 Fwc09 Fwc10 Fwi11 Fwi12 Fwi13 Fwi14 ~
  57. Fwi15 Fwi16 Fwi17 Fwi18 Fwi19 Fwi20 Fwi21 Fwi22 Fwi23 Fwi24 Fwi25 Fwi26 ~
  58. Fwi27 Fwi28 Fwi29 Fwi30
  59. &Scoped-Define DATA-FIELDS Firma Firma1 Firma2 Strasse Ort Fwi01 Fwi02 Fwi03 Fwi04 Fwi05 Fwi06 Fwi07~
  60. Fwi08 Fwi09 Fwi10 Fwc01 Fwc02 Fwc03 Fwc04 Fwc05 Fwc06 Fwc07 Fwc08 Fwc09~
  61. Fwc10 Fwi11 Fwi12 Fwi13 Fwi14 Fwi15 Fwi16 Fwi17 Fwi18 Fwi19 Fwi20 Fwi21~
  62. Fwi22 Fwi23 Fwi24 Fwi25 Fwi26 Fwi27 Fwi28 Fwi29 Fwi30
  63. &Scoped-define DATA-FIELDS-IN-Steuer Firma Firma1 Firma2 Strasse Ort Fwi01 ~
  64. Fwi02 Fwi03 Fwi04 Fwi05 Fwi06 Fwi07 Fwi08 Fwi09 Fwi10 Fwc01 Fwc02 Fwc03 ~
  65. Fwc04 Fwc05 Fwc06 Fwc07 Fwc08 Fwc09 Fwc10 Fwi11 Fwi12 Fwi13 Fwi14 Fwi15 ~
  66. Fwi16 Fwi17 Fwi18 Fwi19 Fwi20 Fwi21 Fwi22 Fwi23 Fwi24 Fwi25 Fwi26 Fwi27 ~
  67. Fwi28 Fwi29 Fwi30
  68. &Scoped-Define MANDATORY-FIELDS
  69. &Scoped-Define APPLICATION-SERVICE
  70. &Scoped-Define ASSIGN-LIST
  71. &Scoped-Define DATA-FIELD-DEFS "d-mandantfw.i"
  72. &Scoped-define QUERY-STRING-Query-Main FOR EACH Steuer NO-LOCK INDEXED-REPOSITION
  73. {&DB-REQUIRED-START}
  74. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Steuer NO-LOCK INDEXED-REPOSITION.
  75. {&DB-REQUIRED-END}
  76. &Scoped-define TABLES-IN-QUERY-Query-Main Steuer
  77. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Steuer
  78. /* Custom List Definitions */
  79. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  80. /* _UIB-PREPROCESSOR-BLOCK-END */
  81. &ANALYZE-RESUME
  82. /* ************************ Function Prototypes ********************** */
  83. {&DB-REQUIRED-START}
  84. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  85. FUNCTION openQuery RETURNS LOGICAL
  86. ( /* parameter-definitions */ ) FORWARD.
  87. /* _UIB-CODE-BLOCK-END */
  88. &ANALYZE-RESUME
  89. {&DB-REQUIRED-END}
  90. /* *********************** Control Definitions ********************** */
  91. {&DB-REQUIRED-START}
  92. /* Query definitions */
  93. &ANALYZE-SUSPEND
  94. DEFINE QUERY Query-Main FOR
  95. Steuer SCROLLING.
  96. &ANALYZE-RESUME
  97. {&DB-REQUIRED-END}
  98. /* ************************ Frame Definitions *********************** */
  99. /* *********************** Procedure Settings ************************ */
  100. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  101. /* Settings for THIS-PROCEDURE
  102. Type: SmartDataObject
  103. Allow: Query
  104. Frames: 0
  105. Add Fields to: Neither
  106. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  107. */
  108. /* This procedure should always be RUN PERSISTENT. Report the error, */
  109. /* then cleanup and return. */
  110. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  111. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  112. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  113. RETURN.
  114. END.
  115. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  116. /* ************************* Create Window ************************** */
  117. &ANALYZE-SUSPEND _CREATE-WINDOW
  118. /* DESIGN Window definition (used by the UIB)
  119. CREATE WINDOW dTables ASSIGN
  120. HEIGHT = 1.62
  121. WIDTH = 71.
  122. /* END WINDOW DEFINITION */
  123. */
  124. &ANALYZE-RESUME
  125. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  126. /* ************************* Included-Libraries *********************** */
  127. {src/adm2/data.i}
  128. /* _UIB-CODE-BLOCK-END */
  129. &ANALYZE-RESUME
  130. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  131. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  132. /* SETTINGS FOR WINDOW dTables
  133. VISIBLE,,RUN-PERSISTENT */
  134. /* _RUN-TIME-ATTRIBUTES-END */
  135. &ANALYZE-RESUME
  136. /* Setting information for Queries and Browse Widgets fields */
  137. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  138. /* Query rebuild information for SmartDataObject Query-Main
  139. _TblList = "AnaDat.Steuer"
  140. _Options = "NO-LOCK INDEXED-REPOSITION"
  141. _FldNameList[1] > AnaDat.Steuer.Firma
  142. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  143. _FldNameList[2] > AnaDat.Steuer.Firma1
  144. "Firma1" "Firma1" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  145. _FldNameList[3] > AnaDat.Steuer.Firma2
  146. "Firma2" "Firma2" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  147. _FldNameList[4] > AnaDat.Steuer.Strasse
  148. "Strasse" "Strasse" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  149. _FldNameList[5] > AnaDat.Steuer.Ort
  150. "Ort" "Ort" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  151. _FldNameList[6] > AnaDat.Steuer.Fwi01
  152. "Fwi01" "Fwi01" "Sprcd" ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  153. _FldNameList[7] > AnaDat.Steuer.Fwi02
  154. "Fwi02" "Fwi02" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  155. _FldNameList[8] > AnaDat.Steuer.Fwi03
  156. "Fwi03" "Fwi03" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  157. _FldNameList[9] > AnaDat.Steuer.Fwi04
  158. "Fwi04" "Fwi04" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  159. _FldNameList[10] > AnaDat.Steuer.Fwi05
  160. "Fwi05" "Fwi05" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  161. _FldNameList[11] > AnaDat.Steuer.Fwi06
  162. "Fwi06" "Fwi06" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  163. _FldNameList[12] > AnaDat.Steuer.Fwi07
  164. "Fwi07" "Fwi07" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  165. _FldNameList[13] > AnaDat.Steuer.Fwi08
  166. "Fwi08" "Fwi08" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  167. _FldNameList[14] > AnaDat.Steuer.Fwi09
  168. "Fwi09" "Fwi09" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  169. _FldNameList[15] > AnaDat.Steuer.Fwi10
  170. "Fwi10" "Fwi10" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  171. _FldNameList[16] > AnaDat.Steuer.Fwc01
  172. "Fwc01" "Fwc01" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  173. _FldNameList[17] > AnaDat.Steuer.Fwc02
  174. "Fwc02" "Fwc02" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  175. _FldNameList[18] > AnaDat.Steuer.Fwc03
  176. "Fwc03" "Fwc03" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  177. _FldNameList[19] > AnaDat.Steuer.Fwc04
  178. "Fwc04" "Fwc04" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  179. _FldNameList[20] > AnaDat.Steuer.Fwc05
  180. "Fwc05" "Fwc05" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  181. _FldNameList[21] > AnaDat.Steuer.Fwc06
  182. "Fwc06" "Fwc06" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  183. _FldNameList[22] > AnaDat.Steuer.Fwc07
  184. "Fwc07" "Fwc07" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  185. _FldNameList[23] > AnaDat.Steuer.Fwc08
  186. "Fwc08" "Fwc08" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  187. _FldNameList[24] > AnaDat.Steuer.Fwc09
  188. "Fwc09" "Fwc09" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  189. _FldNameList[25] > AnaDat.Steuer.Fwc10
  190. "Fwc10" "Fwc10" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  191. _FldNameList[26] > AnaDat.Steuer.Fwi11
  192. "Fwi11" "Fwi11" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  193. _FldNameList[27] > AnaDat.Steuer.Fwi12
  194. "Fwi12" "Fwi12" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  195. _FldNameList[28] > AnaDat.Steuer.Fwi13
  196. "Fwi13" "Fwi13" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  197. _FldNameList[29] > AnaDat.Steuer.Fwi14
  198. "Fwi14" "Fwi14" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  199. _FldNameList[30] > AnaDat.Steuer.Fwi15
  200. "Fwi15" "Fwi15" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  201. _FldNameList[31] > AnaDat.Steuer.Fwi16
  202. "Fwi16" "Fwi16" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  203. _FldNameList[32] > AnaDat.Steuer.Fwi17
  204. "Fwi17" "Fwi17" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  205. _FldNameList[33] > AnaDat.Steuer.Fwi18
  206. "Fwi18" "Fwi18" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  207. _FldNameList[34] > AnaDat.Steuer.Fwi19
  208. "Fwi19" "Fwi19" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  209. _FldNameList[35] > AnaDat.Steuer.Fwi20
  210. "Fwi20" "Fwi20" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ""
  211. _FldNameList[36] > AnaDat.Steuer.Fwi21
  212. "Fwi21" "Fwi21" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  213. _FldNameList[37] > AnaDat.Steuer.Fwi22
  214. "Fwi22" "Fwi22" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  215. _FldNameList[38] > AnaDat.Steuer.Fwi23
  216. "Fwi23" "Fwi23" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  217. _FldNameList[39] > AnaDat.Steuer.Fwi24
  218. "Fwi24" "Fwi24" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  219. _FldNameList[40] > AnaDat.Steuer.Fwi25
  220. "Fwi25" "Fwi25" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  221. _FldNameList[41] > AnaDat.Steuer.Fwi26
  222. "Fwi26" "Fwi26" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  223. _FldNameList[42] > AnaDat.Steuer.Fwi27
  224. "Fwi27" "Fwi27" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  225. _FldNameList[43] > AnaDat.Steuer.Fwi28
  226. "Fwi28" "Fwi28" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  227. _FldNameList[44] > AnaDat.Steuer.Fwi29
  228. "Fwi29" "Fwi29" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  229. _FldNameList[45] > AnaDat.Steuer.Fwi30
  230. "Fwi30" "Fwi30" ? ? "integer" ? ? ? ? ? ? yes ? no 7.2 yes ?
  231. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  232. */ /* QUERY Query-Main */
  233. &ANALYZE-RESUME
  234. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  235. /* *************************** Main Block *************************** */
  236. SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
  237. IF SAktiv THEN DO:
  238. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  239. END.
  240. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  241. RUN initializeObject.
  242. &ENDIF
  243. /* _UIB-CODE-BLOCK-END */
  244. &ANALYZE-RESUME
  245. /* ********************** Internal Procedures *********************** */
  246. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  247. PROCEDURE disable_UI :
  248. /*------------------------------------------------------------------------------
  249. Purpose: DISABLE the User Interface
  250. Parameters: <none>
  251. Notes: Here we clean-up the user-interface by deleting
  252. dynamic widgets we have created and/or hide
  253. frames. This procedure is usually called when
  254. we are ready to "clean-up" after running.
  255. ------------------------------------------------------------------------------*/
  256. /* Hide all frames. */
  257. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  258. END PROCEDURE.
  259. /* _UIB-CODE-BLOCK-END */
  260. &ANALYZE-RESUME
  261. /* ************************ Function Implementations ***************** */
  262. {&DB-REQUIRED-START}
  263. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  264. FUNCTION openQuery RETURNS LOGICAL
  265. ( /* parameter-definitions */ ) :
  266. /*------------------------------------------------------------------------------
  267. Purpose: Super Override
  268. Notes:
  269. ------------------------------------------------------------------------------*/
  270. xWhere = 'Steuer.Firma = "' + Firma + '" '.
  271. DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere).
  272. /* xSort = ''. */
  273. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  274. /* xWhere = ''. */
  275. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  276. RETURN SUPER( ).
  277. END FUNCTION.
  278. /* _UIB-CODE-BLOCK-END */
  279. &ANALYZE-RESUME
  280. {&DB-REQUIRED-END}