home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / dbaseii / tdas.ark / STUD5-1.PRG < prev    next >
Encoding:
Text File  |  1986-08-24  |  3.0 KB  |  140 lines

  1. * 6-10-84   STUD5-1.PRG   This program lets you change the rate students
  2. * get charged per lesson.  You can change 'em all at one swoop, or each
  3. * student on an individual basis.
  4. ERASE
  5. SET talk OFF
  6. STORE T to Study
  7. DO WHILE Study
  8. USE B:Student
  9. SET Index TO Lname
  10. STORE " " to Mfull
  11. STORE "     " to Mrate
  12. STORE "                 " to Mname
  13. @ 22,0
  14. @ 5,6 SAY "This program enters the rate ($$'s) per lesson."
  15. @ 8,9 SAY [If you only want to enter a single student's new rate-per-lesson,]
  16. @ 9,9 SAY '---===>>Press "N"'
  17. @ 11,9 SAY [If you want to change everyone's rate, one after another,]
  18. @ 12,9 SAY '---===>>Press "Y"'
  19. @ 13,1 SAY "        "
  20. @ 14,9 SAY [If you'd really rather forget the whole thing,]
  21. @ 15,9 SAY '---===>>Press "A"'
  22. DO WHILE .NOT. Mfull$"YNA"
  23. @ 17,39 GET Mfull PICTURE "!"
  24. READ NOUPDATE
  25. ENDDO
  26. *
  27. IF Mfull="A"
  28.   STORE F to Study
  29.   ERASE
  30. ENDIF
  31. *
  32. IF Mfull="N"
  33.   ERASE
  34.   STORE "               " to Mname
  35.   @ 3,24 SAY "YOUR COMPANY NAME CAN GO HERE"
  36.   @ 13,1 SAY "Enter the Student's last name" GET Mname
  37.   READ NOUPDATE
  38.   *
  39.   IF Mname = "               "
  40.     STORE F to Study
  41.     USE
  42.     RETURN
  43.  
  44.   ELSE
  45.     STORE TRIM(Mname) to Findstud
  46.   ENDIF
  47. *
  48. FIND &Findstud
  49. *
  50. IF #=0
  51.   ERASE
  52.   @ 22,0 SAY Findstud+" is not in the student file."
  53.   LOOP
  54. ENDIF
  55. *
  56. IF #>0
  57.   STORE # to Placemark
  58. ENDIF
  59. *
  60. IF .NOT. Acct:Num = Findstud
  61.   SKIP
  62.     IF Lname=Findstud .AND. .NOT. EOF
  63.       ERASE
  64.       @ 1,1 SAY 'We have more than one '+findstud' on file.'
  65.       SKIP -1
  66.       ?
  67.       DISPLAY Fname,Lname WHILE Lname=Findstud
  68.       ?
  69.       INPUT "Enter the number from left column, or (num.) 0 to abort.";
  70.       to Placemark
  71.     ENDIF
  72.   ENDIF
  73. *
  74.   IF Placemark>0
  75.     GO Placemark
  76.     ERASE
  77.     SET Colon OFF
  78.     @ 5,3 SAY Fname
  79.     @ 5,17 SAY Lname
  80.     @ 8,30 SAY "New rate per lessson: "GET Mrate PICTURE "99.99"
  81.     READ NOUPDATE
  82.     REPLACE Rate WITH VAL(Mrate)
  83.     ERASE
  84.     STORE "     " to Mrate
  85.     CLEAR Gets
  86.     SET Colon ON
  87.   ENDIF
  88.   LOOP
  89. ENDIF
  90. *
  91. If Mfull="Y"
  92.   SET Colon OFF
  93.   ERASE
  94.   @ 11,5 SAY "First I'll be chugging for a moment or two erasing ALL the"
  95.   @ 13,5 SAY "rates-per-lesson I had on file previously.  Have patience!!"
  96.   STORE "     " to Mrate
  97.   REPLACE ALL Rate with VAL(Mrate)
  98.   ERASE
  99.   GO TOP
  100.   DO WHILE .NOT. EOF
  101.     STORE "     " to Mrate
  102.     @ 5,10 SAY Fname
  103.     @ 5,27 SAY Lname
  104.     @ 8,25 SAY "New rate-per-lesson:  " GET Mrate PICTURE '99.99'
  105.     READ NOUPDATE
  106.     REPLACE Rate WITH VAL(Mrate)
  107.     ERASE
  108.     SKIP
  109.     LOOP
  110.   ENDDO
  111. SET Colon ON
  112. ENDIF
  113. USE
  114. RETURN
  115. Findstud
  116.       ?
  117.       INPUT "Enter the number from left column, or (num.) 0 to abort.";
  118.       to Placemark
  119.     ENDIF
  120.   ENDIF
  121. *
  122.   IF Placemark>0
  123.     GO Placemark
  124.     ERASE
  125.     SET Colon OFF
  126.     @ 5,3 SAY Fname
  127.     @ 5,17 SAY Lname
  128.     @ 8,30 SAY "New rate per lessson: "GET Mrate PICTURE "99.99"
  129.     READ NOUPDATE
  130.     REPLACE Rate WITH VAL(Mrate)
  131.     ERASE
  132.     STORE "     " to Mrate
  133.     CLEAR Gets
  134.     SET Colon ON
  135.   ENDIF
  136.   LOOP
  137. ENDIF
  138. *
  139. If Mfull="Y"
  140.   S