b-bontab.w 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS bTableWin
  8. /*------------------------------------------------------------------------
  9. File: adm2\src\browser.w
  10. Description: SmartDataBrowser Object
  11. Input Parameters:
  12. <none>
  13. Output Parameters:
  14. <none>
  15. ------------------------------------------------------------------------*/
  16. /* This .W file was created with the Progress AppBuilder. */
  17. /*----------------------------------------------------------------------*/
  18. /* Create an unnamed pool to store all the widgets created
  19. by this procedure. This is a good default which assures
  20. that this procedure's triggers and internal procedures
  21. will execute in this procedure's storage, and that proper
  22. cleanup will occur on deletion of the procedure. */
  23. CREATE WIDGET-POOL.
  24. /* *************************** Definitions ************************** */
  25. /* Parameters Definitions --- */
  26. /* Local Variable Definitions --- */
  27. /* _UIB-CODE-BLOCK-END */
  28. &ANALYZE-RESUME
  29. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  30. /* ******************** Preprocessor Definitions ******************** */
  31. &Scoped-define PROCEDURE-TYPE SmartDataBrowser
  32. &Scoped-define DB-AWARE no
  33. &Scoped-define ADM-SUPPORTED-LINKS TableIO-Target,Data-Target,Update-Source
  34. /* Include file with RowObject temp-table definition */
  35. &Scoped-define DATA-FIELD-DEFS "d-bontab.i"
  36. /* Name of first Frame and/or Browse and/or first Query */
  37. &Scoped-define FRAME-NAME F-Main
  38. &Scoped-define BROWSE-NAME br_table
  39. /* Internal Tables (found by Frame, Query & Browse Queries) */
  40. &Scoped-define INTERNAL-TABLES rowObject
  41. /* Definitions for BROWSE br_table */
  42. &Scoped-define FIELDS-IN-QUERY-br_table rowObject.Ku_Bon rowObject.DebBez ~
  43. rowObject.Art_Bon rowObject.ArtBez rowObject.Bon_Summ
  44. &Scoped-define ENABLED-FIELDS-IN-QUERY-br_table
  45. &Scoped-define OPEN-QUERY-br_table OPEN QUERY br_table FOR EACH rowObject NO-LOCK INDEXED-REPOSITION.
  46. &Scoped-define TABLES-IN-QUERY-br_table rowObject
  47. &Scoped-define FIRST-TABLE-IN-QUERY-br_table rowObject
  48. /* Definitions for FRAME F-Main */
  49. /* Standard List Definitions */
  50. &Scoped-Define ENABLED-OBJECTS br_table RECT-1
  51. /* Custom List Definitions */
  52. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  53. /* _UIB-PREPROCESSOR-BLOCK-END */
  54. &ANALYZE-RESUME
  55. /* *********************** Control Definitions ********************** */
  56. /* Definitions of the field level widgets */
  57. DEFINE RECTANGLE RECT-1
  58. EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
  59. SIZE 95 BY 7.14.
  60. /* Query definitions */
  61. &ANALYZE-SUSPEND
  62. DEFINE TEMP-TABLE RowObject
  63. {{&DATA-FIELD-DEFS}}
  64. {src/adm2/robjflds.i}.
  65. DEFINE QUERY br_table FOR
  66. rowObject SCROLLING.
  67. &ANALYZE-RESUME
  68. /* Browse definitions */
  69. DEFINE BROWSE br_table
  70. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br_table bTableWin _STRUCTURED
  71. QUERY br_table NO-LOCK DISPLAY
  72. rowObject.Ku_Bon COLUMN-LABEL "Kunde" FORMAT "999":U WIDTH 7
  73. rowObject.DebBez COLUMN-LABEL "Bonusgruppe" FORMAT "x(30)":U
  74. rowObject.Art_Bon COLUMN-LABEL "Artikel" FORMAT "999":U WIDTH 7
  75. rowObject.ArtBez COLUMN-LABEL "Bonusgruppe" FORMAT "x(30)":U
  76. rowObject.Bon_Summ COLUMN-LABEL "SummGrp" FORMAT "999":U
  77. WIDTH 10
  78. /* _UIB-CODE-BLOCK-END */
  79. &ANALYZE-RESUME
  80. WITH NO-ASSIGN NO-AUTO-VALIDATE NO-ROW-MARKERS SEPARATORS SIZE 93 BY 6.67
  81. BGCOLOR 15 .
  82. /* ************************ Frame Definitions *********************** */
  83. DEFINE FRAME F-Main
  84. br_table AT ROW 1.48 COL 3
  85. RECT-1 AT ROW 1.24 COL 2
  86. WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
  87. SIDE-LABELS NO-UNDERLINE THREE-D
  88. AT COL 1 ROW 1 SCROLLABLE .
  89. /* *********************** Procedure Settings ************************ */
  90. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  91. /* Settings for THIS-PROCEDURE
  92. Type: SmartDataBrowser
  93. Data Source: "d-bontab.w"
  94. Allow: Basic,Browse
  95. Frames: 1
  96. Add Fields to: Neither
  97. Other Settings: PERSISTENT-ONLY COMPILE
  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 bTableWin ASSIGN
  111. HEIGHT = 7.67
  112. WIDTH = 97.
  113. /* END WINDOW DEFINITION */
  114. */
  115. &ANALYZE-RESUME
  116. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB bTableWin
  117. /* ************************* Included-Libraries *********************** */
  118. {src/adm2/browser.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 bTableWin
  124. NOT-VISIBLE,,RUN-PERSISTENT */
  125. /* SETTINGS FOR FRAME F-Main
  126. NOT-VISIBLE Size-to-Fit */
  127. /* BROWSE-TAB br_table 1 F-Main */
  128. ASSIGN
  129. FRAME F-Main:SCROLLABLE = FALSE
  130. FRAME F-Main:HIDDEN = TRUE.
  131. ASSIGN
  132. br_table:COLUMN-RESIZABLE IN FRAME F-Main = TRUE.
  133. /* _RUN-TIME-ATTRIBUTES-END */
  134. &ANALYZE-RESUME
  135. /* Setting information for Queries and Browse Widgets fields */
  136. &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br_table
  137. /* Query rebuild information for BROWSE br_table
  138. _TblList = "rowObject"
  139. _Options = "NO-LOCK INDEXED-REPOSITION"
  140. _FldNameList[1] > _<SDO>.rowObject.Ku_Bon
  141. "rowObject.Ku_Bon" "Kunde" ? "integer" ? ? ? ? ? ? no "?" no no "7" yes no no "U" "" ""
  142. _FldNameList[2] > _<SDO>.rowObject.DebBez
  143. "rowObject.DebBez" "Bonusgruppe" ? "character" ? ? ? ? ? ? no "?" no no ? yes no no "U" "" ""
  144. _FldNameList[3] > _<SDO>.rowObject.Art_Bon
  145. "rowObject.Art_Bon" "Artikel" ? "integer" ? ? ? ? ? ? no "?" no no "7" yes no no "U" "" ""
  146. _FldNameList[4] > _<SDO>.rowObject.ArtBez
  147. "rowObject.ArtBez" "Bonusgruppe" ? "character" ? ? ? ? ? ? no "?" no no ? yes no no "U" "" ""
  148. _FldNameList[5] > _<SDO>.rowObject.Bon_Summ
  149. "rowObject.Bon_Summ" "SummGrp" ? "integer" ? ? ? ? ? ? no "?" no no "10" yes no no "U" "" ""
  150. _Query is NOT OPENED
  151. */ /* BROWSE br_table */
  152. &ANALYZE-RESUME
  153. &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
  154. /* Query rebuild information for FRAME F-Main
  155. _Options = "NO-LOCK"
  156. _Query is NOT OPENED
  157. */ /* FRAME F-Main */
  158. &ANALYZE-RESUME
  159. /* ************************ Control Triggers ************************ */
  160. &Scoped-define BROWSE-NAME br_table
  161. &Scoped-define SELF-NAME br_table
  162. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  163. ON CTRL-END OF br_table IN FRAME F-Main
  164. DO:
  165. APPLY "END":U TO BROWSE {&BROWSE-NAME}.
  166. END.
  167. /* _UIB-CODE-BLOCK-END */
  168. &ANALYZE-RESUME
  169. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  170. ON CTRL-HOME OF br_table IN FRAME F-Main
  171. DO:
  172. APPLY "HOME":U TO BROWSE {&BROWSE-NAME}.
  173. END.
  174. /* _UIB-CODE-BLOCK-END */
  175. &ANALYZE-RESUME
  176. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  177. ON END OF br_table IN FRAME F-Main
  178. DO:
  179. {src/adm2/brsend.i}
  180. END.
  181. /* _UIB-CODE-BLOCK-END */
  182. &ANALYZE-RESUME
  183. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  184. ON HOME OF br_table IN FRAME F-Main
  185. DO:
  186. {src/adm2/brshome.i}
  187. END.
  188. /* _UIB-CODE-BLOCK-END */
  189. &ANALYZE-RESUME
  190. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  191. ON OFF-END OF br_table IN FRAME F-Main
  192. DO:
  193. {src/adm2/brsoffnd.i}
  194. END.
  195. /* _UIB-CODE-BLOCK-END */
  196. &ANALYZE-RESUME
  197. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  198. ON OFF-HOME OF br_table IN FRAME F-Main
  199. DO:
  200. {src/adm2/brsoffhm.i}
  201. END.
  202. /* _UIB-CODE-BLOCK-END */
  203. &ANALYZE-RESUME
  204. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  205. ON ROW-ENTRY OF br_table IN FRAME F-Main
  206. DO:
  207. {src/adm2/brsentry.i}
  208. END.
  209. /* _UIB-CODE-BLOCK-END */
  210. &ANALYZE-RESUME
  211. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  212. ON ROW-LEAVE OF br_table IN FRAME F-Main
  213. DO:
  214. {src/adm2/brsleave.i}
  215. END.
  216. /* _UIB-CODE-BLOCK-END */
  217. &ANALYZE-RESUME
  218. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  219. ON SCROLL-NOTIFY OF br_table IN FRAME F-Main
  220. DO:
  221. {src/adm2/brsscrol.i}
  222. END.
  223. /* _UIB-CODE-BLOCK-END */
  224. &ANALYZE-RESUME
  225. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br_table bTableWin
  226. ON VALUE-CHANGED OF br_table IN FRAME F-Main
  227. DO:
  228. {src/adm2/brschnge.i}
  229. END.
  230. /* _UIB-CODE-BLOCK-END */
  231. &ANALYZE-RESUME
  232. &UNDEFINE SELF-NAME
  233. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK bTableWin
  234. /* *************************** Main Block *************************** */
  235. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  236. RUN initializeObject.
  237. &ENDIF
  238. /* _UIB-CODE-BLOCK-END */
  239. &ANALYZE-RESUME
  240. /* ********************** Internal Procedures *********************** */
  241. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI bTableWin _DEFAULT-DISABLE
  242. PROCEDURE disable_UI :
  243. /*------------------------------------------------------------------------------
  244. Purpose: DISABLE the User Interface
  245. Parameters: <none>
  246. Notes: Here we clean-up the user-interface by deleting
  247. dynamic widgets we have created and/or hide
  248. frames. This procedure is usually called when
  249. we are ready to "clean-up" after running.
  250. ------------------------------------------------------------------------------*/
  251. /* Hide all frames. */
  252. HIDE FRAME F-Main.
  253. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  254. END PROCEDURE.
  255. /* _UIB-CODE-BLOCK-END */
  256. &ANALYZE-RESUME