d-lagerkorr-anz.w 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1
  2. &ANALYZE-RESUME
  3. /* Connected Databases
  4. */
  5. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  6. &Scoped-define FRAME-NAME D-Dialog
  7. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS D-Dialog
  8. /*------------------------------------------------------------------------
  9. File:
  10. Description: from cntnrdlg.w - ADM SmartDialog Template
  11. Input Parameters:
  12. <none>
  13. Output Parameters:
  14. <none>
  15. Author:
  16. Created:
  17. ------------------------------------------------------------------------*/
  18. /* This .W file was created with the Progress UIB. */
  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. /* ---------- Globale Variablen ---------------------------------- */
  30. { v8/globvar.i" " " " "SHARED" }
  31. { v8/debivar.i " " " " "SHARED" }
  32. { v8/artivar.i " " " " "SHARED" }
  33. { v8/contvar.i " " " " "SHARED" }
  34. /* _UIB-CODE-BLOCK-END */
  35. &ANALYZE-RESUME
  36. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  37. /* ******************** Preprocessor Definitions ******************** */
  38. &Scoped-define PROCEDURE-TYPE SmartDialog
  39. &Scoped-define DB-AWARE no
  40. &Scoped-define ADM-CONTAINER DIALOG-BOX
  41. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  42. &Scoped-define FRAME-NAME D-Dialog
  43. /* Standard List Definitions */
  44. &Scoped-Define ENABLED-OBJECTS Btn_Cancel
  45. /* Custom List Definitions */
  46. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  47. /* _UIB-PREPROCESSOR-BLOCK-END */
  48. &ANALYZE-RESUME
  49. /* *********************** Control Definitions ********************** */
  50. /* Define a dialog box */
  51. /* Definitions of handles for SmartObjects */
  52. DEFINE VARIABLE h_b-artst_1 AS HANDLE NO-UNDO.
  53. DEFINE VARIABLE h_b-korr-artbw AS HANDLE NO-UNDO.
  54. /* Definitions of the field level widgets */
  55. DEFINE BUTTON Btn_Cancel AUTO-END-KEY DEFAULT
  56. LABEL "Cancel"
  57. SIZE 15 BY 1.14
  58. BGCOLOR 8 .
  59. /* ************************ Frame Definitions *********************** */
  60. DEFINE FRAME D-Dialog
  61. Btn_Cancel AT ROW 3.48 COL 45
  62. SPACE(65.19) SKIP(14.28)
  63. WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER
  64. SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE
  65. TITLE "Anzeigen von Lagerkorrekturen"
  66. CANCEL-BUTTON Btn_Cancel.
  67. /* *********************** Procedure Settings ************************ */
  68. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  69. /* Settings for THIS-PROCEDURE
  70. Type: SmartDialog
  71. Allow: Basic,Browse,DB-Fields,Query,Smart
  72. Other Settings: COMPILE
  73. */
  74. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  75. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB D-Dialog
  76. /* ************************* Included-Libraries *********************** */
  77. {src/adm/method/containr.i}
  78. /* _UIB-CODE-BLOCK-END */
  79. &ANALYZE-RESUME
  80. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  81. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  82. /* SETTINGS FOR DIALOG-BOX D-Dialog
  83. FRAME-NAME */
  84. ASSIGN
  85. FRAME D-Dialog:SCROLLABLE = FALSE
  86. FRAME D-Dialog:HIDDEN = TRUE.
  87. ASSIGN
  88. Btn_Cancel:HIDDEN IN FRAME D-Dialog = TRUE.
  89. /* _RUN-TIME-ATTRIBUTES-END */
  90. &ANALYZE-RESUME
  91. /* Setting information for Queries and Browse Widgets fields */
  92. &ANALYZE-SUSPEND _QUERY-BLOCK DIALOG-BOX D-Dialog
  93. /* Query rebuild information for DIALOG-BOX D-Dialog
  94. _Options = "SHARE-LOCK"
  95. _Query is NOT OPENED
  96. */ /* DIALOG-BOX D-Dialog */
  97. &ANALYZE-RESUME
  98. /* ************************ Control Triggers ************************ */
  99. &Scoped-define SELF-NAME D-Dialog
  100. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL D-Dialog D-Dialog
  101. ON WINDOW-CLOSE OF FRAME D-Dialog /* Anzeigen von Lagerkorrekturen */
  102. DO:
  103. /* Add Trigger to equate WINDOW-CLOSE to END-ERROR. */
  104. APPLY "END-ERROR":U TO SELF.
  105. END.
  106. /* _UIB-CODE-BLOCK-END */
  107. &ANALYZE-RESUME
  108. &UNDEFINE SELF-NAME
  109. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK D-Dialog
  110. /* *************************** Main Block *************************** */
  111. {src/adm/template/dialogmn.i}
  112. /* _UIB-CODE-BLOCK-END */
  113. &ANALYZE-RESUME
  114. /* ********************** Internal Procedures *********************** */
  115. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects D-Dialog _ADM-CREATE-OBJECTS
  116. PROCEDURE adm-create-objects :
  117. /*------------------------------------------------------------------------------
  118. Purpose: Create handles for all SmartObjects used in this procedure.
  119. After SmartObjects are initialized, then SmartLinks are added.
  120. Parameters: <none>
  121. ------------------------------------------------------------------------------*/
  122. DEFINE VARIABLE adm-current-page AS INTEGER NO-UNDO.
  123. RUN get-attribute IN THIS-PROCEDURE ('Current-Page':U).
  124. ASSIGN adm-current-page = INTEGER(RETURN-VALUE).
  125. CASE adm-current-page:
  126. WHEN 0 THEN DO:
  127. RUN init-object IN THIS-PROCEDURE (
  128. INPUT 'v8/b-artst_1.w':U ,
  129. INPUT FRAME D-Dialog:HANDLE ,
  130. INPUT 'Layout = ':U ,
  131. OUTPUT h_b-artst_1 ).
  132. RUN set-position IN h_b-artst_1 ( 1.00 , 1.00 ) NO-ERROR.
  133. RUN set-size IN h_b-artst_1 ( 6.67 , 124.00 ) NO-ERROR.
  134. RUN init-object IN THIS-PROCEDURE (
  135. INPUT 'v8/b-korr-artbw.w':U ,
  136. INPUT FRAME D-Dialog:HANDLE ,
  137. INPUT 'Initial-Lock = NO-LOCK,
  138. Hide-on-Init = no,
  139. Disable-on-Init = no,
  140. Layout = ,
  141. Create-On-Add = ?':U ,
  142. OUTPUT h_b-korr-artbw ).
  143. RUN set-position IN h_b-korr-artbw ( 7.86 , 1.00 ) NO-ERROR.
  144. RUN set-size IN h_b-korr-artbw ( 10.71 , 115.00 ) NO-ERROR.
  145. /* Links to SmartBrowser h_b-korr-artbw. */
  146. RUN add-link IN adm-broker-hdl ( h_b-artst_1 , 'Record':U , h_b-korr-artbw ).
  147. /* Adjust the tab order of the smart objects. */
  148. RUN adjust-tab-order IN adm-broker-hdl ( h_b-artst_1 ,
  149. Btn_Cancel:HANDLE , 'BEFORE':U ).
  150. RUN adjust-tab-order IN adm-broker-hdl ( h_b-korr-artbw ,
  151. Btn_Cancel:HANDLE , 'AFTER':U ).
  152. END. /* Page 0 */
  153. END CASE.
  154. END PROCEDURE.
  155. /* _UIB-CODE-BLOCK-END */
  156. &ANALYZE-RESUME
  157. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available D-Dialog _ADM-ROW-AVAILABLE
  158. PROCEDURE adm-row-available :
  159. /*------------------------------------------------------------------------------
  160. Purpose: Dispatched to this procedure when the Record-
  161. Source has a new row available. This procedure
  162. tries to get the new row (or foriegn keys) from
  163. the Record-Source and process it.
  164. Parameters: <none>
  165. ------------------------------------------------------------------------------*/
  166. /* Define variables needed by this internal procedure. */
  167. {src/adm/template/row-head.i}
  168. /* Process the newly available records (i.e. display fields,
  169. open queries, and/or pass records on to any RECORD-TARGETS). */
  170. {src/adm/template/row-end.i}
  171. END PROCEDURE.
  172. /* _UIB-CODE-BLOCK-END */
  173. &ANALYZE-RESUME
  174. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI D-Dialog _DEFAULT-DISABLE
  175. PROCEDURE disable_UI :
  176. /*------------------------------------------------------------------------------
  177. Purpose: DISABLE the User Interface
  178. Parameters: <none>
  179. Notes: Here we clean-up the user-interface by deleting
  180. dynamic widgets we have created and/or hide
  181. frames. This procedure is usually called when
  182. we are ready to "clean-up" after running.
  183. ------------------------------------------------------------------------------*/
  184. /* Hide all frames. */
  185. HIDE FRAME D-Dialog.
  186. END PROCEDURE.
  187. /* _UIB-CODE-BLOCK-END */
  188. &ANALYZE-RESUME
  189. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI D-Dialog _DEFAULT-ENABLE
  190. PROCEDURE enable_UI :
  191. /*------------------------------------------------------------------------------
  192. Purpose: ENABLE the User Interface
  193. Parameters: <none>
  194. Notes: Here we display/view/enable the widgets in the
  195. user-interface. In addition, OPEN all queries
  196. associated with each FRAME and BROWSE.
  197. These statements here are based on the "Other
  198. Settings" section of the widget Property Sheets.
  199. ------------------------------------------------------------------------------*/
  200. ENABLE Btn_Cancel
  201. WITH FRAME D-Dialog.
  202. VIEW FRAME D-Dialog.
  203. {&OPEN-BROWSERS-IN-QUERY-D-Dialog}
  204. END PROCEDURE.
  205. /* _UIB-CODE-BLOCK-END */
  206. &ANALYZE-RESUME
  207. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-view D-Dialog
  208. PROCEDURE local-view :
  209. /*------------------------------------------------------------------------------
  210. Purpose: Override standard ADM method
  211. Notes:
  212. ------------------------------------------------------------------------------*/
  213. RUN dispatch IN THIS-PROCEDURE ( INPUT 'view':U ) .
  214. Btn_Cancel:HIDDEN IN FRAME {&FRAME-NAME} = TRUE.
  215. END PROCEDURE.
  216. /* _UIB-CODE-BLOCK-END */
  217. &ANALYZE-RESUME
  218. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records D-Dialog _ADM-SEND-RECORDS
  219. PROCEDURE send-records :
  220. /*------------------------------------------------------------------------------
  221. Purpose: Send record ROWID's for all tables used by
  222. this file.
  223. Parameters: see template/snd-head.i
  224. ------------------------------------------------------------------------------*/
  225. /* SEND-RECORDS does nothing because there are no External
  226. Tables specified for this SmartDialog, and there are no
  227. tables specified in any contained Browse, Query, or Frame. */
  228. END PROCEDURE.
  229. /* _UIB-CODE-BLOCK-END */
  230. &ANALYZE-RESUME
  231. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed D-Dialog
  232. PROCEDURE state-changed :
  233. /* -----------------------------------------------------------
  234. Purpose:
  235. Parameters: <none>
  236. Notes:
  237. -------------------------------------------------------------*/
  238. DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO.
  239. DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO.
  240. END PROCEDURE.
  241. /* _UIB-CODE-BLOCK-END */
  242. &ANALYZE-RESUME