d-sprache.w 7.6 KB

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