w-geruestet-kontrolle.w 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. &Scoped-define WINDOW-NAME wgeruestetcontrolle
  4. {adecomm/appserv.i}
  5. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS wgeruestetcontrolle
  6. /*------------------------------------------------------------------------
  7. File:
  8. Description: from cntnrwin.w - ADM SmartWindow Template
  9. Input Parameters:
  10. <none>
  11. Output Parameters:
  12. <none>
  13. History: New V9 Version - January 15, 1998
  14. ------------------------------------------------------------------------*/
  15. /* This .W file was created with the Progress AB. */
  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. { incl/windefinition.i }
  27. {src/adm2/widgetprto.i}
  28. /* _UIB-CODE-BLOCK-END */
  29. &ANALYZE-RESUME
  30. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  31. /* ******************** Preprocessor Definitions ******************** */
  32. &Scoped-define PROCEDURE-TYPE SmartWindow
  33. &Scoped-define DB-AWARE no
  34. &Scoped-define ADM-CONTAINER WINDOW
  35. &Scoped-define ADM-SUPPORTED-LINKS Data-Target,Data-Source,Page-Target,Update-Source,Update-Target,Filter-target,Filter-Source
  36. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  37. &Scoped-define FRAME-NAME fMain
  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. /* ************************ Function Prototypes ********************** */
  43. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getProgname wgeruestetcontrolle
  44. FUNCTION getProgname RETURNS CHARACTER
  45. ( /* parameter-definitions */ ) FORWARD.
  46. /* _UIB-CODE-BLOCK-END */
  47. &ANALYZE-RESUME
  48. /* *********************** Control Definitions ********************** */
  49. /* Define the widget handle for the window */
  50. DEFINE VAR wgeruestetcontrolle AS WIDGET-HANDLE NO-UNDO.
  51. /* Definitions of handles for SmartObjects */
  52. DEFINE VARIABLE h_b-geruestet-kontrolle AS HANDLE NO-UNDO.
  53. DEFINE VARIABLE h_d-geruestet-kontrolle AS HANDLE NO-UNDO.
  54. /* ************************ Frame Definitions *********************** */
  55. DEFINE FRAME fMain
  56. WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
  57. SIDE-LABELS NO-UNDERLINE THREE-D
  58. AT COL 1 ROW 1
  59. SIZE 83.2 BY 13.19 WIDGET-ID 100.
  60. /* *********************** Procedure Settings ************************ */
  61. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  62. /* Settings for THIS-PROCEDURE
  63. Type: SmartWindow
  64. Allow: Basic,Browse,DB-Fields,Query,Smart,Window
  65. Container Links: Data-Target,Data-Source,Page-Target,Update-Source,Update-Target,Filter-target,Filter-Source
  66. Other Settings: COMPILE APPSERVER
  67. */
  68. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  69. /* ************************* Create Window ************************** */
  70. &ANALYZE-SUSPEND _CREATE-WINDOW
  71. IF SESSION:DISPLAY-TYPE = "GUI":U THEN
  72. CREATE WINDOW wgeruestetcontrolle ASSIGN
  73. HIDDEN = YES
  74. TITLE = "Kontrolle über gerüstete Scheine"
  75. HEIGHT = 13.19
  76. WIDTH = 83.2
  77. MAX-HEIGHT = 30.48
  78. MAX-WIDTH = 160
  79. VIRTUAL-HEIGHT = 30.48
  80. VIRTUAL-WIDTH = 160
  81. RESIZE = no
  82. SCROLL-BARS = no
  83. STATUS-AREA = no
  84. BGCOLOR = ?
  85. FGCOLOR = ?
  86. THREE-D = yes
  87. MESSAGE-AREA = no
  88. SENSITIVE = yes.
  89. ELSE {&WINDOW-NAME} = CURRENT-WINDOW.
  90. &IF '{&WINDOW-SYSTEM}' NE 'TTY' &THEN
  91. IF NOT wgeruestetcontrolle:LOAD-ICON("grafik/appl.ico":U) THEN
  92. MESSAGE "Unable to load icon: grafik/appl.ico"
  93. VIEW-AS ALERT-BOX WARNING BUTTONS OK.
  94. &ENDIF
  95. /* END WINDOW DEFINITION */
  96. &ANALYZE-RESUME
  97. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB wgeruestetcontrolle
  98. /* ************************* Included-Libraries *********************** */
  99. {src/adm2/containr.i}
  100. /* _UIB-CODE-BLOCK-END */
  101. &ANALYZE-RESUME
  102. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  103. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  104. /* SETTINGS FOR WINDOW wgeruestetcontrolle
  105. VISIBLE,,RUN-PERSISTENT */
  106. /* SETTINGS FOR FRAME fMain
  107. FRAME-NAME */
  108. IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(wgeruestetcontrolle)
  109. THEN wgeruestetcontrolle:HIDDEN = yes.
  110. /* _RUN-TIME-ATTRIBUTES-END */
  111. &ANALYZE-RESUME
  112. /* ************************ Control Triggers ************************ */
  113. &Scoped-define SELF-NAME wgeruestetcontrolle
  114. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL wgeruestetcontrolle wgeruestetcontrolle
  115. ON END-ERROR OF wgeruestetcontrolle /* Kontrolle über gerüstete Scheine */
  116. OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO:
  117. /* This case occurs when the user presses the "Esc" key.
  118. In a persistently run window, just ignore this. If we did not, the
  119. application would exit. */
  120. IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY.
  121. /* ****************************** */
  122. RUN ENDE.
  123. RETURN NO-APPLY.
  124. /* ****************************** */
  125. END.
  126. /* _UIB-CODE-BLOCK-END */
  127. &ANALYZE-RESUME
  128. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL wgeruestetcontrolle wgeruestetcontrolle
  129. ON WINDOW-CLOSE OF wgeruestetcontrolle /* Kontrolle über gerüstete Scheine */
  130. DO:
  131. /* This ADM code must be left here in order for the SmartWindow
  132. and its descendents to terminate properly on exit. */
  133. RUN ENDE.
  134. RETURN NO-APPLY.
  135. END.
  136. /* _UIB-CODE-BLOCK-END */
  137. &ANALYZE-RESUME
  138. &UNDEFINE SELF-NAME
  139. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK wgeruestetcontrolle
  140. /* *************************** Main Block *************************** */
  141. { incl/winmainblock.i }
  142. {src/adm2/windowmn.i}
  143. /* _UIB-CODE-BLOCK-END */
  144. &ANALYZE-RESUME
  145. /* ********************** Internal Procedures *********************** */
  146. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects wgeruestetcontrolle _ADM-CREATE-OBJECTS
  147. PROCEDURE adm-create-objects :
  148. /*------------------------------------------------------------------------------
  149. Purpose: Create handles for all SmartObjects used in this procedure.
  150. After SmartObjects are initialized, then SmartLinks are added.
  151. Parameters: <none>
  152. ------------------------------------------------------------------------------*/
  153. DEFINE VARIABLE currentPage AS INTEGER NO-UNDO.
  154. ASSIGN currentPage = getCurrentPage().
  155. CASE currentPage:
  156. WHEN 0 THEN DO:
  157. RUN constructObject (
  158. INPUT 'd-geruestet-kontrolle.wDB-AWARE':U ,
  159. INPUT FRAME fMain:HANDLE ,
  160. INPUT 'AppServiceASInfoASUsePrompt?CacheDuration0CheckCurrentChangedyesDestroyStatelessyesDisconnectAppServernoServerOperatingModeNONEShareDatanoUpdateFromSourcenoForeignFieldsObjectNamed-geruestet-kontrolleOpenOnInityesPromptColumns(NONE)PromptOnDeletenoRowsToBatch50RebuildOnReposyesToggleDataTargetsyes':U ,
  161. OUTPUT h_d-geruestet-kontrolle ).
  162. RUN repositionObject IN h_d-geruestet-kontrolle ( 1.67 , 12.60 ) NO-ERROR.
  163. /* Size in AB: ( 4.19 , 20.80 ) */
  164. END. /* Page 0 */
  165. WHEN 1 THEN DO:
  166. RUN constructObject (
  167. INPUT 'b-geruestet-kontrolle.w':U ,
  168. INPUT FRAME fMain:HANDLE ,
  169. INPUT 'ScrollRemotenoNumDown0CalcWidthnoMaxWidth80FetchOnReposToEndyesUseSortIndicatoryesSearchFieldDataSourceNames?UpdateTargetNames?LogicalObjectNameHideOnInitnoDisableOnInitnoObjectLayout':U ,
  170. OUTPUT h_b-geruestet-kontrolle ).
  171. RUN repositionObject IN h_b-geruestet-kontrolle ( 1.00 , 1.00 ) NO-ERROR.
  172. RUN resizeObject IN h_b-geruestet-kontrolle ( 13.10 , 83.00 ) NO-ERROR.
  173. /* Links to SmartDataBrowser h_b-geruestet-kontrolle. */
  174. RUN addLink ( h_d-geruestet-kontrolle , 'Data':U , h_b-geruestet-kontrolle ).
  175. /* Adjust the tab order of the smart objects. */
  176. END. /* Page 1 */
  177. END CASE.
  178. /* Select a Startup page. */
  179. IF currentPage eq 0
  180. THEN RUN selectPage IN THIS-PROCEDURE ( 1 ).
  181. END PROCEDURE.
  182. /* _UIB-CODE-BLOCK-END */
  183. &ANALYZE-RESUME
  184. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE changePage wgeruestetcontrolle
  185. PROCEDURE changePage :
  186. /*------------------------------------------------------------------------------
  187. Purpose: Super Override
  188. Parameters:
  189. Notes:
  190. ------------------------------------------------------------------------------*/
  191. RUN SUPER.
  192. AktSeite = DYNAMIC-FUNCTION('getCurrentPage':U) NO-ERROR.
  193. CASE AktSeite:
  194. WHEN 1 THEN DO:
  195. /* RUN addLink ( hAktionen , 'TableIO':U , h_v-auftr ). */
  196. /* RUN addLink ( hAktionen , 'Navigation':U , h_d-auftr ). */
  197. /* RUN setButtons IN hAktionen ( 'initial-TableIo' ) NO-ERROR. */
  198. END.
  199. WHEN 2 THEN DO:
  200. END.
  201. END CASE.
  202. RUN ENTRY_CURSOR.
  203. END PROCEDURE.
  204. /* _UIB-CODE-BLOCK-END */
  205. &ANALYZE-RESUME
  206. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI wgeruestetcontrolle _DEFAULT-DISABLE
  207. PROCEDURE disable_UI :
  208. /*------------------------------------------------------------------------------
  209. Purpose: DISABLE the User Interface
  210. Parameters: <none>
  211. Notes: Here we clean-up the user-interface by deleting
  212. dynamic widgets we have created and/or hide
  213. frames. This procedure is usually called when
  214. we are ready to "clean-up" after running.
  215. ------------------------------------------------------------------------------*/
  216. /* Delete the WINDOW we created */
  217. IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(wgeruestetcontrolle)
  218. THEN DELETE WIDGET wgeruestetcontrolle.
  219. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  220. END PROCEDURE.
  221. /* _UIB-CODE-BLOCK-END */
  222. &ANALYZE-RESUME
  223. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enableObject wgeruestetcontrolle
  224. PROCEDURE enableObject :
  225. /*------------------------------------------------------------------------------
  226. Purpose: Super Override
  227. Parameters:
  228. Notes:
  229. ------------------------------------------------------------------------------*/
  230. { incl/winenableobject.i }
  231. RUN SUPER.
  232. /* Code placed here will execute AFTER standard behavior. */
  233. END PROCEDURE.
  234. /* _UIB-CODE-BLOCK-END */
  235. &ANALYZE-RESUME
  236. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI wgeruestetcontrolle _DEFAULT-ENABLE
  237. PROCEDURE enable_UI :
  238. /*------------------------------------------------------------------------------
  239. Purpose: ENABLE the User Interface
  240. Parameters: <none>
  241. Notes: Here we display/view/enable the widgets in the
  242. user-interface. In addition, OPEN all queries
  243. associated with each FRAME and BROWSE.
  244. These statements here are based on the "Other
  245. Settings" section of the widget Property Sheets.
  246. ------------------------------------------------------------------------------*/
  247. VIEW FRAME fMain IN WINDOW wgeruestetcontrolle.
  248. {&OPEN-BROWSERS-IN-QUERY-fMain}
  249. VIEW wgeruestetcontrolle.
  250. END PROCEDURE.
  251. /* _UIB-CODE-BLOCK-END */
  252. &ANALYZE-RESUME
  253. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENDE wgeruestetcontrolle
  254. PROCEDURE ENDE :
  255. /*------------------------------------------------------------------------------
  256. Purpose:
  257. Parameters: <none>
  258. Notes:
  259. ------------------------------------------------------------------------------*/
  260. { incl/winende.i }
  261. END PROCEDURE.
  262. /* _UIB-CODE-BLOCK-END */
  263. &ANALYZE-RESUME
  264. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENTRY_CURSOR wgeruestetcontrolle
  265. PROCEDURE ENTRY_CURSOR :
  266. /*------------------------------------------------------------------------------
  267. Purpose:
  268. Parameters: <none>
  269. Notes:
  270. ------------------------------------------------------------------------------*/
  271. AktSeite = DYNAMIC-FUNCTION('getCurrentPage':U) NO-ERROR.
  272. FMutFlag = DYNAMIC-FUNCTION('getMutflag':U, INPUT Progname) NO-ERROR.
  273. CASE AktSeite:
  274. /* WHEN 1 THEN DO: */
  275. /* IF FMutFlag THEN RUN applyEntry IN h_v- ( INPUT ? ). */
  276. /* ELSE RUN applyEntry IN h_b- ( INPUT ? ). */
  277. /* END. */
  278. WHEN 1 THEN RUN applyEntry IN h_b-geruestet-kontrolle ( INPUT ? ).
  279. /* WHEN 2 THEN RUN applyEntry IN h_f-adrkomm ( INPUT ? ). */
  280. /* WHEN 3 THEN RUN applyEntry IN h_b-auftbb ( INPUT ? ). */
  281. /* WHEN 4 THEN RUN applyEntry IN h_b-aufdet ( INPUT ? ). */
  282. /* WHEN 5 THEN RUN applyEntry IN h_b-aufstreu ( INPUT ? ). */
  283. /* WHEN 6 THEN RUN applyEntry IN h_b-auffak ( INPUT ? ). */
  284. /* WHEN 7 THEN RUN applyEntry IN h_b-position ( INPUT ? ). */
  285. END CASE.
  286. RETURN NO-APPLY.
  287. END PROCEDURE.
  288. /* _UIB-CODE-BLOCK-END */
  289. &ANALYZE-RESUME
  290. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE exitObject wgeruestetcontrolle
  291. PROCEDURE exitObject :
  292. /*------------------------------------------------------------------------------
  293. Purpose: Window-specific override of this procedure which destroys
  294. its contents and itself.
  295. Notes:
  296. ------------------------------------------------------------------------------*/
  297. RUN ENDE.
  298. RETURN NO-APPLY.
  299. END PROCEDURE.
  300. /* _UIB-CODE-BLOCK-END */
  301. &ANALYZE-RESUME
  302. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject wgeruestetcontrolle
  303. PROCEDURE initializeObject :
  304. /*------------------------------------------------------------------------------
  305. Purpose: Super Override
  306. Parameters:
  307. Notes:
  308. ------------------------------------------------------------------------------*/
  309. /* Code placed here will execute PRIOR to standard behavior. */
  310. RUN SUPER.
  311. { incl/wininitializeobject.i }
  312. END PROCEDURE.
  313. /* _UIB-CODE-BLOCK-END */
  314. &ANALYZE-RESUME
  315. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SEITENWECHSEL wgeruestetcontrolle
  316. PROCEDURE SEITENWECHSEL :
  317. /*------------------------------------------------------------------------------
  318. Purpose:
  319. Parameters: <none>
  320. Notes:
  321. ------------------------------------------------------------------------------*/
  322. { incl/winseitenwechsel.i }
  323. END PROCEDURE.
  324. /* _UIB-CODE-BLOCK-END */
  325. &ANALYZE-RESUME
  326. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE selectPage wgeruestetcontrolle
  327. PROCEDURE selectPage :
  328. /*------------------------------------------------------------------------------
  329. Purpose: Super Override
  330. Parameters:
  331. Notes:
  332. ------------------------------------------------------------------------------*/
  333. DEF INPUT PARAMETER piPageNum AS INT NO-UNDO.
  334. DEF VAR FMutFlag AS LOG NO-UNDO.
  335. DEF VAR MutProg AS CHAR NO-UNDO.
  336. FMutFlag = DYNAMIC-FUNCTION ('getMutflag':U, INPUT Progname) NO-ERROR.
  337. IF FMutFlag THEN RETURN NO-APPLY.
  338. CASE piPageNum:
  339. END CASE.
  340. AktSeite = DYNAMIC-FUNCTION('getCurrentPage':U) NO-ERROR.
  341. CASE AktSeite:
  342. WHEN 1 THEN DO:
  343. /* RUN removeLink ( hAktionen , 'TableIO':U , h_v-auftr ). */
  344. /* RUN removeLink ( hAktionen , 'Navigation':U , h_d-auftr ). */
  345. END.
  346. END CASE.
  347. RUN SUPER( INPUT piPageNum).
  348. END PROCEDURE.
  349. /* _UIB-CODE-BLOCK-END */
  350. &ANALYZE-RESUME
  351. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE TOOLBAR wgeruestetcontrolle
  352. PROCEDURE TOOLBAR :
  353. /*------------------------------------------------------------------------------
  354. Purpose:
  355. Parameters: <none>
  356. Notes:
  357. ------------------------------------------------------------------------------*/
  358. { incl/wintoolbar.i }
  359. END PROCEDURE.
  360. /* _UIB-CODE-BLOCK-END */
  361. &ANALYZE-RESUME
  362. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE viewObject wgeruestetcontrolle
  363. PROCEDURE viewObject :
  364. /*------------------------------------------------------------------------------
  365. Purpose: Super Override
  366. Parameters:
  367. Notes:
  368. ------------------------------------------------------------------------------*/
  369. RUN SUPER.
  370. RUN ENTRY_CURSOR.
  371. END PROCEDURE.
  372. /* _UIB-CODE-BLOCK-END */
  373. &ANALYZE-RESUME
  374. /* ************************ Function Implementations ***************** */
  375. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getProgname wgeruestetcontrolle
  376. FUNCTION getProgname RETURNS CHARACTER
  377. ( /* parameter-definitions */ ) :
  378. /*------------------------------------------------------------------------------
  379. Purpose:
  380. Notes:
  381. ------------------------------------------------------------------------------*/
  382. RETURN Progname.
  383. END FUNCTION.
  384. /* _UIB-CODE-BLOCK-END */
  385. &ANALYZE-RESUME