g-ddwerteingabe.w 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  4. &Scoped-define FRAME-NAME gDDWerteingabe
  5. {adecomm/appserv.i}
  6. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS gDDWerteingabe
  7. /*------------------------------------------------------------------------
  8. File:
  9. Description: from cntnrdlg.w - ADM2 SmartDialog Template
  10. Input Parameters:
  11. <none>
  12. Output Parameters:
  13. <none>
  14. Author:
  15. Created:
  16. ------------------------------------------------------------------------*/
  17. /* This .W file was created with the Progress AppBuilder. */
  18. /*----------------------------------------------------------------------*/
  19. /* Create an unnamed pool to store all the widgets created
  20. by this procedure. This is a good default which assures
  21. that this procedure's triggers and internal procedures
  22. will execute in this procedure's storage, and that proper
  23. cleanup will occur on deletion of the procedure. */
  24. CREATE WIDGET-POOL.
  25. /* *************************** Definitions ************************** */
  26. /* Parameters Definitions --- */
  27. DEFINE INPUT-OUTPUT PARAMETER iocEANKGeb AS CHARACTER.
  28. DEFINE INPUT-OUTPUT PARAMETER iocEANVGeb AS CHARACTER.
  29. DEFINE INPUT-OUTPUT PARAMETER iocS_Artnr AS CHARACTER.
  30. DEFINE OUTPUT PARAMETER oplOK AS LOGICAL.
  31. /* Local Variable Definitions --- */
  32. { incl/dlgdefinition.i }
  33. { src/adm2/widgetprto.i }
  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. &Scoped-define ADM-SUPPORTED-LINKS Data-Target,Data-Source,Page-Target,Update-Source,Update-Target
  42. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  43. &Scoped-define FRAME-NAME gDDWerteingabe
  44. /* Standard List Definitions */
  45. &Scoped-Define ENABLED-OBJECTS RECT-2 F_EANKGeb F_EANVGeb F_S_Artnr Btn_OK ~
  46. Btn_Cancel
  47. &Scoped-Define DISPLAYED-OBJECTS F_EANKGeb F_EANVGeb F_S_Artnr
  48. /* Custom List Definitions */
  49. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  50. &Scoped-define List-6 F_EANKGeb F_EANVGeb F_S_Artnr
  51. /* _UIB-PREPROCESSOR-BLOCK-END */
  52. &ANALYZE-RESUME
  53. /* *********************** Control Definitions ********************** */
  54. /* Define a dialog box */
  55. /* Definitions of the field level widgets */
  56. DEFINE BUTTON Btn_Cancel AUTO-END-KEY
  57. LABEL "abbrechen"
  58. SIZE 15 BY 1.
  59. DEFINE BUTTON Btn_OK AUTO-GO
  60. LABEL "OK"
  61. SIZE 15 BY 1.
  62. DEFINE VARIABLE F_EANKGeb AS CHARACTER FORMAT "x(13)":U
  63. LABEL "EAN KGebinde"
  64. VIEW-AS FILL-IN NATIVE
  65. SIZE 20 BY 1
  66. BGCOLOR 15 NO-UNDO.
  67. DEFINE VARIABLE F_EANVGeb AS CHARACTER FORMAT "x(13)":U
  68. LABEL "EAN VGebinde"
  69. VIEW-AS FILL-IN NATIVE
  70. SIZE 20 BY 1
  71. BGCOLOR 15 NO-UNDO.
  72. DEFINE VARIABLE F_S_Artnr AS CHARACTER FORMAT "x(13)":U
  73. LABEL "Seine Artikelnummer"
  74. VIEW-AS FILL-IN NATIVE
  75. SIZE 20 BY 1
  76. BGCOLOR 15 NO-UNDO.
  77. DEFINE RECTANGLE RECT-2
  78. EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
  79. SIZE 60 BY 4.29.
  80. /* ************************ Frame Definitions *********************** */
  81. DEFINE FRAME gDDWerteingabe
  82. F_EANKGeb AT ROW 2 COL 30 COLON-ALIGNED WIDGET-ID 4
  83. F_EANVGeb AT ROW 3 COL 30 COLON-ALIGNED WIDGET-ID 8
  84. F_S_Artnr AT ROW 4 COL 30 COLON-ALIGNED WIDGET-ID 6
  85. Btn_OK AT ROW 6.52 COL 15.4
  86. Btn_Cancel AT ROW 6.52 COL 36.6
  87. RECT-2 AT ROW 1.48 COL 3 WIDGET-ID 2
  88. SPACE(1.99) SKIP(2.41)
  89. WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER
  90. SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE
  91. TITLE "Eingabe EAN / Seine Artnr"
  92. CANCEL-BUTTON Btn_Cancel WIDGET-ID 100.
  93. /* *********************** Procedure Settings ************************ */
  94. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  95. /* Settings for THIS-PROCEDURE
  96. Type: SmartDialog
  97. Allow: Basic,Browse,DB-Fields,Query,Smart
  98. Container Links: Data-Target,Data-Source,Page-Target,Update-Source,Update-Target
  99. Design Page: 1
  100. Other Settings: COMPILE APPSERVER
  101. */
  102. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  103. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB gDDWerteingabe
  104. /* ************************* Included-Libraries *********************** */
  105. {src/adm2/containr.i}
  106. /* _UIB-CODE-BLOCK-END */
  107. &ANALYZE-RESUME
  108. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  109. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  110. /* SETTINGS FOR DIALOG-BOX gDDWerteingabe
  111. FRAME-NAME */
  112. ASSIGN
  113. FRAME gDDWerteingabe:SCROLLABLE = FALSE
  114. FRAME gDDWerteingabe:HIDDEN = TRUE.
  115. /* SETTINGS FOR FILL-IN F_EANKGeb IN FRAME gDDWerteingabe
  116. 6 */
  117. /* SETTINGS FOR FILL-IN F_EANVGeb IN FRAME gDDWerteingabe
  118. 6 */
  119. /* SETTINGS FOR FILL-IN F_S_Artnr IN FRAME gDDWerteingabe
  120. 6 */
  121. /* _RUN-TIME-ATTRIBUTES-END */
  122. &ANALYZE-RESUME
  123. /* Setting information for Queries and Browse Widgets fields */
  124. &ANALYZE-SUSPEND _QUERY-BLOCK DIALOG-BOX gDDWerteingabe
  125. /* Query rebuild information for DIALOG-BOX gDDWerteingabe
  126. _Options = "SHARE-LOCK"
  127. _Query is NOT OPENED
  128. */ /* DIALOG-BOX gDDWerteingabe */
  129. &ANALYZE-RESUME
  130. /* ************************ Control Triggers ************************ */
  131. &Scoped-define SELF-NAME gDDWerteingabe
  132. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL gDDWerteingabe gDDWerteingabe
  133. ON END-ERROR OF FRAME gDDWerteingabe /* Eingabe EAN / Seine Artnr */
  134. DO:
  135. RUN ENDE.
  136. RETURN NO-APPLY.
  137. END.
  138. /* _UIB-CODE-BLOCK-END */
  139. &ANALYZE-RESUME
  140. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL gDDWerteingabe gDDWerteingabe
  141. ON WINDOW-CLOSE OF FRAME gDDWerteingabe /* Eingabe EAN / Seine Artnr */
  142. DO:
  143. RUN ENDE.
  144. RETURN NO-APPLY.
  145. END.
  146. /* _UIB-CODE-BLOCK-END */
  147. &ANALYZE-RESUME
  148. &Scoped-define SELF-NAME Btn_Cancel
  149. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Cancel gDDWerteingabe
  150. ON CHOOSE OF Btn_Cancel IN FRAME gDDWerteingabe /* abbrechen */
  151. DO:
  152. RUN ENDE.
  153. RETURN NO-APPLY.
  154. END.
  155. /* _UIB-CODE-BLOCK-END */
  156. &ANALYZE-RESUME
  157. &Scoped-define SELF-NAME Btn_OK
  158. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK gDDWerteingabe
  159. ON CHOOSE OF Btn_OK IN FRAME gDDWerteingabe /* OK */
  160. DO:
  161. btnOK = TRUE.
  162. DO WITH FRAME {&FRAME-NAME}:
  163. ASSIGN {&List-6}.
  164. iocEANKGeb = F_EANKGeb.
  165. iocEANVGeb = F_EANVGeb.
  166. iocS_Artnr = F_S_Artnr.
  167. oplOK = TRUE.
  168. END.
  169. RUN ENDE.
  170. RETURN NO-APPLY.
  171. END.
  172. /* _UIB-CODE-BLOCK-END */
  173. &ANALYZE-RESUME
  174. &UNDEFINE SELF-NAME
  175. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK gDDWerteingabe
  176. /* *************************** Main Block *************************** */
  177. { incl/dlgmainblock.i }
  178. {src/adm2/dialogmn.i}
  179. /* _UIB-CODE-BLOCK-END */
  180. &ANALYZE-RESUME
  181. /* ********************** Internal Procedures *********************** */
  182. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects gDDWerteingabe _ADM-CREATE-OBJECTS
  183. PROCEDURE adm-create-objects :
  184. /*------------------------------------------------------------------------------
  185. Purpose: Create handles for all SmartObjects used in this procedure.
  186. After SmartObjects are initialized, then SmartLinks are added.
  187. Parameters: <none>
  188. ------------------------------------------------------------------------------*/
  189. END PROCEDURE.
  190. /* _UIB-CODE-BLOCK-END */
  191. &ANALYZE-RESUME
  192. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI gDDWerteingabe _DEFAULT-DISABLE
  193. PROCEDURE disable_UI :
  194. /*------------------------------------------------------------------------------
  195. Purpose: DISABLE the User Interface
  196. Parameters: <none>
  197. Notes: Here we clean-up the user-interface by deleting
  198. dynamic widgets we have created and/or hide
  199. frames. This procedure is usually called when
  200. we are ready to "clean-up" after running.
  201. ------------------------------------------------------------------------------*/
  202. /* Hide all frames. */
  203. HIDE FRAME gDDWerteingabe.
  204. END PROCEDURE.
  205. /* _UIB-CODE-BLOCK-END */
  206. &ANALYZE-RESUME
  207. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enableObject gDDWerteingabe
  208. PROCEDURE enableObject :
  209. /*------------------------------------------------------------------------------
  210. Purpose: Super Override
  211. Parameters:
  212. Notes:
  213. ------------------------------------------------------------------------------*/
  214. F_EANKGeb = iocEANKGeb.
  215. F_EANVGeb = iocEANVGeb.
  216. F_S_Artnr = iocS_Artnr.
  217. oplOK = FALSE.
  218. { incl/dlgenableobject.i }
  219. END PROCEDURE.
  220. /* _UIB-CODE-BLOCK-END */
  221. &ANALYZE-RESUME
  222. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI gDDWerteingabe _DEFAULT-ENABLE
  223. PROCEDURE enable_UI :
  224. /*------------------------------------------------------------------------------
  225. Purpose: ENABLE the User Interface
  226. Parameters: <none>
  227. Notes: Here we display/view/enable the widgets in the
  228. user-interface. In addition, OPEN all queries
  229. associated with each FRAME and BROWSE.
  230. These statements here are based on the "Other
  231. Settings" section of the widget Property Sheets.
  232. ------------------------------------------------------------------------------*/
  233. DISPLAY F_EANKGeb F_EANVGeb F_S_Artnr
  234. WITH FRAME gDDWerteingabe.
  235. ENABLE RECT-2 F_EANKGeb F_EANVGeb F_S_Artnr Btn_OK Btn_Cancel
  236. WITH FRAME gDDWerteingabe.
  237. VIEW FRAME gDDWerteingabe.
  238. {&OPEN-BROWSERS-IN-QUERY-gDDWerteingabe}
  239. END PROCEDURE.
  240. /* _UIB-CODE-BLOCK-END */
  241. &ANALYZE-RESUME
  242. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENDE gDDWerteingabe
  243. PROCEDURE ENDE :
  244. /*------------------------------------------------------------------------------
  245. Purpose:
  246. Parameters: <none>
  247. Notes:
  248. ------------------------------------------------------------------------------*/
  249. IF btnOK THEN DO:
  250. END.
  251. { incl/dlgende.i }
  252. END PROCEDURE.
  253. /* _UIB-CODE-BLOCK-END */
  254. &ANALYZE-RESUME