d-ansprech.w 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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. DEF VAR Firma AS CHAR NO-UNDO.
  32. /* _UIB-CODE-BLOCK-END */
  33. &ANALYZE-RESUME
  34. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  35. /* ******************** Preprocessor Definitions ******************** */
  36. &Scoped-define PROCEDURE-TYPE SmartDataObject
  37. &Scoped-define DB-AWARE yes
  38. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  39. /* Db-Required definitions. */
  40. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  41. &GLOBAL-DEFINE DB-REQUIRED TRUE
  42. &ENDIF
  43. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  44. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  45. &Scoped-define QUERY-NAME Query-Main
  46. /* Internal Tables (found by Frame, Query & Browse Queries) */
  47. &Scoped-define INTERNAL-TABLES Ansprech
  48. /* Definitions for QUERY Query-Main */
  49. &Scoped-Define ENABLED-FIELDS Anrcd Cd01 Cd02 Cd03 Cd04 Cd05 Cd06 Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14~
  50. Cd15 Firma Funktion Ind Knr Mail Name Natel Sprcd Tel-1 Tel-2 Tel-3 Tel-4~
  51. Vorname AdrArt Bestellung Debitoren Anschrift1 Anschrift2 Anschrift3~
  52. Anschrift4 Anschrift5 Anschrift6 Anschrift7 Anschrift8 Anschrift9~
  53. Anschrift10 Anschrift11 Anschrift12 Anzeig_br BriefAnr Lieferschein~
  54. esBenutzer esPasswort esMail esAktiv
  55. &Scoped-define ENABLED-FIELDS-IN-Ansprech Anrcd Cd01 Cd02 Cd03 Cd04 Cd05 ~
  56. Cd06 Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14 Cd15 Firma Funktion Ind Knr ~
  57. Mail Name Natel Sprcd Tel-1 Tel-2 Tel-3 Tel-4 Vorname AdrArt Bestellung ~
  58. Debitoren Anschrift1 Anschrift2 Anschrift3 Anschrift4 Anschrift5 Anschrift6 ~
  59. Anschrift7 Anschrift8 Anschrift9 Anschrift10 Anschrift11 Anschrift12 ~
  60. Anzeig_br BriefAnr Lieferschein esBenutzer esPasswort esMail esAktiv
  61. &Scoped-Define DATA-FIELDS Anrcd Cd01 Cd02 Cd03 Cd04 Cd05 Cd06 Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14~
  62. Cd15 Firma Funktion Ind Knr Mail Name Natel Sprcd Tel-1 Tel-2 Tel-3 Tel-4~
  63. Vorname AdrArt Bestellung Debitoren Anschrift1 Anschrift2 Anschrift3~
  64. Anschrift4 Anschrift5 Anschrift6 Anschrift7 Anschrift8 Anschrift9~
  65. Anschrift10 Anschrift11 Anschrift12 Anzeig_br BriefAnr Lieferschein~
  66. esBenutzer esPasswort esMail esAktiv
  67. &Scoped-define DATA-FIELDS-IN-Ansprech Anrcd Cd01 Cd02 Cd03 Cd04 Cd05 Cd06 ~
  68. Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14 Cd15 Firma Funktion Ind Knr Mail ~
  69. Name Natel Sprcd Tel-1 Tel-2 Tel-3 Tel-4 Vorname AdrArt Bestellung ~
  70. Debitoren Anschrift1 Anschrift2 Anschrift3 Anschrift4 Anschrift5 Anschrift6 ~
  71. Anschrift7 Anschrift8 Anschrift9 Anschrift10 Anschrift11 Anschrift12 ~
  72. Anzeig_br BriefAnr Lieferschein esBenutzer esPasswort esMail esAktiv
  73. &Scoped-Define MANDATORY-FIELDS
  74. &Scoped-Define APPLICATION-SERVICE
  75. &Scoped-Define ASSIGN-LIST rowObject.Anschrift1 = Ansprech.Anschrift[1]~
  76. rowObject.Anschrift2 = Ansprech.Anschrift[2]~
  77. rowObject.Anschrift3 = Ansprech.Anschrift[3]~
  78. rowObject.Anschrift4 = Ansprech.Anschrift[4]~
  79. rowObject.Anschrift5 = Ansprech.Anschrift[5]~
  80. rowObject.Anschrift6 = Ansprech.Anschrift[6]~
  81. rowObject.Anschrift7 = Ansprech.Anschrift[7]~
  82. rowObject.Anschrift8 = Ansprech.Anschrift[8]~
  83. rowObject.Anschrift9 = Ansprech.Anschrift[9]~
  84. rowObject.Anschrift10 = Ansprech.Anschrift[10]~
  85. rowObject.Anschrift11 = Ansprech.Anschrift[11]~
  86. rowObject.Anschrift12 = Ansprech.Anschrift[12]
  87. &Scoped-Define DATA-FIELD-DEFS "d-ansprech.i"
  88. &Scoped-define QUERY-STRING-Query-Main FOR EACH Ansprech NO-LOCK INDEXED-REPOSITION
  89. {&DB-REQUIRED-START}
  90. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Ansprech NO-LOCK INDEXED-REPOSITION.
  91. {&DB-REQUIRED-END}
  92. &Scoped-define TABLES-IN-QUERY-Query-Main Ansprech
  93. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Ansprech
  94. /* Custom List Definitions */
  95. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  96. /* _UIB-PREPROCESSOR-BLOCK-END */
  97. &ANALYZE-RESUME
  98. /* ************************ Function Prototypes ********************** */
  99. {&DB-REQUIRED-START}
  100. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  101. FUNCTION openQuery RETURNS LOGICAL
  102. ( /* parameter-definitions */ ) FORWARD.
  103. /* _UIB-CODE-BLOCK-END */
  104. &ANALYZE-RESUME
  105. {&DB-REQUIRED-END}
  106. /* *********************** Control Definitions ********************** */
  107. {&DB-REQUIRED-START}
  108. /* Query definitions */
  109. &ANALYZE-SUSPEND
  110. DEFINE QUERY Query-Main FOR
  111. Ansprech SCROLLING.
  112. &ANALYZE-RESUME
  113. {&DB-REQUIRED-END}
  114. /* ************************ Frame Definitions *********************** */
  115. /* *********************** Procedure Settings ************************ */
  116. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  117. /* Settings for THIS-PROCEDURE
  118. Type: SmartDataObject
  119. Allow: Query
  120. Frames: 0
  121. Add Fields to: Neither
  122. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  123. */
  124. /* This procedure should always be RUN PERSISTENT. Report the error, */
  125. /* then cleanup and return. */
  126. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  127. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  128. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  129. RETURN.
  130. END.
  131. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  132. /* ************************* Create Window ************************** */
  133. &ANALYZE-SUSPEND _CREATE-WINDOW
  134. /* DESIGN Window definition (used by the UIB)
  135. CREATE WINDOW dTables ASSIGN
  136. HEIGHT = 2
  137. WIDTH = 65.2.
  138. /* END WINDOW DEFINITION */
  139. */
  140. &ANALYZE-RESUME
  141. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  142. /* ************************* Included-Libraries *********************** */
  143. {src/adm2/data.i}
  144. /* _UIB-CODE-BLOCK-END */
  145. &ANALYZE-RESUME
  146. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  147. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  148. /* SETTINGS FOR WINDOW dTables
  149. VISIBLE,,RUN-PERSISTENT */
  150. /* _RUN-TIME-ATTRIBUTES-END */
  151. &ANALYZE-RESUME
  152. /* Setting information for Queries and Browse Widgets fields */
  153. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  154. /* Query rebuild information for SmartDataObject Query-Main
  155. _TblList = "AnaDat.Ansprech"
  156. _Options = "NO-LOCK INDEXED-REPOSITION"
  157. _FldNameList[1] > AnaDat.Ansprech.Anrcd
  158. "Anrcd" "Anrcd" ? ? "integer" ? ? ? ? ? ? yes ? no 6.8 yes ""
  159. _FldNameList[2] > AnaDat.Ansprech.Cd01
  160. "Cd01" "Cd01" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  161. _FldNameList[3] > AnaDat.Ansprech.Cd02
  162. "Cd02" "Cd02" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  163. _FldNameList[4] > AnaDat.Ansprech.Cd03
  164. "Cd03" "Cd03" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  165. _FldNameList[5] > AnaDat.Ansprech.Cd04
  166. "Cd04" "Cd04" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  167. _FldNameList[6] > AnaDat.Ansprech.Cd05
  168. "Cd05" "Cd05" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  169. _FldNameList[7] > AnaDat.Ansprech.Cd06
  170. "Cd06" "Cd06" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  171. _FldNameList[8] > AnaDat.Ansprech.Cd07
  172. "Cd07" "Cd07" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  173. _FldNameList[9] > AnaDat.Ansprech.Cd08
  174. "Cd08" "Cd08" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  175. _FldNameList[10] > AnaDat.Ansprech.Cd09
  176. "Cd09" "Cd09" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  177. _FldNameList[11] > AnaDat.Ansprech.Cd10
  178. "Cd10" "Cd10" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  179. _FldNameList[12] > AnaDat.Ansprech.Cd11
  180. "Cd11" "Cd11" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  181. _FldNameList[13] > AnaDat.Ansprech.Cd12
  182. "Cd12" "Cd12" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  183. _FldNameList[14] > AnaDat.Ansprech.Cd13
  184. "Cd13" "Cd13" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  185. _FldNameList[15] > AnaDat.Ansprech.Cd14
  186. "Cd14" "Cd14" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  187. _FldNameList[16] > AnaDat.Ansprech.Cd15
  188. "Cd15" "Cd15" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  189. _FldNameList[17] > AnaDat.Ansprech.Firma
  190. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8.4 yes ""
  191. _FldNameList[18] > AnaDat.Ansprech.Funktion
  192. "Funktion" "Funktion" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  193. _FldNameList[19] > AnaDat.Ansprech.Ind
  194. "Ind" "Ind" ? ? "integer" ? ? ? ? ? ? yes ? no 3 yes ""
  195. _FldNameList[20] > AnaDat.Ansprech.Knr
  196. "Knr" "Knr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.8 yes ""
  197. _FldNameList[21] > AnaDat.Ansprech.Mail
  198. "Mail" "Mail" ? ? "character" ? ? ? ? ? ? yes ? no 40 yes ""
  199. _FldNameList[22] > AnaDat.Ansprech.Name
  200. "Name" "Name" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  201. _FldNameList[23] > AnaDat.Ansprech.Natel
  202. "Natel" "Natel" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  203. _FldNameList[24] > AnaDat.Ansprech.Sprcd
  204. "Sprcd" "Sprcd" ? ? "integer" ? ? ? ? ? ? yes ? no 8 yes ""
  205. _FldNameList[25] > AnaDat.Ansprech.Tel-1
  206. "Tel-1" "Tel-1" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  207. _FldNameList[26] > AnaDat.Ansprech.Tel-2
  208. "Tel-2" "Tel-2" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  209. _FldNameList[27] > AnaDat.Ansprech.Tel-3
  210. "Tel-3" "Tel-3" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  211. _FldNameList[28] > AnaDat.Ansprech.Tel-4
  212. "Tel-4" "Tel-4" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  213. _FldNameList[29] > AnaDat.Ansprech.Vorname
  214. "Vorname" "Vorname" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  215. _FldNameList[30] > AnaDat.Ansprech.AdrArt
  216. "AdrArt" "AdrArt" ? ? "character" ? ? ? ? ? ? yes ? no 5.8 yes ?
  217. _FldNameList[31] > AnaDat.Ansprech.Bestellung
  218. "Bestellung" "Bestellung" ? ? "logical" ? ? ? ? ? ? yes ? no 9.8 yes ?
  219. _FldNameList[32] > AnaDat.Ansprech.Debitoren
  220. "Debitoren" "Debitoren" ? ? "logical" ? ? ? ? ? ? yes ? no 9.2 yes ?
  221. _FldNameList[33] > AnaDat.Ansprech.Anschrift[1]
  222. "Anschrift[1]" "Anschrift1" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  223. _FldNameList[34] > AnaDat.Ansprech.Anschrift[2]
  224. "Anschrift[2]" "Anschrift2" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  225. _FldNameList[35] > AnaDat.Ansprech.Anschrift[3]
  226. "Anschrift[3]" "Anschrift3" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  227. _FldNameList[36] > AnaDat.Ansprech.Anschrift[4]
  228. "Anschrift[4]" "Anschrift4" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  229. _FldNameList[37] > AnaDat.Ansprech.Anschrift[5]
  230. "Anschrift[5]" "Anschrift5" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  231. _FldNameList[38] > AnaDat.Ansprech.Anschrift[6]
  232. "Anschrift[6]" "Anschrift6" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  233. _FldNameList[39] > AnaDat.Ansprech.Anschrift[7]
  234. "Anschrift[7]" "Anschrift7" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  235. _FldNameList[40] > AnaDat.Ansprech.Anschrift[8]
  236. "Anschrift[8]" "Anschrift8" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  237. _FldNameList[41] > AnaDat.Ansprech.Anschrift[9]
  238. "Anschrift[9]" "Anschrift9" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  239. _FldNameList[42] > AnaDat.Ansprech.Anschrift[10]
  240. "Anschrift[10]" "Anschrift10" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  241. _FldNameList[43] > AnaDat.Ansprech.Anschrift[11]
  242. "Anschrift[11]" "Anschrift11" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  243. _FldNameList[44] > AnaDat.Ansprech.Anschrift[12]
  244. "Anschrift[12]" "Anschrift12" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  245. _FldNameList[45] > AnaDat.Ansprech.Anzeig_br
  246. "Anzeig_br" "Anzeig_br" ? ? "character" ? ? ? ? ? ? yes ? no 75 yes ?
  247. _FldNameList[46] > AnaDat.Ansprech.BriefAnr
  248. "BriefAnr" "BriefAnr" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ?
  249. _FldNameList[47] > AnaDat.Ansprech.Lieferschein
  250. "Lieferschein" "Lieferschein" ? ? "logical" ? ? ? ? ? ? yes ? no 11.4 yes ?
  251. _FldNameList[48] > AnaDat.Ansprech.esBenutzer
  252. "esBenutzer" "esBenutzer" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  253. _FldNameList[49] > AnaDat.Ansprech.esPasswort
  254. "esPasswort" "esPasswort" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ?
  255. _FldNameList[50] > AnaDat.Ansprech.esMail
  256. "esMail" "esMail" ? ? "character" ? ? ? ? ? ? yes ? no 40 yes ?
  257. _FldNameList[51] > AnaDat.Ansprech.esAktiv
  258. "esAktiv" "esAktiv" ? ? "logical" ? ? ? ? ? ? yes ? no 7 yes ?
  259. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  260. */ /* QUERY Query-Main */
  261. &ANALYZE-RESUME
  262. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  263. /* *************************** Main Block *************************** */
  264. Firma = DYNAMIC-FUNCTION('GETADMANDANT':U) NO-ERROR.
  265. IF Firma = ? THEN Firma = '1000'.
  266. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  267. RUN initializeObject.
  268. &ENDIF
  269. /* _UIB-CODE-BLOCK-END */
  270. &ANALYZE-RESUME
  271. /* ********************** Internal Procedures *********************** */
  272. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  273. PROCEDURE disable_UI :
  274. /*------------------------------------------------------------------------------
  275. Purpose: DISABLE the User Interface
  276. Parameters: <none>
  277. Notes: Here we clean-up the user-interface by deleting
  278. dynamic widgets we have created and/or hide
  279. frames. This procedure is usually called when
  280. we are ready to "clean-up" after running.
  281. ------------------------------------------------------------------------------*/
  282. /* Hide all frames. */
  283. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  284. END PROCEDURE.
  285. /* _UIB-CODE-BLOCK-END */
  286. &ANALYZE-RESUME
  287. /* ************************ Function Implementations ***************** */
  288. {&DB-REQUIRED-START}
  289. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  290. FUNCTION openQuery RETURNS LOGICAL
  291. ( /* parameter-definitions */ ) :
  292. /*------------------------------------------------------------------------------
  293. Purpose: Super Override
  294. Notes:
  295. ------------------------------------------------------------------------------*/
  296. /* xWhere = 'Adresse.Firma = "' + Firma + '" '. */
  297. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
  298. /* xSort = ''. */
  299. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  300. /* xWhere = ''. */
  301. /* DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere). */
  302. RETURN SUPER( ).
  303. END FUNCTION.
  304. /* _UIB-CODE-BLOCK-END */
  305. &ANALYZE-RESUME
  306. {&DB-REQUIRED-END}