Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. use TipAbon
  2. index on codabon to icodabon
  3. use
  4. use Persoane
  5. index on CNP to ICNP
  6. index on codabon to icodabon
  7. use
  8. use Convorbire
  9. index on CNP to ICNPC
  10.  
  11. Procedure From-OnOpen
  12.  
  13. use TipAbon in 1 index icodabon alias tip
  14. use Persoane in 2 index ICNP,icodabon alias per
  15. use Convorbiri in 3 index ICNPC alias con
  16. select 2
  17. set relation to codbalon into 1
  18. select 3
  19. set relation to CNP into 2
  20. return
  21. Procedure Form-OnClose
  22. close all
  23. return
  24. Procedure EntryField1_OnClick
  25. select 2
  26. form.entryfield2.value=nume
  27. form.entryfield3.value=codbalon
  28. form.entryfield4.value=plata
  29. form.entryfield5.value=datan
  30. form.entryfield6.value=adresa
  31. endif
  32. seek per -> codbalon
  33. if found()
  34. form.entryfieldf.value=costminut
  35. endif
  36. return
  37.  
  38. Procedure PushButton 1-OnClick
  39.  
  40. select 3
  41. CCNP = form.entryfield1.value
  42. nnrtel=form.entryfield11.value
  43.  
  44. select 2
  45. seek CCNP
  46. if found()
  47. select 1
  48. seek per -> codbalon
  49. if found()
  50. ccost=costminut
  51. endif
  52. endif
  53. select 3
  54. seek CCNP
  55.  
  56. if found(). and.nrtel=nnrtel
  57. replace nrtel with val(form.entryfield11)
  58. replace telapelat with val (form.entryfield12)
  59. replace ora with val (form.entryfield9)
  60. replace data with ctod(form.entryfield8)
  61. replace minute with form.entryfield10
  62. replace suma with minute *cost
  63. return
  64.  
  65. Procedure Pushbutton 2-OnClick
  66.  
  67. select 3
  68. use ftemp exclusive in 4
  69. select 4
  70. CCNP=form.entryfield
  71. seek CCNP
  72. if found()
  73. select 2
  74. seek con->CCNP
  75. if found()
  76. form.entryfield2.value=nume
  77. form.entryfield3.value=codbalon
  78. form.entryfield4.value=plata
  79. form.entryfield5.value=datan
  80. form.entryfield6.value=adresa
  81. select 1
  82. seek per->codabon
  83. if found()
  84. form.entryfield7.value=costminut
  85. endif
  86. endif
  87. endif
  88. do while.not.eof(3).and.CNP=CCNP
  89. append blank
  90. replace CNP with per->CNP
  91. replace nume with per->nume
  92. replace nrtel with per->nrtel
  93. replace telapelat with per->telapelat
  94. replace ora with per->ora
  95. replace data with per->data
  96. replace minute with per->minute
  97. replace suma with per->suma
  98. select 3
  99. skip
  100. enddo
  101. form.browse1.alias='ftemp'
  102. endif
  103. return
  104. Procedure PushButton3_OnClick
  105. select c.CNP,c.nrtel,p.nume,count(c.minute),count(c.CNP) from Convorbiri c,
  106. Persoana p where p.CNP=c.CNP group by c.CNP,c.nrtel,p.nume save to stat.dbf
  107. use stat in 4
  108. from.browse1.alias='stat'
  109. return endclass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement