d-bankst.w 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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 Bankst
  49. /* Definitions for QUERY Query-Main */
  50. &Scoped-Define ENABLED-FIELDS Bank Suchbe Adr1 Adr2 Adr3 Adr4 Clearing Tel Fax Konto Kto_Nr BESR-Konto~
  51. BESR-TnNr IBAN QR-IBAN SWIFT_BIC
  52. &Scoped-define ENABLED-FIELDS-IN-Bankst Bank Suchbe Adr1 Adr2 Adr3 Adr4 ~
  53. Clearing Tel Fax Konto Kto_Nr BESR-Konto BESR-TnNr IBAN QR-IBAN SWIFT_BIC
  54. &Scoped-Define DATA-FIELDS Bank Suchbe Adr1 Adr2 Adr3 Adr4 Clearing Tel Fax Konto Kto_Nr BESR-Konto~
  55. BESR-TnNr IBAN QR-IBAN SWIFT_BIC
  56. &Scoped-define DATA-FIELDS-IN-Bankst Bank Suchbe Adr1 Adr2 Adr3 Adr4 ~
  57. Clearing Tel Fax Konto Kto_Nr BESR-Konto BESR-TnNr IBAN QR-IBAN SWIFT_BIC
  58. &Scoped-Define MANDATORY-FIELDS
  59. &Scoped-Define APPLICATION-SERVICE
  60. &Scoped-Define ASSIGN-LIST rowObject.Adr1 = Bankst.Adr[1] rowObject.Adr2 = Bankst.Adr[2]~
  61. rowObject.Adr3 = Bankst.Adr[3] rowObject.Adr4 = Bankst.Adr[4]
  62. &Scoped-Define DATA-FIELD-DEFS "d-bankst.i"
  63. &Scoped-define QUERY-STRING-Query-Main FOR EACH Bankst NO-LOCK INDEXED-REPOSITION
  64. {&DB-REQUIRED-START}
  65. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Bankst NO-LOCK INDEXED-REPOSITION.
  66. {&DB-REQUIRED-END}
  67. &Scoped-define TABLES-IN-QUERY-Query-Main Bankst
  68. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Bankst
  69. /* Custom List Definitions */
  70. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  71. /* _UIB-PREPROCESSOR-BLOCK-END */
  72. &ANALYZE-RESUME
  73. /* ************************ Function Prototypes ********************** */
  74. {&DB-REQUIRED-START}
  75. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  76. FUNCTION openQuery RETURNS LOGICAL
  77. ( /* parameter-definitions */ ) FORWARD.
  78. /* _UIB-CODE-BLOCK-END */
  79. &ANALYZE-RESUME
  80. {&DB-REQUIRED-END}
  81. /* *********************** Control Definitions ********************** */
  82. {&DB-REQUIRED-START}
  83. /* Query definitions */
  84. &ANALYZE-SUSPEND
  85. DEFINE QUERY Query-Main FOR
  86. Bankst SCROLLING.
  87. &ANALYZE-RESUME
  88. {&DB-REQUIRED-END}
  89. /* ************************ Frame Definitions *********************** */
  90. /* *********************** Procedure Settings ************************ */
  91. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  92. /* Settings for THIS-PROCEDURE
  93. Type: SmartDataObject
  94. Allow: Query
  95. Frames: 0
  96. Add Fields to: Neither
  97. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  98. */
  99. /* This procedure should always be RUN PERSISTENT. Report the error, */
  100. /* then cleanup and return. */
  101. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  102. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  103. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  104. RETURN.
  105. END.
  106. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  107. /* ************************* Create Window ************************** */
  108. &ANALYZE-SUSPEND _CREATE-WINDOW
  109. /* DESIGN Window definition (used by the UIB)
  110. CREATE WINDOW dTables ASSIGN
  111. HEIGHT = 1.62
  112. WIDTH = 46.6.
  113. /* END WINDOW DEFINITION */
  114. */
  115. &ANALYZE-RESUME
  116. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  117. /* ************************* Included-Libraries *********************** */
  118. {src/adm2/data.i}
  119. /* _UIB-CODE-BLOCK-END */
  120. &ANALYZE-RESUME
  121. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  122. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  123. /* SETTINGS FOR WINDOW dTables
  124. VISIBLE,,RUN-PERSISTENT */
  125. /* _RUN-TIME-ATTRIBUTES-END */
  126. &ANALYZE-RESUME
  127. /* Setting information for Queries and Browse Widgets fields */
  128. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  129. /* Query rebuild information for SmartDataObject Query-Main
  130. _TblList = "AnaDat.Bankst"
  131. _Options = "NO-LOCK INDEXED-REPOSITION"
  132. _FldNameList[1] > AnaDat.Bankst.Bank
  133. "Bank" "Bank" ? ? "integer" ? ? ? ? ? ? yes ? no 5 yes ""
  134. _FldNameList[2] > AnaDat.Bankst.Suchbe
  135. "Suchbe" "Suchbe" ? ? "character" ? ? ? ? ? ? yes ? no 21 yes ""
  136. _FldNameList[3] > AnaDat.Bankst.Adr[1]
  137. "Adr[1]" "Adr1" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  138. _FldNameList[4] > AnaDat.Bankst.Adr[2]
  139. "Adr[2]" "Adr2" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  140. _FldNameList[5] > AnaDat.Bankst.Adr[3]
  141. "Adr[3]" "Adr3" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  142. _FldNameList[6] > AnaDat.Bankst.Adr[4]
  143. "Adr[4]" "Adr4" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  144. _FldNameList[7] > AnaDat.Bankst.Clearing
  145. "Clearing" "Clearing" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
  146. _FldNameList[8] > AnaDat.Bankst.Tel
  147. "Tel" "Tel" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  148. _FldNameList[9] > AnaDat.Bankst.Fax
  149. "Fax" "Fax" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  150. _FldNameList[10] > AnaDat.Bankst.Konto
  151. "Konto" "Konto" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
  152. _FldNameList[11] > AnaDat.Bankst.Kto_Nr
  153. "Kto_Nr" "Kto_Nr" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  154. _FldNameList[12] > AnaDat.Bankst.BESR-Konto
  155. "BESR-Konto" "BESR-Konto" ? ? "int64" ? ? ? ? ? ? yes ? no 14.4 yes ?
  156. _FldNameList[13] > AnaDat.Bankst.BESR-TnNr
  157. "BESR-TnNr" "BESR-TnNr" ? ? "integer" ? ? ? ? ? ? yes ? no 11 yes ?
  158. _FldNameList[14] > AnaDat.Bankst.IBAN
  159. "IBAN" "IBAN" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  160. _FldNameList[15] > AnaDat.Bankst.QR-IBAN
  161. "QR-IBAN" "QR-IBAN" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  162. _FldNameList[16] > AnaDat.Bankst.SWIFT_BIC
  163. "SWIFT_BIC" "SWIFT_BIC" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ?
  164. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  165. */ /* QUERY Query-Main */
  166. &ANALYZE-RESUME
  167. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  168. /* *************************** Main Block *************************** */
  169. SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
  170. IF SAktiv THEN DO:
  171. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  172. END.
  173. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  174. RUN initializeObject.
  175. &ENDIF
  176. /* _UIB-CODE-BLOCK-END */
  177. &ANALYZE-RESUME
  178. /* ********************** Internal Procedures *********************** */
  179. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  180. PROCEDURE disable_UI :
  181. /*------------------------------------------------------------------------------
  182. Purpose: DISABLE the User Interface
  183. Parameters: <none>
  184. Notes: Here we clean-up the user-interface by deleting
  185. dynamic widgets we have created and/or hide
  186. frames. This procedure is usually called when
  187. we are ready to "clean-up" after running.
  188. ------------------------------------------------------------------------------*/
  189. /* Hide all frames. */
  190. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  191. END PROCEDURE.
  192. /* _UIB-CODE-BLOCK-END */
  193. &ANALYZE-RESUME
  194. {&DB-REQUIRED-START}
  195. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS dTables _DB-REQUIRED
  196. PROCEDURE REPOS :
  197. /*------------------------------------------------------------------------------
  198. Purpose:
  199. Parameters: <none>
  200. Notes:
  201. ------------------------------------------------------------------------------*/
  202. DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO.
  203. FIND Bankst WHERE RECID(Bankst) = ipRecid NO-LOCK NO-ERROR.
  204. IF NOT AVAILABLE Bankst THEN RETURN.
  205. DYNAMIC-FUNCTION('fetchRowIdent':U, INPUT STRING(ROWID(Bankst)), INPUT ? ).
  206. END PROCEDURE.
  207. /* _UIB-CODE-BLOCK-END */
  208. &ANALYZE-RESUME
  209. {&DB-REQUIRED-END}
  210. /* ************************ Function Implementations ***************** */
  211. {&DB-REQUIRED-START}
  212. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  213. FUNCTION openQuery RETURNS LOGICAL
  214. ( /* parameter-definitions */ ) :
  215. /*------------------------------------------------------------------------------
  216. Purpose: Super Override
  217. Notes:
  218. ------------------------------------------------------------------------------*/
  219. /* xWhere = ''. */
  220. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
  221. /* xSort = ''. */
  222. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  223. /* xWhere = ''. */
  224. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  225. RETURN SUPER( ).
  226. END FUNCTION.
  227. /* _UIB-CODE-BLOCK-END */
  228. &ANALYZE-RESUME
  229. {&DB-REQUIRED-END}