d-land.w 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v9r12 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 Land
  49. /* Definitions for QUERY Query-Main */
  50. &Scoped-Define ENABLED-FIELDS Landnr Lkz Bez LaSLkz LaSPlz LaSOrt
  51. &Scoped-define ENABLED-FIELDS-IN-Land Landnr Lkz Bez LaSLkz LaSPlz LaSOrt
  52. &Scoped-Define DATA-FIELDS Landnr Lkz Bez LaSLkz LaSPlz LaSOrt
  53. &Scoped-define DATA-FIELDS-IN-Land Landnr Lkz Bez LaSLkz LaSPlz LaSOrt
  54. &Scoped-Define MANDATORY-FIELDS Landnr Lkz LaSLkz LaSPlz LaSOrt
  55. &Scoped-Define APPLICATION-SERVICE
  56. &Scoped-Define ASSIGN-LIST
  57. &Scoped-Define DATA-FIELD-DEFS "d-land.i"
  58. {&DB-REQUIRED-START}
  59. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Land NO-LOCK INDEXED-REPOSITION.
  60. {&DB-REQUIRED-END}
  61. &Scoped-define TABLES-IN-QUERY-Query-Main Land
  62. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Land
  63. /* Custom List Definitions */
  64. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  65. /* _UIB-PREPROCESSOR-BLOCK-END */
  66. &ANALYZE-RESUME
  67. /* ************************ Function Prototypes ********************** */
  68. {&DB-REQUIRED-START}
  69. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  70. FUNCTION openQuery RETURNS LOGICAL
  71. ( /* parameter-definitions */ ) FORWARD.
  72. /* _UIB-CODE-BLOCK-END */
  73. &ANALYZE-RESUME
  74. {&DB-REQUIRED-END}
  75. /* *********************** Control Definitions ********************** */
  76. {&DB-REQUIRED-START}
  77. /* Query definitions */
  78. &ANALYZE-SUSPEND
  79. DEFINE QUERY Query-Main FOR
  80. Land SCROLLING.
  81. &ANALYZE-RESUME
  82. {&DB-REQUIRED-END}
  83. /* ************************ Frame Definitions *********************** */
  84. /* *********************** Procedure Settings ************************ */
  85. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  86. /* Settings for THIS-PROCEDURE
  87. Type: SmartDataObject
  88. Allow: Query
  89. Frames: 0
  90. Add Fields to: Neither
  91. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  92. */
  93. /* This procedure should always be RUN PERSISTENT. Report the error, */
  94. /* then cleanup and return. */
  95. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  96. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  97. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  98. RETURN.
  99. END.
  100. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  101. /* ************************* Create Window ************************** */
  102. &ANALYZE-SUSPEND _CREATE-WINDOW
  103. /* DESIGN Window definition (used by the UIB)
  104. CREATE WINDOW dTables ASSIGN
  105. HEIGHT = 1.62
  106. WIDTH = 46.6.
  107. /* END WINDOW DEFINITION */
  108. */
  109. &ANALYZE-RESUME
  110. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  111. /* ************************* Included-Libraries *********************** */
  112. {src/adm2/data.i}
  113. /* _UIB-CODE-BLOCK-END */
  114. &ANALYZE-RESUME
  115. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  116. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  117. /* SETTINGS FOR WINDOW dTables
  118. VISIBLE,,RUN-PERSISTENT */
  119. /* _RUN-TIME-ATTRIBUTES-END */
  120. &ANALYZE-RESUME
  121. /* Setting information for Queries and Browse Widgets fields */
  122. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  123. /* Query rebuild information for SmartDataObject Query-Main
  124. _TblList = "AnaDat.Land"
  125. _Options = "NO-LOCK INDEXED-REPOSITION"
  126. _FldNameList[1] > AnaDat.Land.Landnr
  127. "Landnr" "Landnr" "Nummer" ? "integer" ? ? ? ? ? ? yes ? yes 6.6 yes
  128. _FldNameList[2] > AnaDat.Land.Lkz
  129. "Lkz" "Lkz" ? ? "character" ? ? ? ? ? ? yes ? yes 3.4 yes
  130. _FldNameList[3] > AnaDat.Land.Bez
  131. "Bez" "Bez" "Land" ? "character" ? ? ? ? ? ? yes ? no 40 yes
  132. _FldNameList[4] > AnaDat.Land.LaSLkz
  133. "LaSLkz" "LaSLkz" "Stelle Lkz" ? "integer" ? ? ? ? ? ? yes "an welcher Stelle steht das Landeskennzeichen in der Anschrift ?
  134. 9 = Kein ofizielles Lkz (Landtext verwenden)" yes 7.2 yes
  135. _FldNameList[5] > AnaDat.Land.LaSPlz
  136. "LaSPlz" "LaSPlz" "Stelle Plz" ? "integer" ? ? ? ? ? ? yes "an welcher Stelle steht die Postleitzahl in der Anschrift" yes 6.6 yes
  137. _FldNameList[6] > AnaDat.Land.LaSOrt
  138. "LaSOrt" "LaSOrt" "Stelle Ort" ? "integer" ? ? ? ? ? ? yes "an welcher Stelle steht der Ort in der Anschrift" yes 6.6 yes
  139. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  140. */ /* QUERY Query-Main */
  141. &ANALYZE-RESUME
  142. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  143. /* *************************** Main Block *************************** */
  144. SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
  145. IF SAktiv THEN DO:
  146. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  147. END.
  148. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  149. RUN initializeObject.
  150. &ENDIF
  151. /* _UIB-CODE-BLOCK-END */
  152. &ANALYZE-RESUME
  153. /* ********************** Internal Procedures *********************** */
  154. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  155. PROCEDURE disable_UI :
  156. /*------------------------------------------------------------------------------
  157. Purpose: DISABLE the User Interface
  158. Parameters: <none>
  159. Notes: Here we clean-up the user-interface by deleting
  160. dynamic widgets we have created and/or hide
  161. frames. This procedure is usually called when
  162. we are ready to "clean-up" after running.
  163. ------------------------------------------------------------------------------*/
  164. /* Hide all frames. */
  165. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  166. END PROCEDURE.
  167. /* _UIB-CODE-BLOCK-END */
  168. &ANALYZE-RESUME
  169. /* ************************ Function Implementations ***************** */
  170. {&DB-REQUIRED-START}
  171. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  172. FUNCTION openQuery RETURNS LOGICAL
  173. ( /* parameter-definitions */ ) :
  174. /*------------------------------------------------------------------------------
  175. Purpose: Super Override
  176. Notes:
  177. ------------------------------------------------------------------------------*/
  178. /* xWhere = ''. */
  179. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
  180. /* xSort = ''. */
  181. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  182. /* xWhere = ''. */
  183. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  184. RETURN SUPER( ).
  185. END FUNCTION.
  186. /* _UIB-CODE-BLOCK-END */
  187. &ANALYZE-RESUME
  188. {&DB-REQUIRED-END}