d-kgebinde.w 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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 KGebinde
  47. /* Definitions for QUERY Query-Main */
  48. &Scoped-Define ENABLED-FIELDS Firma Geb_Cd KBez Bez Inhalt Depot Gebuehr Gewicht MWST_Art MWSt_Cd Geb_Kto~
  49. Saldo eShop_Bez eShop_pic DD_Code
  50. &Scoped-define ENABLED-FIELDS-IN-KGebinde Firma Geb_Cd KBez Bez Inhalt ~
  51. Depot Gebuehr Gewicht MWST_Art MWSt_Cd Geb_Kto Saldo eShop_Bez eShop_pic ~
  52. DD_Code
  53. &Scoped-Define DATA-FIELDS Firma Geb_Cd KBez Bez Inhalt Depot Gebuehr Gewicht MWST_Art MWSt_Cd Geb_Kto~
  54. Saldo eShop_Bez eShop_pic DD_Code
  55. &Scoped-define DATA-FIELDS-IN-KGebinde Firma Geb_Cd KBez Bez Inhalt Depot ~
  56. Gebuehr Gewicht MWST_Art MWSt_Cd Geb_Kto Saldo eShop_Bez eShop_pic DD_Code
  57. &Scoped-Define MANDATORY-FIELDS
  58. &Scoped-Define APPLICATION-SERVICE
  59. &Scoped-Define ASSIGN-LIST
  60. &Scoped-Define DATA-FIELD-DEFS "d-kgebinde.i"
  61. &Scoped-define QUERY-STRING-Query-Main FOR EACH KGebinde NO-LOCK INDEXED-REPOSITION
  62. {&DB-REQUIRED-START}
  63. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH KGebinde NO-LOCK INDEXED-REPOSITION.
  64. {&DB-REQUIRED-END}
  65. &Scoped-define TABLES-IN-QUERY-Query-Main KGebinde
  66. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main KGebinde
  67. /* Custom List Definitions */
  68. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  69. /* _UIB-PREPROCESSOR-BLOCK-END */
  70. &ANALYZE-RESUME
  71. /* ************************ Function Prototypes ********************** */
  72. {&DB-REQUIRED-START}
  73. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  74. FUNCTION openQuery RETURNS LOGICAL
  75. ( /* parameter-definitions */ ) FORWARD.
  76. /* _UIB-CODE-BLOCK-END */
  77. &ANALYZE-RESUME
  78. {&DB-REQUIRED-END}
  79. /* *********************** Control Definitions ********************** */
  80. {&DB-REQUIRED-START}
  81. /* Query definitions */
  82. &ANALYZE-SUSPEND
  83. DEFINE QUERY Query-Main FOR
  84. KGebinde SCROLLING.
  85. &ANALYZE-RESUME
  86. {&DB-REQUIRED-END}
  87. /* ************************ Frame Definitions *********************** */
  88. /* *********************** Procedure Settings ************************ */
  89. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  90. /* Settings for THIS-PROCEDURE
  91. Type: SmartDataObject
  92. Allow: Query
  93. Frames: 0
  94. Add Fields to: Neither
  95. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  96. */
  97. /* This procedure should always be RUN PERSISTENT. Report the error, */
  98. /* then cleanup and return. */
  99. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  100. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  101. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  102. RETURN.
  103. END.
  104. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  105. /* ************************* Create Window ************************** */
  106. &ANALYZE-SUSPEND _CREATE-WINDOW
  107. /* DESIGN Window definition (used by the UIB)
  108. CREATE WINDOW dTables ASSIGN
  109. HEIGHT = 1.62
  110. WIDTH = 46.6.
  111. /* END WINDOW DEFINITION */
  112. */
  113. &ANALYZE-RESUME
  114. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  115. /* ************************* Included-Libraries *********************** */
  116. {src/adm2/data.i}
  117. /* _UIB-CODE-BLOCK-END */
  118. &ANALYZE-RESUME
  119. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  120. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  121. /* SETTINGS FOR WINDOW dTables
  122. VISIBLE,,RUN-PERSISTENT */
  123. /* _RUN-TIME-ATTRIBUTES-END */
  124. &ANALYZE-RESUME
  125. /* Setting information for Queries and Browse Widgets fields */
  126. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  127. /* Query rebuild information for SmartDataObject Query-Main
  128. _TblList = "AnaDat.KGebinde"
  129. _Options = "NO-LOCK INDEXED-REPOSITION"
  130. _FldNameList[1] > AnaDat.KGebinde.Firma
  131. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  132. _FldNameList[2] > AnaDat.KGebinde.Geb_Cd
  133. "Geb_Cd" "Geb_Cd" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  134. _FldNameList[3] > AnaDat.KGebinde.KBez
  135. "KBez" "KBez" ? ? "character" ? ? ? ? ? ? yes ? no 10 yes ""
  136. _FldNameList[4] > AnaDat.KGebinde.Bez
  137. "Bez" "Bez" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  138. _FldNameList[5] > AnaDat.KGebinde.Inhalt
  139. "Inhalt" "Inhalt" ? ? "integer" ? ? ? ? ? ? yes ? no 6.8 yes ""
  140. _FldNameList[6] > AnaDat.KGebinde.Depot
  141. "Depot" "Depot" ? "zzz9.999" "decimal" ? ? ? ? ? ? yes ? no 8.4 yes ""
  142. _FldNameList[7] > AnaDat.KGebinde.Gebuehr
  143. "Gebuehr" "Gebuehr" ? "zzz9.999" "decimal" ? ? ? ? ? ? yes ? no 8.4 yes ""
  144. _FldNameList[8] > AnaDat.KGebinde.Gewicht
  145. "Gewicht" "Gewicht" ? "zzz9.999" "decimal" ? ? ? ? ? ? yes ? no 8.4 yes ""
  146. _FldNameList[9] > AnaDat.KGebinde.MWST_Art
  147. "MWST_Art" "MWST_Art" ? ? "integer" ? ? ? ? ? ? yes ? no 10.6 yes ""
  148. _FldNameList[10] > AnaDat.KGebinde.MWSt_Cd
  149. "MWSt_Cd" "MWSt_Cd" ? ? "integer" ? ? ? ? ? ? yes ? no 9.8 yes ""
  150. _FldNameList[11] > AnaDat.KGebinde.Geb_Kto
  151. "Geb_Kto" "Geb_Kto" ? ? "character" ? ? ? ? ? ? yes ? no 8.4 yes ""
  152. _FldNameList[12] > AnaDat.KGebinde.Saldo
  153. "Saldo" "Saldo" ? ? "integer" ? ? ? ? ? ? yes ? no 11 yes ""
  154. _FldNameList[13] > AnaDat.KGebinde.eShop_Bez
  155. "eShop_Bez" "eShop_Bez" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  156. _FldNameList[14] > AnaDat.KGebinde.eShop_pic
  157. "eShop_pic" "eShop_pic" ? ? "character" ? ? ? ? ? ? yes ? no 10.2 yes ""
  158. _FldNameList[15] > AnaDat.KGebinde.DD_Code
  159. "DD_Code" "DD_Code" ? ? "character" ? ? ? ? ? ? yes ? no 16.4 yes ?
  160. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  161. */ /* QUERY Query-Main */
  162. &ANALYZE-RESUME
  163. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  164. /* *************************** Main Block *************************** */
  165. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  166. RUN initializeObject.
  167. &ENDIF
  168. /* _UIB-CODE-BLOCK-END */
  169. &ANALYZE-RESUME
  170. /* ********************** Internal Procedures *********************** */
  171. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  172. PROCEDURE disable_UI :
  173. /*------------------------------------------------------------------------------
  174. Purpose: DISABLE the User Interface
  175. Parameters: <none>
  176. Notes: Here we clean-up the user-interface by deleting
  177. dynamic widgets we have created and/or hide
  178. frames. This procedure is usually called when
  179. we are ready to "clean-up" after running.
  180. ------------------------------------------------------------------------------*/
  181. /* Hide all frames. */
  182. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  183. END PROCEDURE.
  184. /* _UIB-CODE-BLOCK-END */
  185. &ANALYZE-RESUME
  186. /* ************************ Function Implementations ***************** */
  187. {&DB-REQUIRED-START}
  188. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  189. FUNCTION openQuery RETURNS LOGICAL
  190. ( /* parameter-definitions */ ) :
  191. /*------------------------------------------------------------------------------
  192. Purpose: Super Override
  193. Notes:
  194. ------------------------------------------------------------------------------*/
  195. DEF VAR Firma AS CHAR NO-UNDO.
  196. Firma = DYNAMIC-FUNCTION('GETMANDANT':U) NO-ERROR.
  197. xWhere = 'KGebinde.Firma = "' + Firma + '" '.
  198. DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere).
  199. /* xSort = ''. */
  200. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  201. /* xWhere = ''. */
  202. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  203. RETURN SUPER( ).
  204. END FUNCTION.
  205. /* _UIB-CODE-BLOCK-END */
  206. &ANALYZE-RESUME
  207. {&DB-REQUIRED-END}