g-mahntexte.w 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  4. &Scoped-define FRAME-NAME dMahntexte
  5. {adecomm/appserv.i}
  6. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dMahntexte
  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. /* Local Variable Definitions --- */
  28. DEF VAR cCodeC AS CHAR NO-UNDO.
  29. DEF VAR iCodeI AS INT NO-UNDO.
  30. DEF VAR cRecArt AS CHAR INIT 'MATEXT' NO-UNDO.
  31. DEF VAR iSprcd AS INT NO-UNDO.
  32. DEF VAR ix AS INT NO-UNDO.
  33. { incl/dlgdefinition.i }
  34. { src/adm2/widgetprto.i }
  35. /* _UIB-CODE-BLOCK-END */
  36. &ANALYZE-RESUME
  37. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  38. /* ******************** Preprocessor Definitions ******************** */
  39. &Scoped-define PROCEDURE-TYPE SmartDialog
  40. &Scoped-define DB-AWARE no
  41. &Scoped-define ADM-CONTAINER DIALOG-BOX
  42. &Scoped-define ADM-SUPPORTED-LINKS Data-Target,Data-Source,Page-Target,Update-Source,Update-Target
  43. /* Name of designated FRAME-NAME and/or first browse and/or first query */
  44. &Scoped-define FRAME-NAME dMahntexte
  45. /* Standard List Definitions */
  46. &Scoped-Define ENABLED-OBJECTS E_Text RECT-2 R_Stufe R_Art CB_Sprache ~
  47. Btn_OK Btn_Cancel
  48. &Scoped-Define DISPLAYED-OBJECTS E_Text R_Stufe R_Art CB_Sprache
  49. /* Custom List Definitions */
  50. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  51. &Scoped-define List-6 R_Stufe R_Art
  52. /* _UIB-PREPROCESSOR-BLOCK-END */
  53. &ANALYZE-RESUME
  54. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartDialogCues" dMahntexte _INLINE
  55. /* Actions: adecomm/_so-cue.w ? adecomm/_so-cued.p ? adecomm/_so-cuew.p */
  56. /* SmartDialog,ab,49267
  57. Destroy on next read */
  58. /* _UIB-CODE-BLOCK-END */
  59. &ANALYZE-RESUME
  60. /* *********************** Control Definitions ********************** */
  61. /* Define a dialog box */
  62. /* Definitions of the field level widgets */
  63. DEFINE BUTTON Btn_Cancel AUTO-END-KEY
  64. LABEL "abbrechen"
  65. SIZE 15 BY 1.
  66. DEFINE BUTTON Btn_OK AUTO-GO
  67. LABEL "OK"
  68. SIZE 15 BY 1.
  69. DEFINE VARIABLE CB_Sprache AS CHARACTER FORMAT "X(256)":U
  70. LABEL "Sprache"
  71. VIEW-AS COMBO-BOX INNER-LINES 5
  72. LIST-ITEM-PAIRS "Item 1","Item 1"
  73. DROP-DOWN-LIST
  74. SIZE 42 BY 1 NO-UNDO.
  75. DEFINE VARIABLE E_Text AS CHARACTER
  76. VIEW-AS EDITOR NO-WORD-WRAP SCROLLBAR-HORIZONTAL SCROLLBAR-VERTICAL
  77. SIZE 162 BY 14.29
  78. BGCOLOR 15 FONT 3 NO-UNDO.
  79. DEFINE VARIABLE R_Art AS INTEGER INITIAL 1
  80. VIEW-AS RADIO-SET VERTICAL
  81. RADIO-BUTTONS
  82. "Kopftext", 1,
  83. "Fusstext", 2,
  84. "Allgemein", 3
  85. SIZE 18 BY 2.38 NO-UNDO.
  86. DEFINE VARIABLE R_Stufe AS INTEGER INITIAL 1
  87. VIEW-AS RADIO-SET VERTICAL
  88. RADIO-BUTTONS
  89. "Kontoauszug", 1,
  90. "1. Mahnung", 2,
  91. "2. Mahnung", 3,
  92. "3. Mahnung", 4,
  93. "Betreibung", 5
  94. SIZE 18 BY 3.81 NO-UNDO.
  95. DEFINE RECTANGLE RECT-2
  96. EDGE-PIXELS 2 GRAPHIC-EDGE NO-FILL
  97. SIZE 166 BY 20.
  98. /* ************************ Frame Definitions *********************** */
  99. DEFINE FRAME dMahntexte
  100. E_Text AT ROW 6.24 COL 5 NO-LABEL WIDGET-ID 16
  101. R_Stufe AT ROW 1.95 COL 7 NO-LABEL WIDGET-ID 4
  102. R_Art AT ROW 1.95 COL 31 NO-LABEL WIDGET-ID 10
  103. CB_Sprache AT ROW 1.95 COL 61 COLON-ALIGNED WIDGET-ID 14
  104. Btn_OK AT ROW 22.05 COL 61
  105. Btn_Cancel AT ROW 22.05 COL 82.2
  106. RECT-2 AT ROW 1.48 COL 3 WIDGET-ID 2
  107. SPACE(1.99) SKIP(2.65)
  108. WITH VIEW-AS DIALOG-BOX KEEP-TAB-ORDER
  109. SIDE-LABELS NO-UNDERLINE THREE-D SCROLLABLE
  110. TITLE "Mahntexte"
  111. CANCEL-BUTTON Btn_Cancel WIDGET-ID 100.
  112. /* *********************** Procedure Settings ************************ */
  113. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  114. /* Settings for THIS-PROCEDURE
  115. Type: SmartDialog
  116. Allow: Basic,Browse,DB-Fields,Query,Smart
  117. Container Links: Data-Target,Data-Source,Page-Target,Update-Source,Update-Target
  118. Design Page: 1
  119. Other Settings: COMPILE APPSERVER
  120. */
  121. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  122. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dMahntexte
  123. /* ************************* Included-Libraries *********************** */
  124. {src/adm2/containr.i}
  125. /* _UIB-CODE-BLOCK-END */
  126. &ANALYZE-RESUME
  127. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  128. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  129. /* SETTINGS FOR DIALOG-BOX dMahntexte
  130. FRAME-NAME Custom */
  131. ASSIGN
  132. FRAME dMahntexte:SCROLLABLE = FALSE
  133. FRAME dMahntexte:HIDDEN = TRUE.
  134. /* SETTINGS FOR RADIO-SET R_Art IN FRAME dMahntexte
  135. 6 */
  136. /* SETTINGS FOR RADIO-SET R_Stufe IN FRAME dMahntexte
  137. 6 */
  138. /* _RUN-TIME-ATTRIBUTES-END */
  139. &ANALYZE-RESUME
  140. /* Setting information for Queries and Browse Widgets fields */
  141. &ANALYZE-SUSPEND _QUERY-BLOCK DIALOG-BOX dMahntexte
  142. /* Query rebuild information for DIALOG-BOX dMahntexte
  143. _Options = "SHARE-LOCK"
  144. _Query is NOT OPENED
  145. */ /* DIALOG-BOX dMahntexte */
  146. &ANALYZE-RESUME
  147. /* ************************ Control Triggers ************************ */
  148. &Scoped-define SELF-NAME dMahntexte
  149. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL dMahntexte dMahntexte
  150. ON END-ERROR OF FRAME dMahntexte /* Mahntexte */
  151. DO:
  152. RUN ENDE.
  153. RETURN NO-APPLY.
  154. END.
  155. /* _UIB-CODE-BLOCK-END */
  156. &ANALYZE-RESUME
  157. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL dMahntexte dMahntexte
  158. ON WINDOW-CLOSE OF FRAME dMahntexte /* Mahntexte */
  159. DO:
  160. RUN ENDE.
  161. RETURN NO-APPLY.
  162. END.
  163. /* _UIB-CODE-BLOCK-END */
  164. &ANALYZE-RESUME
  165. &Scoped-define SELF-NAME Btn_Cancel
  166. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_Cancel dMahntexte
  167. ON CHOOSE OF Btn_Cancel IN FRAME dMahntexte /* abbrechen */
  168. DO:
  169. RUN ENDE.
  170. RETURN NO-APPLY.
  171. END.
  172. /* _UIB-CODE-BLOCK-END */
  173. &ANALYZE-RESUME
  174. &Scoped-define SELF-NAME Btn_OK
  175. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL Btn_OK dMahntexte
  176. ON CHOOSE OF Btn_OK IN FRAME dMahntexte /* OK */
  177. DO:
  178. DO WITH FRAME {&FRAME-NAME}:
  179. ASSIGN {&List-6}.
  180. iSprcd = INTEGER(CB_SPrache:SCREEN-VALUE) NO-ERROR.
  181. E_Text = E_Text:SCREEN-VALUE.
  182. cCodeC = STRING(R_Stufe,'99') + STRING(R_Art,'99').
  183. FOR EACH Tabel
  184. WHERE Tabel.Firma = Firma
  185. AND Tabel.RecArt = cRecArt
  186. AND Tabel.CodeC = cCodeC
  187. AND Tabel.Sprcd = iSprcd:
  188. DELETE Tabel.
  189. END.
  190. DO ix = 1 TO NUM-ENTRIES(E_Text, CHR(10)):
  191. CREATE Tabel.
  192. ASSIGN Tabel.Firma = Firma
  193. Tabel.RecArt = cRecArt
  194. Tabel.CodeI = ix
  195. Tabel.CodeC = cCodeC
  196. Tabel.Sprcd = iSprcd
  197. Tabel.BezL = ENTRY(ix, E_Text, CHR(10)).
  198. END.
  199. E_Text:BGCOLOR = 15.
  200. END.
  201. APPLY 'ENTRY' TO E_Text.
  202. RETURN NO-APPLY.
  203. END.
  204. /* _UIB-CODE-BLOCK-END */
  205. &ANALYZE-RESUME
  206. &Scoped-define SELF-NAME CB_Sprache
  207. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL CB_Sprache dMahntexte
  208. ON VALUE-CHANGED OF CB_Sprache IN FRAME dMahntexte /* Sprache */
  209. DO:
  210. RUN ANZEIGE.
  211. APPLY 'ENTRY' TO E_Text.
  212. END.
  213. /* _UIB-CODE-BLOCK-END */
  214. &ANALYZE-RESUME
  215. &Scoped-define SELF-NAME R_Art
  216. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL R_Art dMahntexte
  217. ON VALUE-CHANGED OF R_Art IN FRAME dMahntexte
  218. DO:
  219. RUN ANZEIGE.
  220. APPLY 'ENTRY' TO E_Text.
  221. END.
  222. /* _UIB-CODE-BLOCK-END */
  223. &ANALYZE-RESUME
  224. &Scoped-define SELF-NAME R_Stufe
  225. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL R_Stufe dMahntexte
  226. ON VALUE-CHANGED OF R_Stufe IN FRAME dMahntexte
  227. DO:
  228. RUN ANZEIGE.
  229. APPLY 'ENTRY' TO E_Text.
  230. END.
  231. /* _UIB-CODE-BLOCK-END */
  232. &ANALYZE-RESUME
  233. &UNDEFINE SELF-NAME
  234. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dMahntexte
  235. /* *************************** Main Block *************************** */
  236. { incl/dlgmainblock.i }
  237. {src/adm2/dialogmn.i}
  238. /* _UIB-CODE-BLOCK-END */
  239. &ANALYZE-RESUME
  240. /* ********************** Internal Procedures *********************** */
  241. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects dMahntexte _ADM-CREATE-OBJECTS
  242. PROCEDURE adm-create-objects :
  243. /*------------------------------------------------------------------------------
  244. Purpose: Create handles for all SmartObjects used in this procedure.
  245. After SmartObjects are initialized, then SmartLinks are added.
  246. Parameters: <none>
  247. ------------------------------------------------------------------------------*/
  248. END PROCEDURE.
  249. /* _UIB-CODE-BLOCK-END */
  250. &ANALYZE-RESUME
  251. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ANZEIGE dMahntexte
  252. PROCEDURE ANZEIGE :
  253. /*------------------------------------------------------------------------------
  254. Purpose:
  255. Parameters: <none>
  256. Notes:
  257. ------------------------------------------------------------------------------*/
  258. DO WITH FRAME {&FRAME-NAME}:
  259. ASSIGN {&List-6}.
  260. iSprcd = INTEGER(CB_Sprache:SCREEN-VALUE) NO-ERROR.
  261. E_Text = ''.
  262. ix = 0.
  263. cCodeC = STRING(R_Stufe,'99') + STRING(R_Art,'99').
  264. FOR EACH Tabel NO-LOCK
  265. WHERE Tabel.Firma = Firma
  266. AND Tabel.RecArt = cRecArt
  267. AND Tabel.CodeC = cCodeC
  268. AND Tabel.Sprcd = iSprcd:
  269. E_Text = E_Text
  270. + (IF E_Text = '' THEN '' ELSE CHR(10))
  271. + Tabel.BezL.
  272. ix = ix + 1.
  273. END.
  274. IF ix > 0 THEN DO:
  275. DISPLAY E_Text.
  276. E_Text:BGCOLOR = 15.
  277. END.
  278. ELSE DO:
  279. ASSIGN E_Text.
  280. E_Text:BGCOLOR = 8.
  281. END.
  282. END.
  283. END PROCEDURE.
  284. /* _UIB-CODE-BLOCK-END */
  285. &ANALYZE-RESUME
  286. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dMahntexte _DEFAULT-DISABLE
  287. PROCEDURE disable_UI :
  288. /*------------------------------------------------------------------------------
  289. Purpose: DISABLE the User Interface
  290. Parameters: <none>
  291. Notes: Here we clean-up the user-interface by deleting
  292. dynamic widgets we have created and/or hide
  293. frames. This procedure is usually called when
  294. we are ready to "clean-up" after running.
  295. ------------------------------------------------------------------------------*/
  296. /* Hide all frames. */
  297. HIDE FRAME dMahntexte.
  298. END PROCEDURE.
  299. /* _UIB-CODE-BLOCK-END */
  300. &ANALYZE-RESUME
  301. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enableObject dMahntexte
  302. PROCEDURE enableObject :
  303. /*------------------------------------------------------------------------------
  304. Purpose: Super Override
  305. Parameters:
  306. Notes:
  307. ------------------------------------------------------------------------------*/
  308. DO WITH FRAME {&FRAME-NAME}:
  309. RUN COMBO_SPRACHE ( CB_Sprache:HANDLE ).
  310. END.
  311. { incl/dlgenableobject.i }
  312. END PROCEDURE.
  313. /* _UIB-CODE-BLOCK-END */
  314. &ANALYZE-RESUME
  315. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI dMahntexte _DEFAULT-ENABLE
  316. PROCEDURE enable_UI :
  317. /*------------------------------------------------------------------------------
  318. Purpose: ENABLE the User Interface
  319. Parameters: <none>
  320. Notes: Here we display/view/enable the widgets in the
  321. user-interface. In addition, OPEN all queries
  322. associated with each FRAME and BROWSE.
  323. These statements here are based on the "Other
  324. Settings" section of the widget Property Sheets.
  325. ------------------------------------------------------------------------------*/
  326. DISPLAY E_Text R_Stufe R_Art CB_Sprache
  327. WITH FRAME dMahntexte.
  328. ENABLE E_Text RECT-2 R_Stufe R_Art CB_Sprache Btn_OK Btn_Cancel
  329. WITH FRAME dMahntexte.
  330. VIEW FRAME dMahntexte.
  331. {&OPEN-BROWSERS-IN-QUERY-dMahntexte}
  332. END PROCEDURE.
  333. /* _UIB-CODE-BLOCK-END */
  334. &ANALYZE-RESUME
  335. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE ENDE dMahntexte
  336. PROCEDURE ENDE :
  337. /*------------------------------------------------------------------------------
  338. Purpose:
  339. Parameters: <none>
  340. Notes:
  341. ------------------------------------------------------------------------------*/
  342. IF btnOK THEN DO:
  343. END.
  344. { incl/dlgende.i }
  345. END PROCEDURE.
  346. /* _UIB-CODE-BLOCK-END */
  347. &ANALYZE-RESUME
  348. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dMahntexte
  349. PROCEDURE initializeObject :
  350. /*------------------------------------------------------------------------------
  351. Purpose: Super Override
  352. Parameters:
  353. Notes:
  354. ------------------------------------------------------------------------------*/
  355. /* Code placed here will execute PRIOR to standard behavior. */
  356. RUN SUPER.
  357. DO WITH FRAME {&FRAME-NAME}:
  358. RUN ANZEIGE.
  359. END.
  360. END PROCEDURE.
  361. /* _UIB-CODE-BLOCK-END */
  362. &ANALYZE-RESUME