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

  1. ; Kfz3
  2.  
  3.  
  4.  
  5. AppLib = "Kfz1"
  6. if (not isfile(AppLib + ".lib")) then
  7.   Createlib AppLib
  8. endif
  9.  
  10.  
  11. proc Kfz3S3()
  12. private opResult, tbl, rt, EscEnter, auftragseh
  13.  
  14.   Play "Kfzq1"    ; 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 auftragseh
  23.       auftragseh = EnterVal("Auftragsnummer 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", "Reart", "1", "Screen", "")
  41.  
  42.   Release Procs ReportTable
  43.  
  44.   return opResult
  45. endproc
  46.  
  47. Writelib AppLib Kfz3S3
  48. Release Procs Kfz3S3
  49.  
  50. proc Kfz3S4()
  51. private opResult, tbl, rt, EscEnter, auftragdru
  52.  
  53.   Play "Kfzq2"    ; 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 auftragdru
  62.       auftragdru = EnterVal("Auftragsnummer 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", "Reart", "1", "Printer", "")
  80.  
  81.   Release Procs ReportTable
  82.  
  83.   return opResult
  84. endproc
  85.  
  86. Writelib AppLib Kfz3S4
  87. Release Procs Kfz3S4
  88.  
  89. proc Kfz3Menu()
  90. private x, escape
  91.  
  92.   x = "Kunden"
  93.   while (TRUE)
  94.     Clear
  95.  
  96.     ShowMenu
  97.         "Kunden": "Kundendaten bearbeiten",
  98.         "Rechnungs. Position.": "Rechnungspositionen bearbeiten",
  99.         "Rechnung sehen": "Kontrolle einer ausgewählten Rechnung auf dem Bildschirm",
  100.         "Rechnung drucken": "Ausdruck einer ausgewählten Rechnung",
  101.         "Aktualisieren": "Rechnungspositionen mit dem Lagerbestand verrechnen"
  102.       Default x
  103.       To x
  104.  
  105.     switch
  106.       case x = "Kunden":
  107.         ReadLib "Kfz3" Kfz7Menu
  108.         escape = Kfz7Menu()
  109.         escape = not escape
  110.         Release Procs Kfz7Menu
  111.  
  112.       case x = "Rechnungs. Position.":
  113.         ReadLib "Kfz3" Kfz8Menu
  114.         escape = Kfz8Menu()
  115.         escape = not escape
  116.         Release Procs Kfz8Menu
  117.  
  118.       case x = "Rechnung sehen":
  119.         ReadLib "Kfz1" Kfz3S3
  120.         escape = Kfz3S3()
  121.         escape = not escape
  122.         Release Procs Kfz3S3
  123.  
  124.       case x = "Rechnung drucken":
  125.         ReadLib "Kfz1" Kfz3S4
  126.         escape = Kfz3S4()
  127.         escape = not escape
  128.         Release Procs Kfz3S4
  129.  
  130.       case x = "Aktualisieren":
  131.         Play "Aktua1"
  132.         x = "Aktualisieren"
  133.         escape = FALSE
  134.  
  135.       case x = "Esc":
  136.         return FALSE
  137.     endswitch
  138.  
  139.     ; Wert von ErrorProc zurücksetzen 
  140.     ErrorProc = "ApplicErrorProc"
  141.     ApplicErrorRetVal = FALSE
  142.  
  143.     if (not escape) then
  144.       return TRUE
  145.     endif
  146.   endwhile
  147. endproc
  148.  
  149. Writelib AppLib Kfz3Menu
  150. Release Procs Kfz3Menu
  151.  
  152.