home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / DEUTSCH / SONSTIGE / KFZWERK / KFZ4.SC < prev    next >
Text File  |  1993-12-01  |  3KB  |  146 lines

  1. ; Kfz4
  2.  
  3.  
  4.  
  5. AppLib = "Kfz2"
  6. if (not isfile(AppLib + ".lib")) then
  7.   Createlib AppLib
  8. endif
  9.  
  10.  
  11. proc Kfz4S3()
  12. private opResult, tbl, rt, EscEnter, kovorseh
  13.  
  14.   Play "Kfzq3"    ; put query on workspace
  15.   if (ApplicErrorRetVal) then
  16.     ClearAll
  17.     return FALSE
  18.   endif
  19.  
  20.  
  21.   Readlib "Kfzutl" EnterVal
  22. ; holt einen Wert für die Variable kovorseh
  23.       kovorseh = EnterVal("Kostenvoranschlag zur Kontrolle: ", "S", "", 0)
  24.   Release Procs EnterVal
  25.   if (EscEnter) then
  26.     ClearAll
  27.     return FALSE
  28.   endif
  29.  
  30.   Readlib "Kfzutl" QueryDoIt
  31.   rt = QueryDoIt()
  32.   Release Procs QueryDoIt
  33.  
  34.   if (not rt) then
  35.     return FALSE
  36.   endif
  37.  
  38.   Readlib "Kfzutl"  ReportTable
  39.  
  40.   opResult = ReportTable("Antwort", "Kovoart", "1", "Screen", "")
  41.  
  42.   Release Procs ReportTable
  43.  
  44.   return opResult
  45. endproc
  46.  
  47. Writelib AppLib Kfz4S3
  48. Release Procs Kfz4S3
  49.  
  50. proc Kfz4S4()
  51. private opResult, tbl, rt, EscEnter, kovordru
  52.  
  53.   Play "Kfzq4"    ; put query on workspace
  54.   if (ApplicErrorRetVal) then
  55.     ClearAll
  56.     return FALSE
  57.   endif
  58.  
  59.  
  60.   Readlib "Kfzutl" EnterVal
  61. ; holt einen Wert für die Variable kovordru
  62.       kovordru = EnterVal("Kostenvoranschlag zum ausdrucken: ", "S", "", 0)
  63.   Release Procs EnterVal
  64.   if (EscEnter) then
  65.     ClearAll
  66.     return FALSE
  67.   endif
  68.  
  69.   Readlib "Kfzutl" QueryDoIt
  70.   rt = QueryDoIt()
  71.   Release Procs QueryDoIt
  72.  
  73.   if (not rt) then
  74.     return FALSE
  75.   endif
  76.  
  77.   Readlib "Kfzutl"  ReportTable
  78.  
  79.   opResult = ReportTable("Antwort", "Kovoart", "1", "Printer", "")
  80.  
  81.   Release Procs ReportTable
  82.  
  83.   return opResult
  84. endproc
  85.  
  86. Writelib AppLib Kfz4S4
  87. Release Procs Kfz4S4
  88.  
  89. proc Kfz4Menu()
  90. private x, escape
  91.  
  92.   x = "Adressen"
  93.   while (TRUE)
  94.     Clear
  95.  
  96.     ShowMenu
  97.         "Adressen": "Kundenadressen für Kostenvoranschläge bearbeiten",
  98.         "Positionen": "Positionen für Kostenvoranschläge bearbeiten",
  99.         "Kostenvoran. sehen": "Kostenvoranschlag zur Kontrolle auf dem Monitor auswählen",
  100.         "Kostenvoran. drucken": "Kostenvoranschlag auswählen und ausdrucken"
  101.       Default x
  102.       To x
  103.  
  104.     switch
  105.       case x = "Adressen":
  106.         ReadLib "Kfz3" Kfz9Menu
  107.         escape = Kfz9Menu()
  108.         escape = not escape
  109.         Release Procs Kfz9Menu
  110.  
  111.       case x = "Positionen":
  112.         ReadLib "Kfz4" Kfz10Menu
  113.         escape = Kfz10Menu()
  114.         escape = not escape
  115.         Release Procs Kfz10Menu
  116.  
  117.       case x = "Kostenvoran. sehen":
  118.         ReadLib "Kfz2" Kfz4S3
  119.         escape = Kfz4S3()
  120.         escape = not escape
  121.         Release Procs Kfz4S3
  122.  
  123.       case x = "Kostenvoran. drucken":
  124.         ReadLib "Kfz2" Kfz4S4
  125.         escape = Kfz4S4()
  126.         escape = not escape
  127.         Release Procs Kfz4S4
  128.  
  129.       case x = "Esc":
  130.         return FALSE
  131.     endswitch
  132.  
  133.     ; Wert von ErrorProc zurücksetzen 
  134.     ErrorProc = "ApplicErrorProc"
  135.     ApplicErrorRetVal = FALSE
  136.  
  137.     if (not escape) then
  138.       return TRUE
  139.     endif
  140.   endwhile
  141. endproc
  142.  
  143. Writelib AppLib Kfz4Menu
  144. Release Procs Kfz4Menu
  145.  
  146.