d-anrede.w 8.9 KB

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