Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. set talk off
  2. clear
  3. use echipe in 1 order tag cods alias ec
  4. use tehnic in 2 order tag codc alias te
  5. select ec
  6. set relation to codt into te
  7. use jucator in 3 order tag cods alias ju
  8. select jc
  9. set relation to code into ec, codj into ju
  10. r=accept('Cod echipa - 1, Jucator - 2')
  11.  
  12. Do case
  13. case r='1'
  14. Do AfisEchipa
  15. case r='2'
  16. Do AfisJucator
  17. case r='3'
  18. select 3
  19. browse
  20. other
  21. msgbox('Functie eronata: ' +r,'Eroare',0)
  22. clear all
  23. cancel
  24. endcase
  25. return
  26. Procedure AfisEchipa
  27. select 3
  28. set order to code
  29. r='D'
  30. do while r$'DdYy'
  31. clear
  32.  
  33. Vcode=accept('Cod echipa')
  34. seek Vcode
  35.  
  36. if eof()
  37. msgbox('Echipa ' + Vcode + ' nu are jucatori','Cod Eronat',0)
  38. wait 'Continuati D/N' to r
  39. LOOP
  40. endif
  41.  
  42. do while ce->code=Vcode
  43. ? ce->code,ce->nume , ce->antrenor
  44.  
  45. skip
  46. enddo
  47. wait 'continuati? D/N ' to r
  48. enddo
  49. clear all
  50. return
  51. Procedure AfisJucatori
  52. select 3
  53. set order to codj
  54. r='D'
  55. do while r$'DdYy'
  56. clear
  57. Vcodj=accept('Cod jucator ')
  58. Vcodj= Upper(Vcodj)
  59. seek Vcodj
  60. if eof()
  61. msgbox('Nu sunt jucatori la echipa ' + Vcodj , 'Jucator gresit',0)
  62. wait 'Continuati D/N' to r
  63. LOOP
  64. endif
  65.  
  66. do while ju->codj=Vcodj
  67. ? ju->codj,ju->nume, ju->Pozitia, ju->Salar
  68. skip
  69. enddo
  70. wait 'continuati? D/N ' to r
  71. enddo
  72. clear all
  73. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement