w-mahntexte.w 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. &Scoped-define WINDOW-NAME wMahntexte
  4. {adecomm/appserv.i}
  5. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS wMahntexte
  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. DEF VAR iSprcd AS INT NO-UNDO.
  27. DEF VAR iStufe AS INT NO-UNDO.
  28. DEF VAR iArt AS INT NO-UNDO.
  29. { incl/windefinition.i }
  30. {src/adm2/widgetprto.i}
  31. /* _UIB-CODE-BLOCK-END */
  32. &ANALYZE-RESUME
  33. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  34. /* ******************** Preprocessor Definitions ******************** */
  35. &Scoped-define PROCEDURE-TYPE SmartWindow
  36. &Scoped-define DB-AWARE no
  37. &Scoped-define ADM-CONTAINER WINDOW
  38. &Scoped-define ADM-SUPPORTED-LINKS Data-Target,Data-Source,Page-Target,Update-Source,Update-Target,Filter-target,Filter-Source
  39. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  40. &Scoped-define FRAME-NAME fMain
  41. /* Standard List Definitions */
  42. &Scoped-Define ENABLED-OBJECTS CB_Sprache CB_Mahnstufe CB_Textart
  43. &Scoped-Define DISPLAYED-OBJECTS CB_Sprache CB_Mahnstufe CB_Textart
  44. /* Custom List Definitions */
  45. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  46. /* _UIB-PREPROCESSOR-BLOCK-END */
  47. &ANALYZE-RESUME
  48. /* ************************ Function Prototypes ********************** */
  49. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getProgname wMahntexte
  50. FUNCTION getProgname RETURNS CHARACTER
  51. ( /* parameter-definitions */ ) FORWARD.
  52. /* _UIB-CODE-BLOCK-END */
  53. &ANALYZE-RESUME
  54. /* *********************** Control Definitions ********************** */
  55. /* Define the widget handle for the window */
  56. DEFINE VAR wMahntexte AS WIDGET-HANDLE NO-UNDO.
  57. /* Definitions of handles for SmartObjects */
  58. DEFINE VARIABLE h_d-mahntexte AS HANDLE NO-UNDO.
  59. DEFINE VARIABLE h_f-mahntexte-firma AS HANDLE NO-UNDO.
  60. DEFINE VARIABLE h_f-mahntexte-kopf AS HANDLE NO-UNDO.
  61. DEFINE VARIABLE h_f-mahntexte-kopftext AS HANDLE NO-UNDO.
  62. DEFINE VARIABLE h_f-mahntexte-rekap AS HANDLE NO-UNDO.
  63. DEFINE VARIABLE h_f-mahntexte-schlusstext AS HANDLE NO-UNDO.
  64. DEFINE VARIABLE h_f-mahntexte-ueberschrift AS HANDLE NO-UNDO.
  65. /* Definitions of the field level widgets */
  66. DEFINE VARIABLE CB_Mahnstufe AS CHARACTER FORMAT "X(256)":U INITIAL "0"
  67. LABEL "Mahnstufe"
  68. VIEW-AS COMBO-BOX INNER-LINES 5
  69. LIST-ITEM-PAIRS "Kontoauszug","0",
  70. "1. Mahnung","1",
  71. "2. Mahnung","2",
  72. "3. Mahnung","3",
  73. "Betreibung","4"
  74. DROP-DOWN-LIST
  75. SIZE 40 BY 1
  76. BGCOLOR 15 NO-UNDO.
  77. DEFINE VARIABLE CB_Sprache AS CHARACTER FORMAT "X(256)":U
  78. LABEL "Sprache"
  79. VIEW-AS COMBO-BOX INNER-LINES 5
  80. LIST-ITEM-PAIRS "Item 1","Item 1"
  81. DROP-DOWN-LIST
  82. SIZE 40 BY 1
  83. BGCOLOR 15 NO-UNDO.
  84. DEFINE VARIABLE CB_Textart AS CHARACTER FORMAT "X(256)":U INITIAL "0"
  85. LABEL "Textart"
  86. VIEW-AS COMBO-BOX INNER-LINES 7
  87. LIST-ITEM-PAIRS "Firmenanschrift","0",
  88. "Kopf-Titel","1",
  89. "Kopf-Text","2",
  90. "Ueberschrifttext","3",
  91. "Schlusstext","4",
  92. "Rekap-Text","5"
  93. DROP-DOWN-LIST
  94. SIZE 40 BY 1
  95. BGCOLOR 15 NO-UNDO.
  96. /* ************************ Frame Definitions *********************** */
  97. DEFINE FRAME fMain
  98. CB_Sprache AT ROW 1.52 COL 13 COLON-ALIGNED WIDGET-ID 2
  99. CB_Mahnstufe AT ROW 2.52 COL 13 COLON-ALIGNED WIDGET-ID 6
  100. CB_Textart AT ROW 3.52 COL 13 COLON-ALIGNED WIDGET-ID 8
  101. WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
  102. SIDE-LABELS NO-UNDERLINE THREE-D
  103. AT COL 1 ROW 1
  104. SIZE 106.8 BY 15.81 WIDGET-ID 100.
  105. /* *********************** Procedure Settings ************************ */
  106. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  107. /* Settings for THIS-PROCEDURE
  108. Type: SmartWindow
  109. Allow: Basic,Browse,DB-Fields,Query,Smart,Window
  110. Container Links: Data-Target,Data-Source,Page-Target,Update-Source,Update-Target,Filter-target,Filter-Source
  111. Design Page: 6
  112. Other Settings: COMPILE APPSERVER
  113. */
  114. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  115. /* ************************* Create Window ************************** */
  116. &ANALYZE-SUSPEND _CREATE-WINDOW
  117. IF SESSION:DISPLAY-TYPE = "GUI":U THEN
  118. CREATE WINDOW wMahntexte ASSIGN
  119. HIDDEN = YES
  120. TITLE = "Verwalten der Mahntexte"
  121. HEIGHT = 15.81
  122. WIDTH = 106.8
  123. MAX-HEIGHT = 30.48
  124. MAX-WIDTH = 160
  125. VIRTUAL-HEIGHT = 30.48
  126. VIRTUAL-WIDTH = 160
  127. RESIZE = no
  128. SCROLL-BARS = no
  129. STATUS-AREA = no
  130. BGCOLOR = ?
  131. FGCOLOR = ?
  132. THREE-D = yes
  133. MESSAGE-AREA = no
  134. SENSITIVE = yes.
  135. ELSE {&WINDOW-NAME} = CURRENT-WINDOW.
  136. &IF '{&WINDOW-SYSTEM}' NE 'TTY' &THEN
  137. IF NOT wMahntexte:LOAD-ICON("grafik/appl.ico":U) THEN
  138. MESSAGE "Unable to load icon: grafik/appl.ico"
  139. VIEW-AS ALERT-BOX WARNING BUTTONS OK.
  140. &ENDIF
  141. /* END WINDOW DEFINITION */
  142. &ANALYZE-RESUME
  143. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB wMahntexte
  144. /* ************************* Included-Libraries *********************** */
  145. {src/adm2/containr.i}
  146. /* _UIB-CODE-BLOCK-END */
  147. &ANALYZE-RESUME
  148. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  149. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  150. /* SETTINGS FOR WINDOW wMahntexte
  151. VISIBLE,,RUN-PERSISTENT */
  152. /* SETTINGS FOR FRAME fMain
  153. FRAME-NAME */
  154. IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(wMahntexte)
  155. THEN wMahntexte:HIDDEN = yes.
  156. /* _RUN-TIME-ATTRIBUTES-END */
  157. &ANALYZE-RESUME
  158. /* ************************ Control Triggers ************************ */
  159. &Scoped-define SELF-NAME wMahntexte
  160. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL wMahntexte wMahntexte
  161. ON END-ERROR OF wMahntexte /* Verwalten der Mahntexte */
  162. OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO:
  163. /* This case occurs when the user presses the "Esc" key.
  164. In a persistently run window, just ignore this. If we did not, the
  165. application would exit. */
  166. IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY.
  167. /* ****************************** */
  168. RUN ENDE.
  169. RETURN NO-APPLY.
  170. /* ****************************** */
  171. END.
  172. /* _UIB-CODE-BLOCK-END */
  173. &ANALYZE-RESUME
  174. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL wMahntexte wMahntexte
  175. ON WINDOW-CLOSE OF wMahntexte /* Verwalten der Mahntexte */
  176. DO:
  177. /* This ADM code must be left here in order for the SmartWindow
  178. and its descendents to terminate properly on exit. */
  179. RUN ENDE.
  180. RETURN NO-APPLY.
  181. END.
  182. /* _UIB-CODE-BLOCK-END */
  183. &ANALYZE-RESUME
  184. &Scoped-define SELF-NAME CB_Mahnstufe
  185. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL CB_Mahnstufe wMahntexte
  186. ON VALUE-CHANGED OF CB_Mahnstufe IN FRAME fMain /* Mahnstufe */
  187. DO:
  188. iStufe = INTEGER(CB_Mahnstufe:SCREEN-VALUE).
  189. DYNAMIC-FUNCTION('setTextArt':U IN h_d-mahntexte, iStufe, iArt ) NO-ERROR.
  190. END.
  191. /* _UIB-CODE-BLOCK-END */
  192. &ANALYZE-RESUME
  193. &Scoped-define SELF-NAME CB_Sprache
  194. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL CB_Sprache wMahntexte
  195. ON VALUE-CHANGED OF CB_Sprache IN FRAME fMain /* Sprache */
  196. DO:
  197. iSprcd = INTEGER(CB_Sprache:SCREEN-VALUE).
  198. DYNAMIC-FUNCTION('setSprcd':U IN h_d-mahntexte, iSprcd ) NO-ERROR.
  199. END.
  200. /* _UIB-CODE-BLOCK-END */
  201. &ANALYZE-RESUME
  202. &Scoped-define SELF-NAME CB_Textart
  203. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL CB_Textart wMahntexte
  204. ON VALUE-CHANGED OF CB_Textart IN FRAME fMain /* Textart */
  205. DO:
  206. iArt = INTEGER(CB_Textart:SCREEN-VALUE).
  207. RUN selectPage (iArt + 1).
  208. DYNAMIC-FUNCTION('setTextArt':U IN h_d-mahntexte, iStufe, iArt ) NO-ERROR.
  209. END.
  210. /* _UIB-CODE-BLOCK-END */
  211. &ANALYZE-RESUME
  212. &UNDEFINE SELF-NAME
  213. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK wMahntexte
  214. /* *************************** Main Block *************************** */
  215. { incl/winmainblock.i }
  216. {src/adm2/windowmn.i}
  217. /* _UIB-CODE-BLOCK-END */
  218. &ANALYZE-RESUME
  219. /* ********************** Internal Procedures *********************** */
  220. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects wMahntexte _ADM-CREATE-OBJECTS
  221. PROCEDURE adm-create-objects :
  222. /*------------------------------------------------------------------------------
  223. Purpose: Create handles for all SmartObjects used in this procedure.
  224. After SmartObjects are initialized, then SmartLinks are added.
  225. Parameters: <none>
  226. ------------------------------------------------------------------------------*/
  227. DEFINE VARIABLE currentPage AS INTEGER NO-UNDO.
  228. ASSIGN currentPage = getCurrentPage().
  229. CASE currentPage:
  230. WHEN 0 THEN DO:
  231. RUN constructObject (
  232. INPUT 'd-mahntexte.wDB-AWARE':U ,
  233. INPUT FRAME fMain:HANDLE ,
  234. INPUT 'AppServiceASInfoASUsePrompt?CacheDuration0CheckCurrentChangedyesDestroyStatelessyesDisconnectAppServernoServerOperatingModeNONEShareDatanoUpdateFromSourcenoForeignFieldsObjectNamed-mahntexteOpenOnInityesPromptColumns(NONE)PromptOnDeleteyesRowsToBatch200RebuildOnReposnoToggleDataTargetsyes':U ,
  235. OUTPUT h_d-mahntexte ).
  236. RUN repositionObject IN h_d-mahntexte ( 1.67 , 62.60 ) NO-ERROR.
  237. /* Size in AB: ( 3.71 , 32.00 ) */
  238. END. /* Page 0 */
  239. WHEN 1 THEN DO:
  240. RUN constructObject (
  241. INPUT 'f-mahntexte-firma.w':U ,
  242. INPUT FRAME fMain:HANDLE ,
  243. INPUT 'LogicalObjectNamePhysicalObjectNameDynamicObjectnoRunAttributeHideOnInitnoDisableOnInitnoObjectLayout':U ,
  244. OUTPUT h_f-mahntexte-firma ).
  245. RUN repositionObject IN h_f-mahntexte-firma ( 5.00 , 4.00 ) NO-ERROR.
  246. /* Size in AB: ( 9.57 , 68.00 ) */
  247. /* Links to SmartFrame h_f-mahntexte-firma. */
  248. RUN addLink ( h_d-mahntexte , 'Data':U , h_f-mahntexte-firma ).
  249. /* Adjust the tab order of the smart objects. */
  250. RUN adjustTabOrder ( h_f-mahntexte-firma ,
  251. CB_Textart:HANDLE IN FRAME fMain , 'AFTER':U ).
  252. END. /* Page 1 */
  253. WHEN 2 THEN DO:
  254. RUN constructObject (
  255. INPUT 'f-mahntexte-kopf.w':U ,
  256. INPUT FRAME fMain:HANDLE ,
  257. INPUT 'LogicalObjectNamePhysicalObjectNameDynamicObjectnoRunAttributeHideOnInitnoDisableOnInitnoObjectLayout':U ,
  258. OUTPUT h_f-mahntexte-kopf ).
  259. RUN repositionObject IN h_f-mahntexte-kopf ( 5.00 , 4.00 ) NO-ERROR.
  260. /* Size in AB: ( 9.57 , 68.00 ) */
  261. /* Links to SmartFrame h_f-mahntexte-kopf. */
  262. RUN addLink ( h_d-mahntexte , 'Data':U , h_f-mahntexte-kopf ).
  263. /* Adjust the tab order of the smart objects. */
  264. RUN adjustTabOrder ( h_f-mahntexte-kopf ,
  265. CB_Textart:HANDLE IN FRAME fMain , 'AFTER':U ).
  266. END. /* Page 2 */
  267. WHEN 3 THEN DO:
  268. RUN constructObject (
  269. INPUT 'f-mahntexte-kopftext.w':U ,
  270. INPUT FRAME fMain:HANDLE ,
  271. INPUT 'LogicalObjectNamePhysicalObjectNameDynamicObjectnoRunAttributeHideOnInitnoDisableOnInitnoObjectLayout':U ,
  272. OUTPUT h_f-mahntexte-kopftext ).
  273. RUN repositionObject IN h_f-mahntexte-kopftext ( 5.00 , 4.00 ) NO-ERROR.
  274. /* Size in AB: ( 9.57 , 94.40 ) */
  275. /* Links to SmartFrame h_f-mahntexte-kopftext. */
  276. RUN addLink ( h_d-mahntexte , 'Data':U , h_f-mahntexte-kopftext ).
  277. /* Adjust the tab order of the smart objects. */
  278. RUN adjustTabOrder ( h_f-mahntexte-kopftext ,
  279. CB_Textart:HANDLE IN FRAME fMain , 'AFTER':U ).
  280. END. /* Page 3 */
  281. WHEN 4 THEN DO:
  282. RUN constructObject (
  283. INPUT 'f-mahntexte-ueberschrift.w':U ,
  284. INPUT FRAME fMain:HANDLE ,
  285. INPUT 'LogicalObjectNamePhysicalObjectNameDynamicObjectnoRunAttributeHideOnInitnoDisableOnInitnoObjectLayout':U ,
  286. OUTPUT h_f-mahntexte-ueberschrift ).
  287. RUN repositionObject IN h_f-mahntexte-ueberschrift ( 5.00 , 4.00 ) NO-ERROR.
  288. /* Size in AB: ( 11.43 , 80.00 ) */
  289. /* Links to SmartFrame h_f-mahntexte-ueberschrift. */
  290. RUN addLink ( h_d-mahntexte , 'Data':U , h_f-mahntexte-ueberschrift ).
  291. /* Adjust the tab order of the smart objects. */
  292. RUN adjustTabOrder ( h_f-mahntexte-ueberschrift ,
  293. CB_Textart:HANDLE IN FRAME fMain , 'AFTER':U ).
  294. END. /* Page 4 */
  295. WHEN 5 THEN DO:
  296. RUN constructObject (
  297. INPUT 'f-mahntexte-schlusstext.w':U ,
  298. INPUT FRAME fMain:HANDLE ,
  299. INPUT 'LogicalObjectNamePhysicalObjectNameDynamicObjectnoRunAttributeHideOnInitnoDisableOnInitnoObjectLayout':U ,
  300. OUTPUT h_f-mahntexte-schlusstext ).
  301. RUN repositionObject IN h_f-mahntexte-schlusstext ( 5.00 , 4.00 ) NO-ERROR.
  302. /* Size in AB: ( 9.57 , 94.40 ) */
  303. /* Links to SmartFrame h_f-mahntexte-schlusstext. */
  304. RUN addLink ( h_d-mahntexte , 'Data':U , h_f-mahntexte-schlusstext ).
  305. /* Adjust the tab order of the smart objects. */
  306. RUN adjustTabOrder ( h_f-mahntexte-schlusstext ,
  307. CB_Textart:HANDLE IN FRAME fMain , 'AFTER':U ).
  308. END. /* Page 5 */
  309. WHEN 6 THEN DO:
  310. RUN constructObject (
  311. INPUT 'f-mahntexte-rekap.w':U ,
  312. INPUT FRAME fMain:HANDLE ,
  313. INPUT 'LogicalObjectNamePhysicalObjectNameDynamicObjectnoRunAttributeHideOnInitnoDisableOnInitnoObjectLayout':U ,
  314. OUTPUT h_f-mahntexte-rekap ).
  315. RUN repositionObject IN h_f-mahntexte-rekap ( 5.00 , 4.00 ) NO-ERROR.
  316. /* Size in AB: ( 11.43 , 80.00 ) */
  317. /* Links to SmartFrame h_f-mahntexte-rekap. */
  318. RUN addLink ( h_d-mahntexte , 'Data':U , h_f-mahntexte-rekap ).
  319. /* Adjust the tab order of the smart objects. */
  320. RUN adjustTabOrder ( h_f-mahntexte-rekap ,
  321. CB_Textart:HANDLE IN FRAME fMain , 'AFTER':U ).
  322. END. /* Page 6 */
  323. END CASE.
  324. END PROCEDURE.
  325. /* _UIB-CODE-BLOCK-END */
  326. &ANALYZE-RESUME
  327. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE changePage wMahntexte
  328. PROCEDURE changePage :
  329. /*------------------------------------------------------------------------------
  330. Purpose: Super Override
  331. Parameters:
  332. Notes:
  333. ------------------------------------------------------------------------------*/
  334. RUN SUPER.
  335. AktSeite = DYNAMIC-FUNCTION('getCurrentPage':U) NO-ERROR.
  336. CASE AktSeite:
  337. WHEN 1 THEN DO:
  338. /* RUN addLink ( hAktionen , 'TableIO':U , h_v-auftr ). */
  339. /* RUN addLink ( hAktionen , 'Navigation':U , h_d-auftr ). */
  340. /* RUN setButtons IN hAktionen ( 'initial-TableIo' ) NO-ERROR. */
  341. END.
  342. WHEN 2 THEN DO:
  343. END.
  344. END CASE.
  345. RUN ENTRY_CURSOR.
  346. END PROCEDURE.
  347. /* _UIB-CODE-BLOCK-END */
  348. &ANALYZE-RESUME
  349. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DISABLE_COMBO wMahntexte
  350. PROCEDURE DISABLE_COMBO :
  351. /*------------------------------------------------------------------------------
  352. Purpose:
  353. Parameters: <none>
  354. Notes:
  355. ------------------------------------------------------------------------------*/
  356. DO WITH FRAME {&FRAME-NAME}:
  357. CB_Sprache :SENSITIVE = FALSE.
  358. CB_Mahnstufe:SENSITIVE = FALSE.
  359. CB_Textart :SENSITIVE = FALSE.
  360. END.
  361. END PROCEDURE.
  362. /* _UIB-CODE-BLOCK-END */
  363. &ANALYZE-RESUME
  364. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI wMahntexte _DEFAULT-DISABLE
  365. PROCEDURE disable_UI :
  366. /*------------------------------------------------------------------------------
  367. Purpose: DISABLE the User Interface
  368. Parameters: <none>
  369. Notes: Here we clean-up the user-interface by deleting
  370. dynamic widgets we have created and/or hide
  371. frames. This procedure is usually called when
  372. we are ready to "clean-up" after running.
  373. ------------------------------------------------------------------------------*/
  374. /* Delete the WINDOW we created */
  375. IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(wMahntexte)
  376. THEN DELETE WIDGET wMahntexte.
  377. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  378. END PROCEDURE.
  379. /* _UIB-CODE-BLOCK-END */
  380. &ANALYZE-RESUME
  381. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enableObject wMahntexte
  382. PROCEDURE enableObject :
  383. /*------------------------------------------------------------------------------
  384. Purpose: Super Override
  385. Parameters:
  386. Notes:
  387. ------------------------------------------------------------------------------*/
  388. { incl/winenableobject.i }
  389. RUN SUPER.
  390. /* Code placed here will execute AFTER standard behavior. */
  391. END PROCEDURE.
  392. /* _UIB-CODE-BLOCK-END */
  393. &ANALYZE-RESUME
  394. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENABLE_COMBO wMahntexte
  395. PROCEDURE ENABLE_COMBO :
  396. /*------------------------------------------------------------------------------
  397. Purpose:
  398. Parameters: <none>
  399. Notes:
  400. ------------------------------------------------------------------------------*/
  401. DO WITH FRAME {&FRAME-NAME}:
  402. CB_Sprache :SENSITIVE = TRUE.
  403. CB_Mahnstufe:SENSITIVE = TRUE.
  404. CB_Textart :SENSITIVE = TRUE.
  405. DYNAMIC-FUNCTION('setTextArt':U IN h_d-mahntexte, iStufe, iArt ) NO-ERROR.
  406. END.
  407. END PROCEDURE.
  408. /* _UIB-CODE-BLOCK-END */
  409. &ANALYZE-RESUME
  410. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI wMahntexte _DEFAULT-ENABLE
  411. PROCEDURE enable_UI :
  412. /*------------------------------------------------------------------------------
  413. Purpose: ENABLE the User Interface
  414. Parameters: <none>
  415. Notes: Here we display/view/enable the widgets in the
  416. user-interface. In addition, OPEN all queries
  417. associated with each FRAME and BROWSE.
  418. These statements here are based on the "Other
  419. Settings" section of the widget Property Sheets.
  420. ------------------------------------------------------------------------------*/
  421. DISPLAY CB_Sprache CB_Mahnstufe CB_Textart
  422. WITH FRAME fMain IN WINDOW wMahntexte.
  423. ENABLE CB_Sprache CB_Mahnstufe CB_Textart
  424. WITH FRAME fMain IN WINDOW wMahntexte.
  425. {&OPEN-BROWSERS-IN-QUERY-fMain}
  426. VIEW wMahntexte.
  427. END PROCEDURE.
  428. /* _UIB-CODE-BLOCK-END */
  429. &ANALYZE-RESUME
  430. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENDE wMahntexte
  431. PROCEDURE ENDE :
  432. /*------------------------------------------------------------------------------
  433. Purpose:
  434. Parameters: <none>
  435. Notes:
  436. ------------------------------------------------------------------------------*/
  437. { incl/winende.i }
  438. END PROCEDURE.
  439. /* _UIB-CODE-BLOCK-END */
  440. &ANALYZE-RESUME
  441. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENTRY_CURSOR wMahntexte
  442. PROCEDURE ENTRY_CURSOR :
  443. /*------------------------------------------------------------------------------
  444. Purpose:
  445. Parameters: <none>
  446. Notes:
  447. ------------------------------------------------------------------------------*/
  448. AktSeite = DYNAMIC-FUNCTION('getCurrentPage':U) NO-ERROR.
  449. FMutFlag = DYNAMIC-FUNCTION('getMutflag':U, INPUT Progname) NO-ERROR.
  450. CASE AktSeite:
  451. WHEN 1 THEN RUN applyEntry IN h_f-mahntexte-firma ( INPUT ? ).
  452. WHEN 2 THEN RUN applyEntry IN h_f-mahntexte-kopf ( INPUT ? ).
  453. WHEN 3 THEN RUN applyEntry IN h_f-mahntexte-kopftext ( INPUT ? ).
  454. WHEN 4 THEN RUN applyEntry IN h_f-mahntexte-ueberschrift ( INPUT ? ).
  455. WHEN 5 THEN RUN applyEntry IN h_f-mahntexte-schlusstext ( INPUT ? ).
  456. /* WHEN 6 THEN RUN applyEntry IN h_b-auffak ( INPUT ? ). */
  457. /* WHEN 7 THEN RUN applyEntry IN h_b-position ( INPUT ? ). */
  458. END CASE.
  459. RETURN NO-APPLY.
  460. END PROCEDURE.
  461. /* _UIB-CODE-BLOCK-END */
  462. &ANALYZE-RESUME
  463. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE exitObject wMahntexte
  464. PROCEDURE exitObject :
  465. /*------------------------------------------------------------------------------
  466. Purpose: Window-specific override of this procedure which destroys
  467. its contents and itself.
  468. Notes:
  469. ------------------------------------------------------------------------------*/
  470. RUN ENDE.
  471. RETURN NO-APPLY.
  472. END PROCEDURE.
  473. /* _UIB-CODE-BLOCK-END */
  474. &ANALYZE-RESUME
  475. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject wMahntexte
  476. PROCEDURE initializeObject :
  477. /*------------------------------------------------------------------------------
  478. Purpose: Super Override
  479. Parameters:
  480. Notes:
  481. ------------------------------------------------------------------------------*/
  482. DO WITH FRAME {&FRAME-NAME}:
  483. RUN COMBO_SPRACHE ( CB_Sprache:HANDLE ).
  484. ASSIGN iSprcd = 1
  485. iStufe = 0
  486. iArt = 0.
  487. END.
  488. RUN SUPER.
  489. { incl/wininitializeobject.i }
  490. CB_Sprache :SCREEN-VALUE = STRING(iSprcd,'999999') NO-ERROR.
  491. CB_Mahnstufe:SCREEN-VALUE = STRING(iStufe).
  492. CB_Textart :SCREEN-VALUE = STRING(iArt) .
  493. APPLY 'VALUE-CHANGED' TO CB_Textart.
  494. END PROCEDURE.
  495. /* _UIB-CODE-BLOCK-END */
  496. &ANALYZE-RESUME
  497. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SEITENWECHSEL wMahntexte
  498. PROCEDURE SEITENWECHSEL :
  499. /*------------------------------------------------------------------------------
  500. Purpose:
  501. Parameters: <none>
  502. Notes:
  503. ------------------------------------------------------------------------------*/
  504. { incl/winseitenwechsel.i }
  505. END PROCEDURE.
  506. /* _UIB-CODE-BLOCK-END */
  507. &ANALYZE-RESUME
  508. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE selectPage wMahntexte
  509. PROCEDURE selectPage :
  510. /*------------------------------------------------------------------------------
  511. Purpose: Super Override
  512. Parameters:
  513. Notes:
  514. ------------------------------------------------------------------------------*/
  515. DEF INPUT PARAMETER piPageNum AS INT NO-UNDO.
  516. DEF VAR FMutFlag AS LOG NO-UNDO.
  517. DEF VAR MutProg AS CHAR NO-UNDO.
  518. FMutFlag = DYNAMIC-FUNCTION ('getMutflag':U, INPUT Progname) NO-ERROR.
  519. IF FMutFlag THEN RETURN NO-APPLY.
  520. CASE piPageNum:
  521. END CASE.
  522. AktSeite = DYNAMIC-FUNCTION('getCurrentPage':U) NO-ERROR.
  523. CASE AktSeite:
  524. WHEN 1 THEN DO:
  525. /* RUN removeLink ( hAktionen , 'TableIO':U , h_v-auftr ). */
  526. /* RUN removeLink ( hAktionen , 'Navigation':U , h_d-auftr ). */
  527. END.
  528. END CASE.
  529. RUN SUPER( INPUT piPageNum).
  530. END PROCEDURE.
  531. /* _UIB-CODE-BLOCK-END */
  532. &ANALYZE-RESUME
  533. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE TOOLBAR wMahntexte
  534. PROCEDURE TOOLBAR :
  535. /*------------------------------------------------------------------------------
  536. Purpose:
  537. Parameters: <none>
  538. Notes:
  539. ------------------------------------------------------------------------------*/
  540. { incl/wintoolbar.i }
  541. END PROCEDURE.
  542. /* _UIB-CODE-BLOCK-END */
  543. &ANALYZE-RESUME
  544. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE viewObject wMahntexte
  545. PROCEDURE viewObject :
  546. /*------------------------------------------------------------------------------
  547. Purpose: Super Override
  548. Parameters:
  549. Notes:
  550. ------------------------------------------------------------------------------*/
  551. RUN SUPER.
  552. RUN ENTRY_CURSOR.
  553. END PROCEDURE.
  554. /* _UIB-CODE-BLOCK-END */
  555. &ANALYZE-RESUME
  556. /* ************************ Function Implementations ***************** */
  557. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getProgname wMahntexte
  558. FUNCTION getProgname RETURNS CHARACTER
  559. ( /* parameter-definitions */ ) :
  560. /*------------------------------------------------------------------------------
  561. Purpose:
  562. Notes:
  563. ------------------------------------------------------------------------------*/
  564. RETURN Progname.
  565. END FUNCTION.
  566. /* _UIB-CODE-BLOCK-END */
  567. &ANALYZE-RESUME