b-aktionen.w 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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. DEF VAR SAktiv AS LOG NO-UNDO.
  28. DEF VAR Firma AS CHAR NO-UNDO.
  29. /* _UIB-CODE-BLOCK-END */
  30. &ANALYZE-RESUME
  31. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  32. /* ******************** Preprocessor Definitions ******************** */
  33. &Scoped-define PROCEDURE-TYPE SmartDataBrowser
  34. &Scoped-define DB-AWARE no
  35. &Scoped-define ADM-SUPPORTED-LINKS TableIO-Target,Data-Target,Update-Source
  36. /* Include file with RowObject temp-table definition */
  37. &Scoped-define DATA-FIELD-DEFS "d-aktionen.i"
  38. /* Name of first Frame and/or Browse and/or first Query */
  39. &Scoped-define FRAME-NAME F-Main
  40. &Scoped-define BROWSE-NAME Br_Aktionen
  41. /* Internal Tables (found by Frame, Query & Browse Queries) */
  42. &Scoped-define INTERNAL-TABLES rowObject
  43. /* Definitions for BROWSE Br_Aktionen */
  44. &Scoped-define FIELDS-IN-QUERY-Br_Aktionen rowObject.Aktion ~
  45. rowObject.Ab_Datum rowObject.Bis_Datum rowObject.Art rowObject.Wert ~
  46. rowObject.Bemerkung
  47. &Scoped-define ENABLED-FIELDS-IN-QUERY-Br_Aktionen
  48. &Scoped-define OPEN-QUERY-Br_Aktionen OPEN QUERY Br_Aktionen FOR EACH rowObject NO-LOCK INDEXED-REPOSITION.
  49. &Scoped-define TABLES-IN-QUERY-Br_Aktionen rowObject
  50. &Scoped-define FIRST-TABLE-IN-QUERY-Br_Aktionen rowObject
  51. /* Definitions for FRAME F-Main */
  52. /* Standard List Definitions */
  53. &Scoped-Define ENABLED-OBJECTS Br_Aktionen RECT-1
  54. /* Custom List Definitions */
  55. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  56. /* _UIB-PREPROCESSOR-BLOCK-END */
  57. &ANALYZE-RESUME
  58. /* *********************** Control Definitions ********************** */
  59. /* Definitions of the field level widgets */
  60. DEFINE RECTANGLE RECT-1
  61. EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
  62. SIZE 98 BY 7.14.
  63. /* Query definitions */
  64. &ANALYZE-SUSPEND
  65. DEFINE TEMP-TABLE RowObject
  66. {{&DATA-FIELD-DEFS}}
  67. {src/adm2/robjflds.i}.
  68. DEFINE QUERY Br_Aktionen FOR
  69. rowObject SCROLLING.
  70. &ANALYZE-RESUME
  71. /* Browse definitions */
  72. DEFINE BROWSE Br_Aktionen
  73. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS Br_Aktionen bTableWin _STRUCTURED
  74. QUERY Br_Aktionen NO-LOCK DISPLAY
  75. rowObject.Aktion FORMAT "x(20)":U
  76. rowObject.Ab_Datum COLUMN-LABEL "gültig ab" FORMAT "99.99.9999":U
  77. WIDTH 12
  78. rowObject.Bis_Datum COLUMN-LABEL "gültig bis" FORMAT "99.99.9999":U
  79. WIDTH 12
  80. rowObject.Art FORMAT "9":U WIDTH 3
  81. rowObject.Wert FORMAT "zz9.9999-":U WIDTH 10
  82. rowObject.Bemerkung FORMAT "x(30)":U
  83. /* _UIB-CODE-BLOCK-END */
  84. &ANALYZE-RESUME
  85. WITH NO-ASSIGN NO-AUTO-VALIDATE NO-ROW-MARKERS SEPARATORS SIZE 96 BY 6.67
  86. BGCOLOR 15 EXPANDABLE.
  87. /* ************************ Frame Definitions *********************** */
  88. DEFINE FRAME F-Main
  89. Br_Aktionen AT ROW 1.48 COL 3
  90. RECT-1 AT ROW 1.24 COL 2
  91. WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
  92. SIDE-LABELS NO-UNDERLINE THREE-D
  93. AT COL 1 ROW 1 SCROLLABLE .
  94. /* *********************** Procedure Settings ************************ */
  95. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  96. /* Settings for THIS-PROCEDURE
  97. Type: SmartDataBrowser
  98. Data Source: "d-aktionen.w"
  99. Allow: Basic,Browse
  100. Frames: 1
  101. Add Fields to: Neither
  102. Other Settings: PERSISTENT-ONLY COMPILE
  103. */
  104. /* This procedure should always be RUN PERSISTENT. Report the error, */
  105. /* then cleanup and return. */
  106. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  107. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  108. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  109. RETURN.
  110. END.
  111. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  112. /* ************************* Create Window ************************** */
  113. &ANALYZE-SUSPEND _CREATE-WINDOW
  114. /* DESIGN Window definition (used by the UIB)
  115. CREATE WINDOW bTableWin ASSIGN
  116. HEIGHT = 7.76
  117. WIDTH = 100.2.
  118. /* END WINDOW DEFINITION */
  119. */
  120. &ANALYZE-RESUME
  121. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB bTableWin
  122. /* ************************* Included-Libraries *********************** */
  123. {src/adm2/browser.i}
  124. /* _UIB-CODE-BLOCK-END */
  125. &ANALYZE-RESUME
  126. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  127. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  128. /* SETTINGS FOR WINDOW bTableWin
  129. NOT-VISIBLE,,RUN-PERSISTENT */
  130. /* SETTINGS FOR FRAME F-Main
  131. NOT-VISIBLE Size-to-Fit */
  132. /* BROWSE-TAB Br_Aktionen 1 F-Main */
  133. ASSIGN
  134. FRAME F-Main:SCROLLABLE = FALSE
  135. FRAME F-Main:HIDDEN = TRUE.
  136. /* _RUN-TIME-ATTRIBUTES-END */
  137. &ANALYZE-RESUME
  138. /* Setting information for Queries and Browse Widgets fields */
  139. &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE Br_Aktionen
  140. /* Query rebuild information for BROWSE Br_Aktionen
  141. _TblList = "rowObject"
  142. _Options = "NO-LOCK INDEXED-REPOSITION"
  143. _FldNameList[1] > _<SDO>.rowObject.Aktion
  144. "rowObject.Aktion" ? ? "character" ? ? ? ? ? ? no "?" no no ? yes no no "U" "" ""
  145. _FldNameList[2] > _<SDO>.rowObject.Ab_Datum
  146. "rowObject.Ab_Datum" "gültig ab" ? "date" ? ? ? ? ? ? no "?" no no "12" yes no no "U" "" ""
  147. _FldNameList[3] > _<SDO>.rowObject.Bis_Datum
  148. "rowObject.Bis_Datum" "gültig bis" ? "date" ? ? ? ? ? ? no "?" no no "12" yes no no "U" "" ""
  149. _FldNameList[4] > _<SDO>.rowObject.Art
  150. "rowObject.Art" ? ? "integer" ? ? ? ? ? ? no "?" no no "3" yes no no "U" "" ""
  151. _FldNameList[5] > _<SDO>.rowObject.Wert
  152. "rowObject.Wert" ? ? "decimal" ? ? ? ? ? ? no "?" no no "10" yes no no "U" "" ""
  153. _FldNameList[6] = _<SDO>.rowObject.Bemerkung
  154. _Query is NOT OPENED
  155. */ /* BROWSE Br_Aktionen */
  156. &ANALYZE-RESUME
  157. &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
  158. /* Query rebuild information for FRAME F-Main
  159. _Options = "NO-LOCK"
  160. _Query is NOT OPENED
  161. */ /* FRAME F-Main */
  162. &ANALYZE-RESUME
  163. /* ************************ Control Triggers ************************ */
  164. &Scoped-define BROWSE-NAME Br_Aktionen
  165. &Scoped-define SELF-NAME Br_Aktionen
  166. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  167. ON CTRL-END OF Br_Aktionen IN FRAME F-Main
  168. DO:
  169. APPLY "END":U TO BROWSE Br_Aktionen.
  170. END.
  171. /* _UIB-CODE-BLOCK-END */
  172. &ANALYZE-RESUME
  173. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  174. ON CTRL-HOME OF Br_Aktionen IN FRAME F-Main
  175. DO:
  176. APPLY "HOME":U TO BROWSE Br_Aktionen.
  177. END.
  178. /* _UIB-CODE-BLOCK-END */
  179. &ANALYZE-RESUME
  180. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  181. ON END OF Br_Aktionen IN FRAME F-Main
  182. DO:
  183. {src/adm2/brsend.i}
  184. END.
  185. /* _UIB-CODE-BLOCK-END */
  186. &ANALYZE-RESUME
  187. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  188. ON HOME OF Br_Aktionen IN FRAME F-Main
  189. DO:
  190. {src/adm2/brshome.i}
  191. END.
  192. /* _UIB-CODE-BLOCK-END */
  193. &ANALYZE-RESUME
  194. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  195. ON OFF-END OF Br_Aktionen IN FRAME F-Main
  196. DO:
  197. {src/adm2/brsoffnd.i}
  198. END.
  199. /* _UIB-CODE-BLOCK-END */
  200. &ANALYZE-RESUME
  201. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  202. ON OFF-HOME OF Br_Aktionen IN FRAME F-Main
  203. DO:
  204. {src/adm2/brsoffhm.i}
  205. END.
  206. /* _UIB-CODE-BLOCK-END */
  207. &ANALYZE-RESUME
  208. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  209. ON ROW-ENTRY OF Br_Aktionen IN FRAME F-Main
  210. DO:
  211. {src/adm2/brsentry.i}
  212. END.
  213. /* _UIB-CODE-BLOCK-END */
  214. &ANALYZE-RESUME
  215. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  216. ON ROW-LEAVE OF Br_Aktionen IN FRAME F-Main
  217. DO:
  218. {src/adm2/brsleave.i}
  219. END.
  220. /* _UIB-CODE-BLOCK-END */
  221. &ANALYZE-RESUME
  222. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  223. ON SCROLL-NOTIFY OF Br_Aktionen IN FRAME F-Main
  224. DO:
  225. {src/adm2/brsscrol.i}
  226. END.
  227. /* _UIB-CODE-BLOCK-END */
  228. &ANALYZE-RESUME
  229. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Br_Aktionen bTableWin
  230. ON VALUE-CHANGED OF Br_Aktionen IN FRAME F-Main
  231. DO:
  232. {src/adm2/brschnge.i}
  233. END.
  234. /* _UIB-CODE-BLOCK-END */
  235. &ANALYZE-RESUME
  236. &UNDEFINE SELF-NAME
  237. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK bTableWin
  238. /* *************************** Main Block *************************** */
  239. SAktiv = DYNAMIC-FUNCTION('getSuperAktiv':U) NO-ERROR.
  240. IF SAktiv THEN DO:
  241. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  242. END.
  243. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  244. RUN initializeObject.
  245. &ENDIF
  246. /* _UIB-CODE-BLOCK-END */
  247. &ANALYZE-RESUME
  248. /* ********************** Internal Procedures *********************** */
  249. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI bTableWin _DEFAULT-DISABLE
  250. PROCEDURE disable_UI :
  251. /*------------------------------------------------------------------------------
  252. Purpose: DISABLE the User Interface
  253. Parameters: <none>
  254. Notes: Here we clean-up the user-interface by deleting
  255. dynamic widgets we have created and/or hide
  256. frames. This procedure is usually called when
  257. we are ready to "clean-up" after running.
  258. ------------------------------------------------------------------------------*/
  259. /* Hide all frames. */
  260. HIDE FRAME F-Main.
  261. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  262. END PROCEDURE.
  263. /* _UIB-CODE-BLOCK-END */
  264. &ANALYZE-RESUME