d-steuer.w 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI ADM2
  2. &ANALYZE-RESUME
  3. /* Connected Databases
  4. anadat PROGRESS
  5. */
  6. &Scoped-define WINDOW-NAME CURRENT-WINDOW
  7. {adecomm/appserv.i}
  8. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS dTables
  9. /*------------------------------------------------------------------------
  10. File:
  11. Description: from DATA.W - Template For SmartData objects in the ADM
  12. Input Parameters:
  13. <none>
  14. Output Parameters:
  15. <none>
  16. Modified: February 24, 1999
  17. ------------------------------------------------------------------------*/
  18. /* This .W file was created with the Progress AppBuilder. */
  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. DEF VAR xWhere AS CHAR NO-UNDO.
  30. DEF VAR xSort AS CHAR NO-UNDO.
  31. /* _UIB-CODE-BLOCK-END */
  32. &ANALYZE-RESUME
  33. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  34. /* ******************** Preprocessor Definitions ******************** */
  35. &Scoped-define PROCEDURE-TYPE SmartDataObject
  36. &Scoped-define DB-AWARE yes
  37. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  38. /* Db-Required definitions. */
  39. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  40. &GLOBAL-DEFINE DB-REQUIRED TRUE
  41. &ENDIF
  42. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  43. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  44. &Scoped-define QUERY-NAME Query-Main
  45. /* Internal Tables (found by Frame, Query & Browse Queries) */
  46. &Scoped-define INTERNAL-TABLES Steuer
  47. /* Definitions for QUERY Query-Main */
  48. &Scoped-Define ENABLED-FIELDS Firma Firma1 Firma2 AdFirma Drucker Fax-1 Fax-2 FBFirma MWST_Nr Ort MWSt~
  49. StFirma Strasse Tel-1 Tel-2 Aktionspreise MWSt-Exkl MWSt-Inkl St10 St05~
  50. St06 Fwc10 St07 St08 Fwc09 Fwc08 St09 RuestArt
  51. &Scoped-define ENABLED-FIELDS-IN-Steuer Firma Firma1 Firma2 AdFirma Drucker ~
  52. Fax-1 Fax-2 FBFirma MWST_Nr Ort MWSt StFirma Strasse Tel-1 Tel-2 ~
  53. Aktionspreise MWSt-Exkl MWSt-Inkl St10 St05 St06 Fwc10 St07 St08 Fwc09 ~
  54. Fwc08 St09 RuestArt
  55. &Scoped-Define DATA-FIELDS Firma Firma1 Firma2 AdFirma Drucker Fax-1 Fax-2 FBFirma MWST_Nr Ort MWSt~
  56. StFirma Strasse Tel-1 Tel-2 Aktionspreise MWSt-Exkl MWSt-Inkl St10 St05~
  57. St06 Fwc10 St07 St08 Fwc09 Fwc08 St09 RuestArt
  58. &Scoped-define DATA-FIELDS-IN-Steuer Firma Firma1 Firma2 AdFirma Drucker ~
  59. Fax-1 Fax-2 FBFirma MWST_Nr Ort MWSt StFirma Strasse Tel-1 Tel-2 ~
  60. Aktionspreise MWSt-Exkl MWSt-Inkl St10 St05 St06 Fwc10 St07 St08 Fwc09 ~
  61. Fwc08 St09 RuestArt
  62. &Scoped-Define MANDATORY-FIELDS
  63. &Scoped-Define APPLICATION-SERVICE
  64. &Scoped-Define ASSIGN-LIST
  65. &Scoped-Define DATA-FIELD-DEFS "d-steuer.i"
  66. &Scoped-define QUERY-STRING-Query-Main FOR EACH Steuer NO-LOCK INDEXED-REPOSITION
  67. {&DB-REQUIRED-START}
  68. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Steuer NO-LOCK INDEXED-REPOSITION.
  69. {&DB-REQUIRED-END}
  70. &Scoped-define TABLES-IN-QUERY-Query-Main Steuer
  71. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Steuer
  72. /* Custom List Definitions */
  73. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  74. /* _UIB-PREPROCESSOR-BLOCK-END */
  75. &ANALYZE-RESUME
  76. /* ************************ Function Prototypes ********************** */
  77. {&DB-REQUIRED-START}
  78. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  79. FUNCTION openQuery RETURNS LOGICAL
  80. ( /* parameter-definitions */ ) FORWARD.
  81. /* _UIB-CODE-BLOCK-END */
  82. &ANALYZE-RESUME
  83. {&DB-REQUIRED-END}
  84. /* *********************** Control Definitions ********************** */
  85. {&DB-REQUIRED-START}
  86. /* Query definitions */
  87. &ANALYZE-SUSPEND
  88. DEFINE QUERY Query-Main FOR
  89. Steuer SCROLLING.
  90. &ANALYZE-RESUME
  91. {&DB-REQUIRED-END}
  92. /* ************************ Frame Definitions *********************** */
  93. /* *********************** Procedure Settings ************************ */
  94. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  95. /* Settings for THIS-PROCEDURE
  96. Type: SmartDataObject
  97. Allow: Query
  98. Frames: 0
  99. Add Fields to: Neither
  100. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  101. */
  102. /* This procedure should always be RUN PERSISTENT. Report the error, */
  103. /* then cleanup and return. */
  104. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  105. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  106. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  107. RETURN.
  108. END.
  109. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  110. /* ************************* Create Window ************************** */
  111. &ANALYZE-SUSPEND _CREATE-WINDOW
  112. /* DESIGN Window definition (used by the UIB)
  113. CREATE WINDOW dTables ASSIGN
  114. HEIGHT = 1.62
  115. WIDTH = 46.6.
  116. /* END WINDOW DEFINITION */
  117. */
  118. &ANALYZE-RESUME
  119. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  120. /* ************************* Included-Libraries *********************** */
  121. {src/adm2/data.i}
  122. /* _UIB-CODE-BLOCK-END */
  123. &ANALYZE-RESUME
  124. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  125. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  126. /* SETTINGS FOR WINDOW dTables
  127. VISIBLE,,RUN-PERSISTENT */
  128. /* _RUN-TIME-ATTRIBUTES-END */
  129. &ANALYZE-RESUME
  130. /* Setting information for Queries and Browse Widgets fields */
  131. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  132. /* Query rebuild information for SmartDataObject Query-Main
  133. _TblList = "AnaDat.Steuer"
  134. _Options = "NO-LOCK INDEXED-REPOSITION"
  135. _FldNameList[1] > AnaDat.Steuer.Firma
  136. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  137. _FldNameList[2] > AnaDat.Steuer.Firma1
  138. "Firma1" "Firma1" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  139. _FldNameList[3] > AnaDat.Steuer.Firma2
  140. "Firma2" "Firma2" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  141. _FldNameList[4] > AnaDat.Steuer.AdFirma
  142. "AdFirma" "AdFirma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  143. _FldNameList[5] > AnaDat.Steuer.Drucker
  144. "Drucker" "Drucker" ? ? "character" ? ? ? ? ? ? yes ? no 12 yes ""
  145. _FldNameList[6] > AnaDat.Steuer.Fax-1
  146. "Fax-1" "Fax-1" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
  147. _FldNameList[7] > AnaDat.Steuer.Fax-2
  148. "Fax-2" "Fax-2" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
  149. _FldNameList[8] > AnaDat.Steuer.FBFirma
  150. "FBFirma" "FBFirma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  151. _FldNameList[9] > AnaDat.Steuer.MWST_Nr
  152. "MWST_Nr" "MWST_Nr" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
  153. _FldNameList[10] > AnaDat.Steuer.Ort
  154. "Ort" "Ort" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  155. _FldNameList[11] > AnaDat.Steuer.MWSt
  156. "MWSt" "MWSt" ? ? "integer" ? ? ? ? ? ? yes ? no 6 yes ""
  157. _FldNameList[12] > AnaDat.Steuer.StFirma
  158. "StFirma" "StFirma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  159. _FldNameList[13] > AnaDat.Steuer.Strasse
  160. "Strasse" "Strasse" ? ? "character" ? ? ? ? ? ? yes ? no 25 yes ""
  161. _FldNameList[14] > AnaDat.Steuer.Tel-1
  162. "Tel-1" "Tel-1" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
  163. _FldNameList[15] > AnaDat.Steuer.Tel-2
  164. "Tel-2" "Tel-2" ? ? "character" ? ? ? ? ? ? yes ? no 15 yes ""
  165. _FldNameList[16] > AnaDat.Steuer.Aktionspreise
  166. "Aktionspreise" "Aktionspreise" ? ? "integer" ? ? ? ? ? ? yes ? no 12.6 yes ""
  167. _FldNameList[17] > AnaDat.Steuer.MWSt-Exkl
  168. "MWSt-Exkl" "MWSt-Exkl" ? ? "integer" ? ? ? ? ? ? yes ? no 10.6 yes ""
  169. _FldNameList[18] > AnaDat.Steuer.MWSt-Inkl
  170. "MWSt-Inkl" "MWSt-Inkl" ? ? "integer" ? ? ? ? ? ? yes ? no 10 yes ""
  171. _FldNameList[19] > AnaDat.Steuer.St10
  172. "St10" "St10" ? "9" "integer" ? ? ? ? ? ? yes ? no 4.4 yes ""
  173. _FldNameList[20] > AnaDat.Steuer.St05
  174. "St05" "St05" "Bemerk" ? "integer" ? ? ? ? ? ? yes ? no 4.4 yes ""
  175. _FldNameList[21] > AnaDat.Steuer.St06
  176. "St06" "St06" "Anzeige" ? "integer" ? ? ? ? ? ? yes ? no 4.4 yes ""
  177. _FldNameList[22] > AnaDat.Steuer.Fwc10
  178. "Fwc10" "Fwc10" "Installation" "x(12)" "character" ? ? ? ? ? ? yes ? no 12 yes ""
  179. _FldNameList[23] > AnaDat.Steuer.St07
  180. "St07" "St07" ? ? "integer" ? ? ? ? ? ? yes ? no 4.4 yes ""
  181. _FldNameList[24] > AnaDat.Steuer.St08
  182. "St08" "St08" ? ? "integer" ? ? ? ? ? ? yes ? no 4.4 yes ""
  183. _FldNameList[25] > AnaDat.Steuer.Fwc09
  184. "Fwc09" "Fwc09" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  185. _FldNameList[26] > AnaDat.Steuer.Fwc08
  186. "Fwc08" "Fwc08" "Sperrdatum" "99.99.9999" "character" ? ? ? ? ? ? yes ? no 10.8 yes ""
  187. _FldNameList[27] > AnaDat.Steuer.St09
  188. "St09" "St09" ? ? "integer" ? ? ? ? ? ? yes ? no 4.4 yes ""
  189. _FldNameList[28] > AnaDat.Steuer.RuestArt
  190. "RuestArt" "RuestArt" ? ? "integer" ? ? ? ? ? ? yes ? no 8.2 yes ?
  191. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  192. */ /* QUERY Query-Main */
  193. &ANALYZE-RESUME
  194. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  195. /* *************************** Main Block *************************** */
  196. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  197. RUN initializeObject.
  198. &ENDIF
  199. /* _UIB-CODE-BLOCK-END */
  200. &ANALYZE-RESUME
  201. /* ********************** Internal Procedures *********************** */
  202. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  203. PROCEDURE disable_UI :
  204. /*------------------------------------------------------------------------------
  205. Purpose: DISABLE the User Interface
  206. Parameters: <none>
  207. Notes: Here we clean-up the user-interface by deleting
  208. dynamic widgets we have created and/or hide
  209. frames. This procedure is usually called when
  210. we are ready to "clean-up" after running.
  211. ------------------------------------------------------------------------------*/
  212. /* Hide all frames. */
  213. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  214. END PROCEDURE.
  215. /* _UIB-CODE-BLOCK-END */
  216. &ANALYZE-RESUME
  217. /* ************************ Function Implementations ***************** */
  218. {&DB-REQUIRED-START}
  219. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  220. FUNCTION openQuery RETURNS LOGICAL
  221. ( /* parameter-definitions */ ) :
  222. /*------------------------------------------------------------------------------
  223. Purpose: Super Override
  224. Notes:
  225. ------------------------------------------------------------------------------*/
  226. /* xWhere = ''. */
  227. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
  228. /* xSort = ''. */
  229. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  230. /* xWhere = ''. */
  231. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  232. RETURN SUPER( ).
  233. END FUNCTION.
  234. /* _UIB-CODE-BLOCK-END */
  235. &ANALYZE-RESUME
  236. {&DB-REQUIRED-END}