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

  1. ; Kfz2
  2.  
  3.  
  4.  
  5. AppLib = "Kfz1"
  6. if (not isfile(AppLib + ".lib")) then
  7.   Createlib AppLib
  8. endif
  9.  
  10.  
  11. proc Kfz2S1()
  12. private opResult
  13.  
  14.   Readlib "Kfzutl" EntryTable, KECheck, ToggleForm, 
  15.         EdFldView, HelpKey, EntryCancel, EntryDoIt, 
  16.         RenamePre, RenameSet, SaveList, CreateList, 
  17.         PrintList
  18.  
  19.   opResult = EntryTable("Lager1", "", "1", TRUE)
  20.  
  21.   Release Procs EntryTable, KECheck, ToggleForm, 
  22.         EdFldView, HelpKey, EntryCancel, EntryDoIt, 
  23.         RenamePre, RenameSet, SaveList, CreateList, 
  24.         PrintList
  25.  
  26.   return opResult
  27. endproc
  28.  
  29. Writelib AppLib Kfz2S1
  30. Release Procs Kfz2S1
  31.  
  32. proc Kfz2S2()
  33. private opResult
  34.  
  35.   Readlib "Kfzutl" EditTable, ToggleForm, EdFldView, 
  36.         HelpKey, EditCancel, SEditDoIt, SEditDelIns
  37.  
  38.   opResult = EditTable("Lager1", "Lager1", "", "1", TRUE, 
  39.             "SEditDoIt", "SEditDelIns", 
  40.             "[Ins] - Einen Record einfügen, [Del] - Einen Record löschen",
  41.             FALSE, FALSE, FALSE)
  42.  
  43.   Release Procs EditTable, ToggleForm, EdFldView, 
  44.         HelpKey, EditCancel, SEditDoIt, SEditDelIns
  45.  
  46.  
  47.   return opResult
  48. endproc
  49.  
  50. Writelib AppLib Kfz2S2
  51. Release Procs Kfz2S2
  52.  
  53. proc Kfz2S4()
  54. private opResult
  55.  
  56.   Readlib "Kfzutl"  ReportTable
  57.  
  58.   opResult = ReportTable("Lager1", "Lager1", "1", "Printer", "")
  59.  
  60.   Release Procs ReportTable
  61.  
  62.   return opResult
  63. endproc
  64.  
  65. Writelib AppLib Kfz2S4
  66. Release Procs Kfz2S4
  67.  
  68. proc Kfz2Menu()
  69. private x, escape
  70.  
  71.   x = "Eingabe"
  72.   while (TRUE)
  73.     Clear
  74.  
  75.     ShowMenu
  76.         "Eingabe": "Artikel neu eingeben",
  77.         "Ändern": "Artikeldaten ändern,löschen",
  78.         "Suchen": "Suche nach einem bestimmten Artikel",
  79.         "Drucken": "Lagerbestand ausdrucken",
  80.         "Bestelliste sehen": "Artikel deren Mindestbestand unterschritten ist",
  81.         "Bestelliste drucken": "Bestelliste drucken Option"
  82.       Default x
  83.       To x
  84.  
  85.     switch
  86.       case x = "Eingabe":
  87.         ReadLib "Kfz1" Kfz2S1
  88.         escape = Kfz2S1()
  89.         escape = not escape
  90.         Release Procs Kfz2S1
  91.  
  92.       case x = "Ändern":
  93.         ReadLib "Kfz1" Kfz2S2
  94.         escape = Kfz2S2()
  95.         escape = not escape
  96.         Release Procs Kfz2S2
  97.  
  98.       case x = "Suchen":
  99.         Play "Lagersu"
  100.         x = "Suchen"
  101.         escape = FALSE
  102.  
  103.       case x = "Drucken":
  104.         ReadLib "Kfz1" Kfz2S4
  105.         escape = Kfz2S4()
  106.         escape = not escape
  107.         Release Procs Kfz2S4
  108.  
  109.       case x = "Bestelliste sehen":
  110.         Play "Bestels"
  111.         x = "Bestelliste sehen"
  112.         escape = FALSE
  113.  
  114.       case x = "Bestelliste drucken":
  115.         Play "Besteld"
  116.         x = "Bestelliste drucken"
  117.         escape = FALSE
  118.  
  119.       case x = "Esc":
  120.         return FALSE
  121.     endswitch
  122.  
  123.     ; Wert von ErrorProc zurücksetzen 
  124.     ErrorProc = "ApplicErrorProc"
  125.     ApplicErrorRetVal = FALSE
  126.  
  127.     if (not escape) then
  128.       return TRUE
  129.     endif
  130.   endwhile
  131. endproc
  132.  
  133. Writelib AppLib Kfz2Menu
  134. Release Procs Kfz2Menu
  135.  
  136.