d-adresse.w 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829
  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. &SCOPED-DEFINE Tabelle Adresse
  30. &SCOPED-DEFINE TabWhere USE-INDEX Adresse-k1 ~
  31. WHERE {&Tabelle}.Firma = ADFirma ~
  32. AND {&Tabelle}.Knr = tRowObject.Knr
  33. { incl/datdefinition.i }
  34. DEF VAR VSort AS INT NO-UNDO INIT 1.
  35. DEF VAR VKnr AS CHAR NO-UNDO INIT '0'.
  36. DEF VAR VSuchbe AS CHAR NO-UNDO INIT ''.
  37. DEF VAR VFirma1 AS CHAR NO-UNDO INIT ''.
  38. DEF VAR VName AS CHAR NO-UNDO INIT ''.
  39. DEF VAR VStrasse AS CHAR NO-UNDO INIT ''.
  40. DEF VAR VPlz AS CHAR NO-UNDO INIT ''.
  41. DEF VAR VOrt AS CHAR NO-UNDO INIT ''.
  42. /* _UIB-CODE-BLOCK-END */
  43. &ANALYZE-RESUME
  44. &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
  45. /* ******************** Preprocessor Definitions ******************** */
  46. &Scoped-define PROCEDURE-TYPE SmartDataObject
  47. &Scoped-define DB-AWARE yes
  48. &Scoped-define ADM-SUPPORTED-LINKS Data-Source,Data-Target,Navigation-Target,Update-Target,Commit-Target,Filter-Target
  49. /* Db-Required definitions. */
  50. &IF DEFINED(DB-REQUIRED) = 0 &THEN
  51. &GLOBAL-DEFINE DB-REQUIRED TRUE
  52. &ENDIF
  53. &GLOBAL-DEFINE DB-REQUIRED-START &IF {&DB-REQUIRED} &THEN
  54. &GLOBAL-DEFINE DB-REQUIRED-END &ENDIF
  55. &Scoped-define QUERY-NAME Query-Main
  56. /* Internal Tables (found by Frame, Query & Browse Queries) */
  57. &Scoped-define INTERNAL-TABLES Adresse
  58. /* Definitions for QUERY Query-Main */
  59. &Scoped-Define ENABLED-FIELDS AdrArt Aktiv Anrcd AnschrFix Anschrift1 Anschrift2 Anschrift3 Anschrift4~
  60. Anschrift5 Anschrift6 Anschrift7 Anschrift8 Anschrift9 Anschrift10~
  61. Anschrift11 Anschrift12 Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05~
  62. Cd06 Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1~
  63. Firma2 Funktion Knr Lkz Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd~
  64. Strasse Suchbe Tel-1 Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2~
  65. Homepage lFreigabe
  66. &Scoped-define ENABLED-FIELDS-IN-Adresse AdrArt Aktiv Anrcd AnschrFix ~
  67. Anschrift1 Anschrift2 Anschrift3 Anschrift4 Anschrift5 Anschrift6 ~
  68. Anschrift7 Anschrift8 Anschrift9 Anschrift10 Anschrift11 Anschrift12 ~
  69. Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05 Cd06 Cd07 Cd08 Cd09 Cd10 ~
  70. Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1 Firma2 Funktion Knr Lkz ~
  71. Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd Strasse Suchbe Tel-1 ~
  72. Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2 Homepage lFreigabe
  73. &Scoped-Define DATA-FIELDS AdrArt Aktiv Anrcd AnschrFix Anschrift1 Anschrift2 Anschrift3 Anschrift4~
  74. Anschrift5 Anschrift6 Anschrift7 Anschrift8 Anschrift9 Anschrift10~
  75. Anschrift11 Anschrift12 Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05~
  76. Cd06 Cd07 Cd08 Cd09 Cd10 Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1~
  77. Firma2 Funktion Knr Lkz Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd~
  78. Strasse Suchbe Tel-1 Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2~
  79. Homepage lFreigabe Adresse_Id
  80. &Scoped-define DATA-FIELDS-IN-Adresse AdrArt Aktiv Anrcd AnschrFix ~
  81. Anschrift1 Anschrift2 Anschrift3 Anschrift4 Anschrift5 Anschrift6 ~
  82. Anschrift7 Anschrift8 Anschrift9 Anschrift10 Anschrift11 Anschrift12 ~
  83. Anzeig_br Bem BriefAnr Cd01 Cd02 Cd03 Cd04 Cd05 Cd06 Cd07 Cd08 Cd09 Cd10 ~
  84. Cd11 Cd12 Cd13 Cd14 Cd15 ErfDat ErfSb Firma Firma1 Firma2 Funktion Knr Lkz ~
  85. Mail MutDat MutSb Name Natel Ort Plz Postfach Sprcd Strasse Suchbe Tel-1 ~
  86. Tel-2 Tel-3 Tel-4 Titel Vorname Zusatz1 Zusatz2 Homepage lFreigabe
  87. &Scoped-Define MANDATORY-FIELDS
  88. &Scoped-Define APPLICATION-SERVICE
  89. &Scoped-Define ASSIGN-LIST rowObject.Anschrift1 = Adresse.Anschrift[1]~
  90. rowObject.Anschrift2 = Adresse.Anschrift[2]~
  91. rowObject.Anschrift3 = Adresse.Anschrift[3]~
  92. rowObject.Anschrift4 = Adresse.Anschrift[4]~
  93. rowObject.Anschrift5 = Adresse.Anschrift[5]~
  94. rowObject.Anschrift6 = Adresse.Anschrift[6]~
  95. rowObject.Anschrift7 = Adresse.Anschrift[7]~
  96. rowObject.Anschrift8 = Adresse.Anschrift[8]~
  97. rowObject.Anschrift9 = Adresse.Anschrift[9]~
  98. rowObject.Anschrift10 = Adresse.Anschrift[10]~
  99. rowObject.Anschrift11 = Adresse.Anschrift[11]~
  100. rowObject.Anschrift12 = Adresse.Anschrift[12]
  101. &Scoped-Define DATA-FIELD-DEFS "d-adresse.i"
  102. &Scoped-define QUERY-STRING-Query-Main FOR EACH Adresse NO-LOCK INDEXED-REPOSITION
  103. {&DB-REQUIRED-START}
  104. &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Adresse NO-LOCK INDEXED-REPOSITION.
  105. {&DB-REQUIRED-END}
  106. &Scoped-define TABLES-IN-QUERY-Query-Main Adresse
  107. &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Adresse
  108. /* Custom List Definitions */
  109. /* List-1,List-2,List-3,List-4,List-5,List-6 */
  110. /* _UIB-PREPROCESSOR-BLOCK-END */
  111. &ANALYZE-RESUME
  112. /* ************************ Function Prototypes ********************** */
  113. {&DB-REQUIRED-START}
  114. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD getCurrentRecid dTables _DB-REQUIRED
  115. FUNCTION getCurrentRecid RETURNS RECID
  116. ( /* parameter-definitions */ ) FORWARD.
  117. /* _UIB-CODE-BLOCK-END */
  118. &ANALYZE-RESUME
  119. {&DB-REQUIRED-END}
  120. {&DB-REQUIRED-START}
  121. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD openQuery dTables _DB-REQUIRED
  122. FUNCTION openQuery RETURNS LOGICAL
  123. ( /* parameter-definitions */ ) FORWARD.
  124. /* _UIB-CODE-BLOCK-END */
  125. &ANALYZE-RESUME
  126. {&DB-REQUIRED-END}
  127. /* *********************** Control Definitions ********************** */
  128. {&DB-REQUIRED-START}
  129. /* Query definitions */
  130. &ANALYZE-SUSPEND
  131. DEFINE QUERY Query-Main FOR
  132. Adresse SCROLLING.
  133. &ANALYZE-RESUME
  134. {&DB-REQUIRED-END}
  135. /* ************************ Frame Definitions *********************** */
  136. /* *********************** Procedure Settings ************************ */
  137. &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
  138. /* Settings for THIS-PROCEDURE
  139. Type: SmartDataObject
  140. Allow: Query
  141. Frames: 0
  142. Add Fields to: Neither
  143. Other Settings: PERSISTENT-ONLY COMPILE APPSERVER DB-AWARE
  144. */
  145. /* This procedure should always be RUN PERSISTENT. Report the error, */
  146. /* then cleanup and return. */
  147. IF NOT THIS-PROCEDURE:PERSISTENT THEN DO:
  148. MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U
  149. VIEW-AS ALERT-BOX ERROR BUTTONS OK.
  150. RETURN.
  151. END.
  152. &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
  153. /* ************************* Create Window ************************** */
  154. &ANALYZE-SUSPEND _CREATE-WINDOW
  155. /* DESIGN Window definition (used by the UIB)
  156. CREATE WINDOW dTables ASSIGN
  157. HEIGHT = 1.62
  158. WIDTH = 72.6.
  159. /* END WINDOW DEFINITION */
  160. */
  161. &ANALYZE-RESUME
  162. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB dTables
  163. /* ************************* Included-Libraries *********************** */
  164. {src/adm2/data.i}
  165. /* _UIB-CODE-BLOCK-END */
  166. &ANALYZE-RESUME
  167. /* *********** Runtime Attributes and AppBuilder Settings *********** */
  168. &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
  169. /* SETTINGS FOR WINDOW dTables
  170. VISIBLE,,RUN-PERSISTENT */
  171. /* _RUN-TIME-ATTRIBUTES-END */
  172. &ANALYZE-RESUME
  173. /* Setting information for Queries and Browse Widgets fields */
  174. &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main
  175. /* Query rebuild information for SmartDataObject Query-Main
  176. _TblList = "AnaDat.Adresse"
  177. _Options = "NO-LOCK INDEXED-REPOSITION"
  178. _FldNameList[1] > AnaDat.Adresse.AdrArt
  179. "AdrArt" "AdrArt" ? ? "character" ? ? ? ? ? ? yes ? no 5.8 yes ""
  180. _FldNameList[2] > AnaDat.Adresse.Aktiv
  181. "Aktiv" "Aktiv" ? ? "logical" ? ? ? ? ? ? yes ? no 4.8 yes ""
  182. _FldNameList[3] > AnaDat.Adresse.Anrcd
  183. "Anrcd" "Anrcd" ? ? "integer" ? ? ? ? ? ? yes ? no 6.8 yes ""
  184. _FldNameList[4] > AnaDat.Adresse.AnschrFix
  185. "AnschrFix" "AnschrFix" ? ? "logical" ? ? ? ? ? ? yes ? no 9.2 yes ""
  186. _FldNameList[5] > AnaDat.Adresse.Anschrift[1]
  187. "Anschrift[1]" "Anschrift1" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  188. _FldNameList[6] > AnaDat.Adresse.Anschrift[2]
  189. "Anschrift[2]" "Anschrift2" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  190. _FldNameList[7] > AnaDat.Adresse.Anschrift[3]
  191. "Anschrift[3]" "Anschrift3" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  192. _FldNameList[8] > AnaDat.Adresse.Anschrift[4]
  193. "Anschrift[4]" "Anschrift4" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  194. _FldNameList[9] > AnaDat.Adresse.Anschrift[5]
  195. "Anschrift[5]" "Anschrift5" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  196. _FldNameList[10] > AnaDat.Adresse.Anschrift[6]
  197. "Anschrift[6]" "Anschrift6" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  198. _FldNameList[11] > AnaDat.Adresse.Anschrift[7]
  199. "Anschrift[7]" "Anschrift7" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  200. _FldNameList[12] > AnaDat.Adresse.Anschrift[8]
  201. "Anschrift[8]" "Anschrift8" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  202. _FldNameList[13] > AnaDat.Adresse.Anschrift[9]
  203. "Anschrift[9]" "Anschrift9" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  204. _FldNameList[14] > AnaDat.Adresse.Anschrift[10]
  205. "Anschrift[10]" "Anschrift10" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  206. _FldNameList[15] > AnaDat.Adresse.Anschrift[11]
  207. "Anschrift[11]" "Anschrift11" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  208. _FldNameList[16] > AnaDat.Adresse.Anschrift[12]
  209. "Anschrift[12]" "Anschrift12" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  210. _FldNameList[17] > AnaDat.Adresse.Anzeig_br
  211. "Anzeig_br" "Anzeig_br" ? ? "character" ? ? ? ? ? ? yes ? no 60 yes ""
  212. _FldNameList[18] > AnaDat.Adresse.Bem
  213. "Bem" "Bem" ? ? "character" ? ? ? ? ? ? yes ? no 500 yes ""
  214. _FldNameList[19] > AnaDat.Adresse.BriefAnr
  215. "BriefAnr" "BriefAnr" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  216. _FldNameList[20] > AnaDat.Adresse.Cd01
  217. "Cd01" "Cd01" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  218. _FldNameList[21] > AnaDat.Adresse.Cd02
  219. "Cd02" "Cd02" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  220. _FldNameList[22] > AnaDat.Adresse.Cd03
  221. "Cd03" "Cd03" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  222. _FldNameList[23] > AnaDat.Adresse.Cd04
  223. "Cd04" "Cd04" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  224. _FldNameList[24] > AnaDat.Adresse.Cd05
  225. "Cd05" "Cd05" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  226. _FldNameList[25] > AnaDat.Adresse.Cd06
  227. "Cd06" "Cd06" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  228. _FldNameList[26] > AnaDat.Adresse.Cd07
  229. "Cd07" "Cd07" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  230. _FldNameList[27] > AnaDat.Adresse.Cd08
  231. "Cd08" "Cd08" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  232. _FldNameList[28] > AnaDat.Adresse.Cd09
  233. "Cd09" "Cd09" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  234. _FldNameList[29] > AnaDat.Adresse.Cd10
  235. "Cd10" "Cd10" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  236. _FldNameList[30] > AnaDat.Adresse.Cd11
  237. "Cd11" "Cd11" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  238. _FldNameList[31] > AnaDat.Adresse.Cd12
  239. "Cd12" "Cd12" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  240. _FldNameList[32] > AnaDat.Adresse.Cd13
  241. "Cd13" "Cd13" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  242. _FldNameList[33] > AnaDat.Adresse.Cd14
  243. "Cd14" "Cd14" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  244. _FldNameList[34] > AnaDat.Adresse.Cd15
  245. "Cd15" "Cd15" ? ? "character" ? ? ? ? ? ? yes ? no 5 yes ""
  246. _FldNameList[35] > AnaDat.Adresse.ErfDat
  247. "ErfDat" "ErfDat" ? ? "date" ? ? ? ? ? ? yes ? no 11.6 yes ""
  248. _FldNameList[36] > AnaDat.Adresse.ErfSb
  249. "ErfSb" "ErfSb" ? ? "character" ? ? ? ? ? ? yes ? no 5.2 yes ""
  250. _FldNameList[37] > AnaDat.Adresse.Firma
  251. "Firma" "Firma" ? ? "character" ? ? ? ? ? ? yes ? no 8.4 yes ""
  252. _FldNameList[38] > AnaDat.Adresse.Firma1
  253. "Firma1" "Firma1" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes ""
  254. _FldNameList[39] > AnaDat.Adresse.Firma2
  255. "Firma2" "Firma2" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes ""
  256. _FldNameList[40] > AnaDat.Adresse.Funktion
  257. "Funktion" "Funktion" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  258. _FldNameList[41] > AnaDat.Adresse.Knr
  259. "Knr" "Knr" ? ? "integer" ? ? ? ? ? ? yes ? no 7.8 yes ""
  260. _FldNameList[42] > AnaDat.Adresse.Lkz
  261. "Lkz" "Lkz" ? ? "character" ? ? ? ? ? ? yes ? no 3.4 yes ""
  262. _FldNameList[43] > AnaDat.Adresse.Mail
  263. "Mail" "Mail" ? ? "character" ? ? ? ? ? ? yes ? no 40 yes ""
  264. _FldNameList[44] > AnaDat.Adresse.MutDat
  265. "MutDat" "MutDat" ? ? "date" ? ? ? ? ? ? yes ? no 11.6 yes ""
  266. _FldNameList[45] > AnaDat.Adresse.MutSb
  267. "MutSb" "MutSb" ? ? "character" ? ? ? ? ? ? yes ? no 6.2 yes ""
  268. _FldNameList[46] > AnaDat.Adresse.Name
  269. "Name" "Name" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes ""
  270. _FldNameList[47] > AnaDat.Adresse.Natel
  271. "Natel" "Natel" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  272. _FldNameList[48] > AnaDat.Adresse.Ort
  273. "Ort" "Ort" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  274. _FldNameList[49] > AnaDat.Adresse.Plz
  275. "Plz" "Plz" ? ? "character" ? ? ? ? ? ? yes ? no 8 yes ""
  276. _FldNameList[50] > AnaDat.Adresse.Postfach
  277. "Postfach" "Postfach" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  278. _FldNameList[51] > AnaDat.Adresse.Sprcd
  279. "Sprcd" "Sprcd" ? ? "integer" ? ? ? ? ? ? yes ? no 8 yes ""
  280. _FldNameList[52] > AnaDat.Adresse.Strasse
  281. "Strasse" "Strasse" ? ? "character" ? ? ? ? ? ? yes ? no 30 yes ""
  282. _FldNameList[53] > AnaDat.Adresse.Suchbe
  283. "Suchbe" "Suchbe" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  284. _FldNameList[54] > AnaDat.Adresse.Tel-1
  285. "Tel-1" "Tel-1" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  286. _FldNameList[55] > AnaDat.Adresse.Tel-2
  287. "Tel-2" "Tel-2" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  288. _FldNameList[56] > AnaDat.Adresse.Tel-3
  289. "Tel-3" "Tel-3" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  290. _FldNameList[57] > AnaDat.Adresse.Tel-4
  291. "Tel-4" "Tel-4" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  292. _FldNameList[58] > AnaDat.Adresse.Titel
  293. "Titel" "Titel" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  294. _FldNameList[59] > AnaDat.Adresse.Vorname
  295. "Vorname" "Vorname" ? ? "character" ? ? ? ? ? ? yes ? no 20 yes ""
  296. _FldNameList[60] > AnaDat.Adresse.Zusatz1
  297. "Zusatz1" "Zusatz1" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes ""
  298. _FldNameList[61] > AnaDat.Adresse.Zusatz2
  299. "Zusatz2" "Zusatz2" ? ? "character" ? ? ? ? ? ? yes ? no 35 yes ""
  300. _FldNameList[62] > AnaDat.Adresse.Homepage
  301. "Homepage" "Homepage" ? ? "character" ? ? ? ? ? ? yes ? no 50 yes ""
  302. _FldNameList[63] > AnaDat.Adresse.lFreigabe
  303. "lFreigabe" "lFreigabe" ? ? "logical" ? ? ? ? ? ? yes ? no 8.6 yes ?
  304. _FldNameList[64] > "_<CALC>"
  305. "RECID(Adresse)" "Adresse_Id" "Recid Adresse" "->>>,>>>,>>9" "INT64" ? ? ? ? ? ? no ? no 13.8 no ?
  306. _Design-Parent is WINDOW dTables @ ( 1.14 , 2.6 )
  307. */ /* QUERY Query-Main */
  308. &ANALYZE-RESUME
  309. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK dTables
  310. /* *************************** Main Block *************************** */
  311. { incl/datmainblock.i }
  312. xWhere = ''.
  313. &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN
  314. RUN initializeObject.
  315. &ENDIF
  316. /* _UIB-CODE-BLOCK-END */
  317. &ANALYZE-RESUME
  318. /* ********************** Internal Procedures *********************** */
  319. {&DB-REQUIRED-START}
  320. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE DATA.CALCULATE dTables DATA.CALCULATE _DB-REQUIRED
  321. PROCEDURE DATA.CALCULATE :
  322. /*------------------------------------------------------------------------------
  323. Purpose: Calculate all the Calculated Expressions found in the
  324. SmartDataObject.
  325. Parameters: <none>
  326. ------------------------------------------------------------------------------*/
  327. ASSIGN
  328. rowObject.Adresse_Id = (RECID(Adresse))
  329. .
  330. END PROCEDURE.
  331. /* _UIB-CODE-BLOCK-END */
  332. &ANALYZE-RESUME
  333. {&DB-REQUIRED-END}
  334. {&DB-REQUIRED-START}
  335. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE dataAvailable dTables _DB-REQUIRED
  336. PROCEDURE dataAvailable :
  337. /*------------------------------------------------------------------------------
  338. Purpose: Super Override
  339. Parameters:
  340. Notes:
  341. ------------------------------------------------------------------------------*/
  342. { incl/datdataavailable.i }
  343. IF AVAILABLE rowObject AND
  344. rowObject.Knr > 0 THEN DO:
  345. DYNAMIC-FUNCTION('SETKNR':U, INPUT rowObject.Knr ) NO-ERROR.
  346. END.
  347. END PROCEDURE.
  348. /* _UIB-CODE-BLOCK-END */
  349. &ANALYZE-RESUME
  350. {&DB-REQUIRED-END}
  351. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI dTables _DEFAULT-DISABLE
  352. PROCEDURE disable_UI :
  353. /*------------------------------------------------------------------------------
  354. Purpose: DISABLE the User Interface
  355. Parameters: <none>
  356. Notes: Here we clean-up the user-interface by deleting
  357. dynamic widgets we have created and/or hide
  358. frames. This procedure is usually called when
  359. we are ready to "clean-up" after running.
  360. ------------------------------------------------------------------------------*/
  361. /* Hide all frames. */
  362. IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
  363. END PROCEDURE.
  364. /* _UIB-CODE-BLOCK-END */
  365. &ANALYZE-RESUME
  366. {&DB-REQUIRED-START}
  367. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchFirst dTables _DB-REQUIRED
  368. PROCEDURE fetchFirst :
  369. /*------------------------------------------------------------------------------
  370. Purpose: Super Override
  371. Parameters:
  372. Notes:
  373. ------------------------------------------------------------------------------*/
  374. RUN SUPER.
  375. IF AVAILABLE rowObject THEN DO:
  376. DYNAMIC-FUNCTION('SETKNR':U, INPUT rowObject.Knr ) NO-ERROR.
  377. END.
  378. END PROCEDURE.
  379. /* _UIB-CODE-BLOCK-END */
  380. &ANALYZE-RESUME
  381. {&DB-REQUIRED-END}
  382. {&DB-REQUIRED-START}
  383. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchLast dTables _DB-REQUIRED
  384. PROCEDURE fetchLast :
  385. /*------------------------------------------------------------------------------
  386. Purpose: Super Override
  387. Parameters:
  388. Notes:
  389. ------------------------------------------------------------------------------*/
  390. /* Code placed here will execute PRIOR to standard behavior. */
  391. RUN SUPER.
  392. IF AVAILABLE rowObject THEN DO:
  393. DYNAMIC-FUNCTION('SETKNR':U, INPUT rowObject.Knr ) NO-ERROR.
  394. END.
  395. END PROCEDURE.
  396. /* _UIB-CODE-BLOCK-END */
  397. &ANALYZE-RESUME
  398. {&DB-REQUIRED-END}
  399. {&DB-REQUIRED-START}
  400. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchNext dTables _DB-REQUIRED
  401. PROCEDURE fetchNext :
  402. /*------------------------------------------------------------------------------
  403. Purpose: Super Override
  404. Parameters:
  405. Notes:
  406. ------------------------------------------------------------------------------*/
  407. /* Code placed here will execute PRIOR to standard behavior. */
  408. RUN SUPER.
  409. IF AVAILABLE rowObject THEN DO:
  410. DYNAMIC-FUNCTION('SETKNR':U, INPUT rowObject.Knr ) NO-ERROR.
  411. END.
  412. END PROCEDURE.
  413. /* _UIB-CODE-BLOCK-END */
  414. &ANALYZE-RESUME
  415. {&DB-REQUIRED-END}
  416. {&DB-REQUIRED-START}
  417. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE fetchPrev dTables _DB-REQUIRED
  418. PROCEDURE fetchPrev :
  419. /*------------------------------------------------------------------------------
  420. Purpose: Super Override
  421. Parameters:
  422. Notes:
  423. ------------------------------------------------------------------------------*/
  424. /* Code placed here will execute PRIOR to standard behavior. */
  425. RUN SUPER.
  426. IF AVAILABLE rowObject THEN DO:
  427. DYNAMIC-FUNCTION('SETKNR':U, INPUT rowObject.Knr ) NO-ERROR.
  428. END.
  429. END PROCEDURE.
  430. /* _UIB-CODE-BLOCK-END */
  431. &ANALYZE-RESUME
  432. {&DB-REQUIRED-END}
  433. {&DB-REQUIRED-START}
  434. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE INAKTIVIEREN dTables _DB-REQUIRED
  435. PROCEDURE INAKTIVIEREN :
  436. /*------------------------------------------------------------------------------
  437. Purpose:
  438. Parameters: <none>
  439. Notes:
  440. ------------------------------------------------------------------------------*/
  441. { incl/datinaktivieren.i }
  442. END PROCEDURE.
  443. /* _UIB-CODE-BLOCK-END */
  444. &ANALYZE-RESUME
  445. {&DB-REQUIRED-END}
  446. {&DB-REQUIRED-START}
  447. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE initializeObject dTables _DB-REQUIRED
  448. PROCEDURE initializeObject :
  449. /*------------------------------------------------------------------------------
  450. Purpose: Super Override
  451. Parameters:
  452. Notes:
  453. ------------------------------------------------------------------------------*/
  454. { incl/datinitialize.i }
  455. END PROCEDURE.
  456. /* _UIB-CODE-BLOCK-END */
  457. &ANALYZE-RESUME
  458. {&DB-REQUIRED-END}
  459. {&DB-REQUIRED-START}
  460. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE OPENQUERY_REPOS dTables _DB-REQUIRED
  461. PROCEDURE OPENQUERY_REPOS :
  462. /*------------------------------------------------------------------------------
  463. Purpose:
  464. Parameters: <none>
  465. Notes:
  466. ------------------------------------------------------------------------------*/
  467. DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO.
  468. DEF INPUT PARAMETER ipSort AS INT NO-UNDO.
  469. DEF VAR Mandant AS CHAR NO-UNDO.
  470. Mandant = DYNAMIC-FUNCTION('GETADMANDANT':U) NO-ERROR.
  471. xWhere = 'FOR EACH Adresse USE-INDEX Adresse-k'
  472. + STRING(ipSort,'9 ')
  473. + 'WHERE Adresse.Firma = "' + Mandant + '" '
  474. + ' NO-LOCK INDEXED-REPOSITION '.
  475. DYNAMIC-FUNCTION('openQuery':U).
  476. END PROCEDURE.
  477. /* _UIB-CODE-BLOCK-END */
  478. &ANALYZE-RESUME
  479. {&DB-REQUIRED-END}
  480. {&DB-REQUIRED-START}
  481. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REAKTIVIEREN dTables _DB-REQUIRED
  482. PROCEDURE REAKTIVIEREN :
  483. /*------------------------------------------------------------------------------
  484. Purpose:
  485. Parameters: <none>
  486. Notes:
  487. ------------------------------------------------------------------------------*/
  488. { incl/datreaktivieren.i }
  489. END PROCEDURE.
  490. /* _UIB-CODE-BLOCK-END */
  491. &ANALYZE-RESUME
  492. {&DB-REQUIRED-END}
  493. {&DB-REQUIRED-START}
  494. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE REPOS dTables _DB-REQUIRED
  495. PROCEDURE REPOS :
  496. /*------------------------------------------------------------------------------
  497. Purpose:
  498. Parameters: <none>
  499. Notes:
  500. ------------------------------------------------------------------------------*/
  501. DEF INPUT PARAMETER ipRecid AS RECID NO-UNDO.
  502. FIND Adresse WHERE RECID(Adresse) = ipRecid NO-LOCK NO-ERROR.
  503. IF NOT AVAILABLE Adresse THEN RETURN.
  504. DYNAMIC-FUNCTION('SETKNR':U, INPUT Adresse.Knr ) NO-ERROR.
  505. DYNAMIC-FUNCTION('fetchRowIdent':U, INPUT STRING(ROWID(Adresse)), INPUT ? ).
  506. END PROCEDURE.
  507. /* _UIB-CODE-BLOCK-END */
  508. &ANALYZE-RESUME
  509. {&DB-REQUIRED-END}
  510. {&DB-REQUIRED-START}
  511. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_OPENFLAG dTables _DB-REQUIRED
  512. PROCEDURE SET_OPENFLAG :
  513. /*------------------------------------------------------------------------------
  514. Purpose:
  515. Parameters: <none>
  516. Notes:
  517. ------------------------------------------------------------------------------*/
  518. DEFINE INPUT PARAMETER iplOpen AS LOGICAL NO-UNDO.
  519. fOpen = iplOpen.
  520. DYNAMIC-FUNCTION('openQuery':U) NO-ERROR.
  521. END PROCEDURE.
  522. /* _UIB-CODE-BLOCK-END */
  523. &ANALYZE-RESUME
  524. {&DB-REQUIRED-END}
  525. {&DB-REQUIRED-START}
  526. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE SET_QUERYSTRING dTables _DB-REQUIRED
  527. PROCEDURE SET_QUERYSTRING :
  528. /*------------------------------------------------------------------------------
  529. Purpose:
  530. Parameters: <none>
  531. Notes:
  532. ------------------------------------------------------------------------------*/
  533. DEF INPUT PARAMETER ipStart AS CHAR NO-UNDO.
  534. DEF VAR ix AS INT NO-UNDO.
  535. DEF VAR i1 AS INT NO-UNDO.
  536. DEF VAR xString AS CHAR NO-UNDO.
  537. DEF VAR Mandant AS CHAR NO-UNDO.
  538. DEF VAR lInaktiv AS LOG NO-UNDO.
  539. lInaktiv = DYNAMIC-FUNCTION('getAnzeigeAdresseInaktiv':U) NO-ERROR.
  540. IF lInaktiv = ? THEN lInaktiv = TRUE.
  541. ix = NUM-ENTRIES( ipStart, CHR(01) ).
  542. VKnr = '0'.
  543. VSuchbe = ''.
  544. VFirma1 = ''.
  545. VName = ''.
  546. VStrasse = ''.
  547. VPlz = ''.
  548. VOrt = ''.
  549. Mandant = DYNAMIC-FUNCTION('GETADMANDANT':U) NO-ERROR.
  550. DO i1 = 1 TO ix:
  551. CASE i1:
  552. WHEN 1 THEN VKnr = ENTRY(i1, ipStart, CHR(01) ).
  553. WHEN 2 THEN VSuchbe = ENTRY(i1, ipStart, CHR(01) ).
  554. WHEN 3 THEN VFirma1 = ENTRY(i1, ipStart, CHR(01) ).
  555. WHEN 4 THEN VName = ENTRY(i1, ipStart, CHR(01) ).
  556. WHEN 5 THEN VStrasse = ENTRY(i1, ipStart, CHR(01) ).
  557. WHEN 6 THEN VPlz = ENTRY(i1, ipStart, CHR(01) ).
  558. WHEN 7 THEN VOrt = ENTRY(i1, ipStart, CHR(01) ).
  559. END CASE.
  560. END.
  561. xWhere = 'WHERE Adresse.Firma = "' + Mandant + '" '.
  562. IF VKnr <> '' THEN DO:
  563. VSort = 1.
  564. XString = 'AND Adresse.Knr >= ' + VKnr + ' '.
  565. xWhere = xWhere + xString.
  566. END.
  567. IF VSuchbe <> '' THEN DO:
  568. VSort = 2.
  569. XString = 'AND Adresse.Suchbe BEGINS "' + VSuchbe + '" '.
  570. xWhere = xWhere + xString.
  571. END.
  572. IF VFirma1 <> '' THEN DO:
  573. VSort = 3.
  574. XString = 'AND Adresse.Firma1 BEGINS "' + VFirma1 + '" '.
  575. xWhere = xWhere + xString.
  576. END.
  577. IF VName <> '' THEN DO:
  578. VSort = 4.
  579. XString = 'AND Adresse.Name BEGINS "' + VName + '" '.
  580. xWhere = xWhere + xString.
  581. END.
  582. IF VOrt <> '' THEN DO:
  583. VSort = 5.
  584. XString = 'AND Adresse.Ort BEGINS "' + VOrt + '" '.
  585. xWhere = xWhere + xString.
  586. END.
  587. IF VPlz <> '' THEN DO:
  588. VSort = 6.
  589. XString = 'AND Adresse.Plz BEGINS "' + VPlz + '" '.
  590. xWhere = xWhere + xString.
  591. END.
  592. IF VStrasse <> '' THEN DO:
  593. VSort = 7.
  594. XString = 'AND Adresse.Strasse BEGINS "' + VStrasse + '" '.
  595. xWhere = xWhere + xString.
  596. END.
  597. IF NOT lInaktiv THEN xWhere = xWhere + 'AND Adresse.Aktiv '.
  598. xWhere = 'FOR EACH Adresse USE-INDEX Adresse-k' + STRING(VSort,'9 ')
  599. + xWhere
  600. + ' NO-LOCK INDEXED-REPOSITION '.
  601. END PROCEDURE.
  602. /* _UIB-CODE-BLOCK-END */
  603. &ANALYZE-RESUME
  604. {&DB-REQUIRED-END}
  605. /* ************************ Function Implementations ***************** */
  606. {&DB-REQUIRED-START}
  607. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION getCurrentRecid dTables _DB-REQUIRED
  608. FUNCTION getCurrentRecid RETURNS RECID
  609. ( /* parameter-definitions */ ) :
  610. /*------------------------------------------------------------------------------
  611. Purpose:
  612. Notes:
  613. ------------------------------------------------------------------------------*/
  614. { incl/datgetcurrentrecid.i }
  615. END FUNCTION.
  616. /* _UIB-CODE-BLOCK-END */
  617. &ANALYZE-RESUME
  618. {&DB-REQUIRED-END}
  619. {&DB-REQUIRED-START}
  620. &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION openQuery dTables _DB-REQUIRED
  621. FUNCTION openQuery RETURNS LOGICAL
  622. ( /* parameter-definitions */ ) :
  623. /*------------------------------------------------------------------------------
  624. Purpose: Super Override
  625. Notes:
  626. ------------------------------------------------------------------------------*/
  627. xWhere = ''.
  628. /* DYNAMIC-FUNCTION('setQueryWhere':U, INPUT xWhere). */
  629. /* xSort = ''. */
  630. /* DYNAMIC-FUNCTION('setQuerySort':U, INPUT xSort). */
  631. IF xWhere = '' THEN RUN SET_QUERYSTRING ( INPUT '0' ).
  632. DYNAMIC-FUNCTION('setQueryString':U, INPUT xWhere).
  633. RETURN SUPER( ).
  634. END FUNCTION.
  635. /* _UIB-CODE-BLOCK-END */
  636. &ANALYZE-RESUME
  637. {&DB-REQUIRED-END}