f-kunbest.w 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1
  2. &ANALYZE-RESUME
  3. /* Connected Databases
  4. */
  5. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  6. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS F-Frame-Win
  7. /*------------------------------------------------------------------------
  8. File:
  9. Description: from cntnrfrm.w - ADM SmartFrame Template
  10. Input Parameters:
  11. <none>
  12. Output Parameters:
  13. <none>
  14. ------------------------------------------------------------------------*/
  15. /* This .W file was created with the Progress UIB. */
  16. /*----------------------------------------------------------------------*/
  17. /* Create an unnamed pool to store all the widgets created
  18. by this procedure. This is a good default which assures
  19. that this procedure's triggers and internal procedures
  20. will execute in this procedure's storage, and that proper
  21. cleanup will occur on deletion of the procedure. */
  22. CREATE WIDGET-POOL.
  23. /* *************************** Definitions ************************** */
  24. /* Parameters Definitions --- */
  25. /* Local Variable Definitions --- */
  26. /* _UIB-CODE-BLOCK-END */
  27. &ANALYZE-RESUME
  28. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  29. /* ******************** Preprocessor Definitions ******************** */
  30. &Scoped-define PROCEDURE-TYPE SmartFrame
  31. &Scoped-define DB-AWARE no
  32. &Scoped-define ADM-CONTAINER FRAME
  33. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  34. &Scoped-define FRAME-NAME F-Main
  35. /* Standard List Definitions */
  36. &Scoped-Define ENABLED-OBJECTS T_Kopie
  37. &Scoped-Define DISPLAYED-OBJECTS T_Kopie
  38. /* Custom List Definitions */
  39. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  40. /* _UIB-PREPROCESSOR-BLOCK-END */
  41. &ANALYZE-RESUME
  42. /* *********************** Control Definitions ********************** */
  43. /* Definitions of handles for SmartObjects */
  44. DEFINE VARIABLE h_b-adresse_1 AS HANDLE NO-UNDO.
  45. DEFINE VARIABLE h_b-artst_1 AS HANDLE NO-UNDO.
  46. DEFINE VARIABLE h_b-kunbest AS HANDLE NO-UNDO.
  47. /* Definitions of the field level widgets */
  48. DEFINE VARIABLE T_Kopie AS LOGICAL INITIAL no
  49. LABEL "Kopie"
  50. VIEW-AS TOGGLE-BOX
  51. SIZE 12.6 BY 1 NO-UNDO.
  52. /* ************************ Frame Definitions *********************** */
  53. DEFINE FRAME F-Main
  54. T_Kopie AT ROW 14.71 COL 120.6
  55. SPACE(0.80) SKIP(6.77)
  56. WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
  57. SIDE-LABELS NO-UNDERLINE THREE-D
  58. AT COL 1 ROW 1 SCROLLABLE .
  59. /* *********************** Procedure Settings ************************ */
  60. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  61. /* Settings for THIS-PROCEDURE
  62. Type: SmartFrame
  63. Allow: Basic,Browse,DB-Fields,Query,Smart
  64. Other Settings: PERSISTENT-ONLY COMPILE
  65. */
  66. /* This procedure should always be RUN PERSISTENT. Report the error, */
  67. /* then cleanup and return. */
  68. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  69. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  70. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  71. RETURN.
  72. END.
  73. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  74. /* ************************* Create Window ************************** */
  75. &ANALYZE-SUSPEND _CREATE-WINDOW
  76. /* DESIGN Window definition (used by the UIB)
  77. CREATE WINDOW F-Frame-Win ASSIGN
  78. HEIGHT = 21.76
  79. WIDTH = 134.2.
  80. /* END WINDOW DEFINITION */
  81. */
  82. &ANALYZE-RESUME
  83. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB F-Frame-Win
  84. /* ************************* Included-Libraries *********************** */
  85. {src/adm/method/containr.i}
  86. /* _UIB-CODE-BLOCK-END */
  87. &ANALYZE-RESUME
  88. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  89. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  90. /* SETTINGS FOR WINDOW F-Frame-Win
  91. VISIBLE,,RUN-PERSISTENT */
  92. /* SETTINGS FOR FRAME F-Main
  93. NOT-VISIBLE FRAME-NAME Size-to-Fit */
  94. ASSIGN
  95. FRAME F-Main:SCROLLABLE = FALSE.
  96. /* _RUN-TIME-ATTRIBUTES-END */
  97. &ANALYZE-RESUME
  98. /* Setting information for Queries and Browse Widgets fields */
  99. &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main
  100. /* Query rebuild information for FRAME F-Main
  101. _Options = ""
  102. _Query is NOT OPENED
  103. */ /* FRAME F-Main */
  104. &ANALYZE-RESUME
  105. /* ************************ Control Triggers ************************ */
  106. &Scoped-define SELF-NAME T_Kopie
  107. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL T_Kopie F-Frame-Win
  108. ON VALUE-CHANGED OF T_Kopie IN FRAME F-Main /* Kopie */
  109. DO:
  110. DO WITH FRAME {&FRAME-NAME}:
  111. ASSIGN T_Kopie.
  112. END.
  113. RUN KOPFLAG IN h_b-kunbest ( INPUT T_Kopie ).
  114. RETURN NO-APPLY.
  115. END.
  116. /* _UIB-CODE-BLOCK-END */
  117. &ANALYZE-RESUME
  118. &UNDEFINE SELF-NAME
  119. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK F-Frame-Win
  120. /* *************************** Main Block *************************** */
  121. T_Kopie = FALSE.
  122. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  123. /* Now enable the interface if in test mode - otherwise this happens when
  124. the object is explicitly initialized from its container. */
  125. RUN dispatch IN THIS-PROCEDURE ('initialize':U).
  126. &ENDIF
  127. /* _UIB-CODE-BLOCK-END */
  128. &ANALYZE-RESUME
  129. /* ********************** Internal Procedures *********************** */
  130. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects F-Frame-Win _ADM-CREATE-OBJECTS
  131. PROCEDURE adm-create-objects :
  132. /*------------------------------------------------------------------------------
  133. Purpose: Create handles for all SmartObjects used in this procedure.
  134. After SmartObjects are initialized, then SmartLinks are added.
  135. Parameters: <none>
  136. ------------------------------------------------------------------------------*/
  137. DEFINE VARIABLE adm-current-page AS INTEGER NO-UNDO.
  138. RUN get-attribute IN THIS-PROCEDURE ('Current-Page':U).
  139. ASSIGN adm-current-page = INTEGER(RETURN-VALUE).
  140. CASE adm-current-page:
  141. WHEN 0 THEN DO:
  142. RUN init-object IN THIS-PROCEDURE (
  143. INPUT 'v8/b-adresse_1.w':U ,
  144. INPUT FRAME F-Main:HANDLE ,
  145. INPUT 'Layout = ':U ,
  146. OUTPUT h_b-adresse_1 ).
  147. RUN set-position IN h_b-adresse_1 ( 1.00 , 1.00 ) NO-ERROR.
  148. RUN set-size IN h_b-adresse_1 ( 6.67 , 133.00 ) NO-ERROR.
  149. RUN init-object IN THIS-PROCEDURE (
  150. INPUT 'v8/b-artst_1.w':U ,
  151. INPUT FRAME F-Main:HANDLE ,
  152. INPUT 'Layout = ':U ,
  153. OUTPUT h_b-artst_1 ).
  154. RUN set-position IN h_b-artst_1 ( 7.81 , 1.00 ) NO-ERROR.
  155. RUN set-size IN h_b-artst_1 ( 6.67 , 124.00 ) NO-ERROR.
  156. RUN init-object IN THIS-PROCEDURE (
  157. INPUT 'v8/b-kunbest.w':U ,
  158. INPUT FRAME F-Main:HANDLE ,
  159. INPUT 'Initial-Lock = NO-LOCK,
  160. Hide-on-Init = no,
  161. Disable-on-Init = no,
  162. Layout = ,
  163. Create-On-Add = ?':U ,
  164. OUTPUT h_b-kunbest ).
  165. RUN set-position IN h_b-kunbest ( 15.81 , 1.00 ) NO-ERROR.
  166. RUN set-size IN h_b-kunbest ( 6.67 , 133.00 ) NO-ERROR.
  167. /* Links to SmartBrowser h_b-adresse_1. */
  168. RUN add-link IN adm-broker-hdl ( THIS-PROCEDURE , 'MAIN':U , h_b-adresse_1 ).
  169. /* Links to SmartBrowser h_b-artst_1. */
  170. RUN add-link IN adm-broker-hdl ( THIS-PROCEDURE , 'MAIN':U , h_b-artst_1 ).
  171. /* Links to SmartBrowser h_b-kunbest. */
  172. RUN add-link IN adm-broker-hdl ( h_b-adresse_1 , 'State':U , h_b-kunbest ).
  173. RUN add-link IN adm-broker-hdl ( h_b-artst_1 , 'State':U , h_b-kunbest ).
  174. RUN add-link IN adm-broker-hdl ( THIS-PROCEDURE , 'MAIN':U , h_b-kunbest ).
  175. /* Adjust the tab order of the smart objects. */
  176. RUN adjust-tab-order IN adm-broker-hdl ( h_b-adresse_1 ,
  177. T_Kopie:HANDLE IN FRAME F-Main , 'BEFORE':U ).
  178. RUN adjust-tab-order IN adm-broker-hdl ( h_b-artst_1 ,
  179. h_b-adresse_1 , 'AFTER':U ).
  180. RUN adjust-tab-order IN adm-broker-hdl ( h_b-kunbest ,
  181. T_Kopie:HANDLE IN FRAME F-Main , 'AFTER':U ).
  182. END. /* Page 0 */
  183. END CASE.
  184. END PROCEDURE.
  185. /* _UIB-CODE-BLOCK-END */
  186. &ANALYZE-RESUME
  187. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available F-Frame-Win _ADM-ROW-AVAILABLE
  188. PROCEDURE adm-row-available :
  189. /*------------------------------------------------------------------------------
  190. Purpose: Dispatched to this procedure when the Record-
  191. Source has a new row available. This procedure
  192. tries to get the new row (or foriegn keys) from
  193. the Record-Source and process it.
  194. Parameters: <none>
  195. ------------------------------------------------------------------------------*/
  196. /* Define variables needed by this internal procedure. */
  197. {src/adm/template/row-head.i}
  198. /* Process the newly available records (i.e. display fields,
  199. open queries, and/or pass records on to any RECORD-TARGETS). */
  200. {src/adm/template/row-end.i}
  201. END PROCEDURE.
  202. /* _UIB-CODE-BLOCK-END */
  203. &ANALYZE-RESUME
  204. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI F-Frame-Win _DEFAULT-DISABLE
  205. PROCEDURE disable_UI :
  206. /*------------------------------------------------------------------------------
  207. Purpose: DISABLE the User Interface
  208. Parameters: <none>
  209. Notes: Here we clean-up the user-interface by deleting
  210. dynamic widgets we have created and/or hide
  211. frames. This procedure is usually called when
  212. we are ready to "clean-up" after running.
  213. ------------------------------------------------------------------------------*/
  214. /* Hide all frames. */
  215. HIDE FRAME F-Main.
  216. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  217. END PROCEDURE.
  218. /* _UIB-CODE-BLOCK-END */
  219. &ANALYZE-RESUME
  220. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI F-Frame-Win _DEFAULT-ENABLE
  221. PROCEDURE enable_UI :
  222. /*------------------------------------------------------------------------------
  223. Purpose: ENABLE the User Interface
  224. Parameters: <none>
  225. Notes: Here we display/view/enable the widgets in the
  226. user-interface. In addition, OPEN all queries
  227. associated with each FRAME and BROWSE.
  228. These statements here are based on the "Other
  229. Settings" section of the widget Property Sheets.
  230. ------------------------------------------------------------------------------*/
  231. DISPLAY T_Kopie
  232. WITH FRAME F-Main.
  233. ENABLE T_Kopie
  234. WITH FRAME F-Main.
  235. {&OPEN-BROWSERS-IN-QUERY-F-Main}
  236. END PROCEDURE.
  237. /* _UIB-CODE-BLOCK-END */
  238. &ANALYZE-RESUME
  239. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records F-Frame-Win _ADM-SEND-RECORDS
  240. PROCEDURE send-records :
  241. /*------------------------------------------------------------------------------
  242. Purpose: Send record ROWID's for all tables used by
  243. this file.
  244. Parameters: see template/snd-head.i
  245. ------------------------------------------------------------------------------*/
  246. /* SEND-RECORDS does nothing because there are no External
  247. Tables specified for this SmartFrame, and there are no
  248. tables specified in any contained Browse, Query, or Frame. */
  249. END PROCEDURE.
  250. /* _UIB-CODE-BLOCK-END */
  251. &ANALYZE-RESUME
  252. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed F-Frame-Win
  253. PROCEDURE state-changed :
  254. /* -----------------------------------------------------------
  255. Purpose:
  256. Parameters: <none>
  257. Notes:
  258. -------------------------------------------------------------*/
  259. DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
  260. DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
  261. CASE p-state:
  262. WHEN 'ENDE' THEN DO:
  263. RUN new-state ( INPUT 'ENDE, MAIN':U ).
  264. RETURN NO-APPLY.
  265. END.
  266. END CASE.
  267. END PROCEDURE.
  268. /* _UIB-CODE-BLOCK-END */
  269. &ANALYZE-RESUME