Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Program de evidenta contabila a unei case de schimb valutar

Baze de date


Program de evidenta contabila a unei case de schimb valutar

Programul realizat poate fi folosit la evidenta unei case de schimb valutar.



Sructura programului permite efectuarea tuturor operatiunilor specifice unei case de schimb valutar. Programul include o procedura care permite si crearea unor diferite rapoarte contabile cum ar fi situatia vanzarilor si cumpararilor la un moment dat, pe o zi sau pe o luna.

Mai multe amanute aflati ruland programul VALUTA.PRG in FOX PRO.

Baze de date

Baza de date CLIENTI.DBF stocheaza numele si datele clientilor care cumpara si vinde valuta.

In campul codc stocam un cod personal al clientului (la alegerea acestuia).

In campul nume stocam numele si prenumele clientului.

In campurile oras,strada,telefon,nr stocam datele clientului.

Baza de date CURSURI.DBF stocheaza informati despre valuta,respectiv valoarea cursului valutar din ziua respectiva.

In campul codv stocam codul valutei.

In campul nume stocam numele valutei.

In campul pretv stocam pretul la vanzare al valutei respective.

In campul pretc stocam pretul la cumparare al valutei respective.

Baza de date CUMPARAR.DBF stocheaza cumpararile efectuate de clienti intr-o anumita zi.

In campul codc stocam codul clientului care a cumparat valuta.

In campul codv stocam codul valutei cumparata de clientul respectiv.

In campul cant stocam cantitatea cumparata de client.

In campul data stocam data cand a avut loc cumparare cumpararea valutei.

Baza de date VANZARI.DBF stocheaza vanzarile de valuta efectuate intr-o anumita zi.

In campul codc stocam codul clientului care a vandut valuta.

In campul codv stocam codul valutei care a fost vanduta.

In campul cant stocam cantitatea de valuta vanduta de clientul respectiv.

In campul data stocam data cand a avut loc tranzactia.

Bazele de date BAZA7.DBF si SIT_VANZ.DBF ne ajuta prin structura lor la intocmirea rapoartelor lunare si la zi ,de vanzare respectiv cumparare ,in program.

Bazele de date BAZA1.DBF,BAZA2.DBF,BAZA3.DBF,BAZA4.DBF,BAZA6.DBF ne ofera informatii despre bazele de date Clienti.DBF,Cursuri.DBF,Vanzari.DBF si

Cumparar.DBF privind lungimea,tipul si numele campului folosit in bazele de date enumerate mai sus.

Proceduri Folosite

Cele mai importante proceduri din programul VALUTA.PRG sunt:

Creare_cursuri Creaza o noua baza de date CURSURI.DBF,inlocuind-o pe cea curenta.

Creare_vanzari Creaza o noua baza de date VANZARI.DBF.

Creare_cumpar Creaza o noua baza de date CUMPARAR.DBF.

Creare_clienti Creaza o noua baza de date CLIENTI.DBF.

Procedurile: Sterge1,Sterge2,Sterge3,Sterge4 sterg complet bazele de date CURSURI.DBF,VANZARI.DBF,CUMPARAR.DBF respectiv CLIENTI.DBF.

Procedurile :Modif_cursuri,Modif_clienti,Modif_vanzari,Modif_cumparari modifica unu sau mai multe campuri din respectivele baze de date.

Procedura Intr_valuta permite introducerea unei noi valute.

Procedura Intr_client permite introducerea unui nou client.

Procedura Cumparari executa operatia de cumparare a unei valute de catre client.In aceasta procedura este rulata o alta procedura 858c29i numita Cump1,care executa alegerea valutei pe care o cumpara clientul si datele clientului pe baza unui cod personal,aceasta procedura realizeaza si introducerea unui nou client.    

Procedura Vanzari executa operatia de vanzare a unei valute de catre client.In aceasta procedura este rulata o alta procedura numita Vanz1,care executa alegerea valutei pe care o vinde clientul si datele clientului pe baza unui cod personal,aceasta procedura realizeaza si introducerea unui nou client.    

Procedura SituatiaV intocmeste raportul vanzarilor pe o anumita zi.

Procedura SituatiaC intocmeste raportul cumpararilor pe o anumita zi.

Procedura SituatiaL intocmeste raportul pe luna in curs.

Procedura Iesire executa parasirea aplicatiei in FOXPRO sau la obtiunea utilizatorului in DOS.

Pe langa aceste proceduri mai sunt si alte proceduri mai mici care ajuta la rularea programului in cele mai bune conditi aici putem consemna procedurile de vizualizare a diferitelor baze de date dupa anumite criteri .

In acest program,chiar la inceputul lui,este rulat un program a carui sursa (CBR.PAS) a fost creata in BPASCAL si care are menirea de a proteja aplicatia prin cererea unei parole la inceputul executari aplicatiei.

NOTA:

In acest program de evidenta contabila a unei case de schimb valutar,pe langa procedurile clasice de cumparare,vanzare si cele pentru rapoarte sunt multe altele.

Ruland programul din FOXPRO el va intra in executabilul CBR.EXE(program de securitate) si va va cere o parola(care este raspunsul la o intrebare simpla;putem face ca parola sa o stie numai utilizatorul acestui program),daca parola nu este corecta aveti sansa de a o mai introduce de inca doua ori(a treia oara blocandu-se si trebuind resetat ),daca parola este corecta va va aparea meniul principal intr-o decoratie splendida.

In aceasta interfata aveti acces direct la help,quit si informati despre program apasand o tasta pentru fiecare.Din meniul principal puteti executa foarte multe operatiuni, pornind de la stergerea bazelor,modificarea bazelor de date pe care programul le are,introducerea unor noi clienti in baza de date CLIENTI.DBF sau a unui nou curs valutar in CURSURI.DBF.Puteti apela operatia vanzari prin care puteti vinde orice cantitate de valuta pe care o aveti,sau apeland cumparari puteti cumpara ce cantitate doriti.Aceste operatii sunt foarte simple:intai alegeti valuta pe care o vindeti sau o cumparati apoi trebuie sa introduceti codul dumneavoastra personal si daca existati in baza de date CLIENTI.DBF atunci toate datele personale sunt afisate pe ecran iar daca codul nu corespunde aveti posibilitatea sa consultati baza de date.Dupa ce ati tastat cantitatea de valuta dorita va va aparea dupa apasarea unei taste(ENTER) valoarea valutei in moneda nationala(LEU).Astfel s-a efectuat tranzactia.

Mai sunt operatii de vizualizare a bazelor de date si stergerea unui camp sau a mai multor campuri.

Daca apelati optiunea “Rapoarte” va va intocmi la alegere raportul pe o zi aleasa de dumneavoastra sau situatia lunara din luna in curs,privind toate operatiile de vanzare si cumparare a valutei.

Optiunea “Iesire” permite utilizatorului parasirea aplicatiei in foxpro sau dos ,sau anularea acesteia.

Programul Sursa

set talk off

set safety off

set clock on

set escape off

set scoreboard off

deactivate window all

clear

deactivate window valuta

DEFINE WINDOW ECRAN FROM 0,0 TO 23,78 DOUBLE

do openfer

ACTIVATE WINDOW ECRAN

do culoare

set color to r/w+

@ 1,10 SAY 'ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»'

set color to r/w

@ 2,10 SAY 's    CASA DE SCHIMB VALUTAR 'PROIECT' s'

set color to r/w+

@ 3,10 SAY 'ČΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝĽ'

@ 3,21 SAY 'ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»'

set color to r/w

@ 4,21 SAY 's BY DUMITRESCU RAZVAN s'

set color to r/w+

@ 5,21 SAY 'ČΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝĽ'

set color to w/b

@ 18,21 say 'F1' color scheme 8

@ 18,23 say ' Help '

@ 18,29 say 'F2' color scheme 8

@ 18,31 say 'About '

@ 18,37 say 'F3' color scheme 8

@ 18,39 say ' Exit '

for i=44 to 45

@ 18,i say ' '

endfor

on key label F1 do helpb1

on key label F2 do aboutp1

on key label F3 do iesp1

DEFINE MENU MEN

DEFINE PAD ONE OF MEN PROMPT '<BAZE DATE' AT 8,4 MESSAGE 'Creare, stergere baze de date'

DEFINE PAD TWO OF MEN PROMPT '<ACTUALIZARI' MESSAGE 'Modificare,stergere date'

DEFINE PAD THREE OF MEN PROMPT '<CUMPARARI' MESSAGE 'Cumparare valuta'

DEFINE PAD FOUR OF MEN PROMPT '<VANZARI' MESSAGE 'Vanzare valuta'

DEFINE PAD FIFE OF MEN PROMPT '<RAPOARTE' MESSAGE 'Rapoarte vanzari - cumparari'

DEFINE PAD SIX OF MEN PROMPT '<IESIRE ' MESSAGE 'Terminarea programului'

ON PAD ONE OF MEN ACTIVATE POPUP BAZE

ON PAD TWO OF MEN ACTIVATE POPUP ACTUALIZARI

ON SELECTION PAD THREE OF MEN DO CUMPARARI

ON SELECTION PAD FOUR OF MEN DO VANZARI

ON PAD FIFE OF MEN ACTIVATE POPUP RAPOARTE

ON SELECTION PAD SIX OF MEN DO IESIRE

DEFINE POPUP RAPOARTE

DEFINE BAR 1 OF RAPOARTE PROMPT 'Situatia <vanzarilor de valuta' MESSAGE 'Situatia vanzarilor valutare pe o anumita zi'

DEFINE BAR 2 OF RAPOARTE PROMPT 'Situatia <cumpararilor de valuta' MESSAGE 'Situatia cumpararilor valutare pe o anumita zi'

DEFINE BAR 3 OF RAPOARTE PROMPT 'Situatia c<entralizata lunara' MESSAGE 'Raportul cumparare-vanzare lunara'

ON SELECTION BAR 1 OF RAPOARTE DO SITUATIAV

ON SELECTION BAR 2 OF RAPOARTE DO SITUATIAC

ON SELECTION BAR 3 OF RAPOARTE DO SITUATIAL

DEFINE POPUP ACTUALIZARI

DEFINE BAR 1 OF ACTUALIZARI PROMPT '<Modificare ' MESSAGE 'Modificare date'

DEFINE BAR 2 OF ACTUALIZARI PROMPT '<Stergere ' MESSAGE 'Stergere de date'

DEFINE BAR 3 OF ACTUALIZARI PROMPT '<Intr Valuta ' MESSAGE 'Introducere noi tipuri de valuta'

defi bar 4 of actualizari prom 'Intr <Client' mess 'Introducere un nou client'

DEFINE BAR 5 OF ACTUALIZARI PROMPT '<Vizualizare ' MESSAGE 'Vizualizarea datelor'

ON BAR 1 OF ACTUALIZARI ACTIVATE POPUP MODIF

ON BAR 2 OF ACTUALIZARI ACTIVATE POPUP STERG

ON SELECTION BAR 3 OF ACTUALIZARI DO INTRVALUTA

on sele bar 4 of actualizari do intrclient

ON SELECTION BAR 5 OF ACTUALIZARI DO VIZUALIZARI

DEFINE POPUP MODIF

DEFINE BAR 1 OF MODIF PROMPT '<Cursuri' MESSAGE 'Modificare de date CURSURI.DBF'

DEFINE BAR 2 OF MODIF PROMPT 'Van<zari' MESSAGE 'Modificare de date VANZARI.DBF'

DEFINE BAR 3 OF MODIF PROMPT 'C<umparari' MESSAGE 'Modificare de date CUMPARARI.DBF'

DEFINE BAR 4 OF MODIF PROMPT 'C<lienti' MESSAGE 'Modificare de date CLIENTI.DBF'

DEFINE BAR 5 OF MODIF PROMPT '<Vizualizari' MESSAGE 'Vizualizarea bazelor de date '

ON SELECTION BAR 1 OF MODIF DO MODIF_CURSURI

ON SELECTION BAR 2 OF MODIF DO MODIF_VANZARI

ON SELECTION BAR 3 OF MODIF DO MODIF_CUMPARARI

ON SELECTION BAR 4 OF MODIF DO MODIF_CLIENTI

ON SELECTION BAR 5 OF MODIF DO VIZUALIZARI

DEFINE POPUP STERG

DEFINE BAR 1 OF STERG PROMPT '<Cursuri' MESSAGE 'Stergere de date CURSURI.DBF'

DEFINE BAR 2 OF STERG PROMPT 'Van<zari' MESSAGE 'Stergere de date VANZARI.DBF'

DEFINE BAR 3 OF STERG PROMPT 'C<umparari' MESSAGE 'Stergere de date CUMPARARI.DBF'

DEFINE BAR 4 OF STERG PROMPT 'C<lienti' MESSAGE 'Stergere de date CLIENTI.DBF'

DEFINE BAR 5 OF STERG PROMPT '<Vizualizari' MESSAGE 'Vizualizarea bazelor de date '

ON SELECTION BAR 1 OF STERG DO STERG_CURSURI

ON SELECTION BAR 2 OF STERG DO STERG_VANZARI

ON SELECTION BAR 3 OF STERG DO STERG_CUMPARARI

ON SELECTION BAR 4 OF STERG DO STERG_CLIENTI

ON SELECTION BAR 5 OF STERG DO VIZUALIZARI

DEFINE POPUP BAZE

DEFINE BAR 1 OF BAZE PROMPT '<Creare ' MESSAGE 'Creare baze de date'

DEFINE BAR 2 OF BAZE PROMPT '<Stergere ' MESSAGE 'Stergere baze de date'

ON BAR 1 OF BAZE ACTIVATE POPUP CREARE

ON BAR 2 OF BAZE ACTIVATE POPUP STERGERE

DEFINE POPUP CREARE

DEFINE BAR 1 OF CREARE PROMPT '<CURSURI' MESSAGE 'Creare baza de date CURSURI.DBF'

DEFINE BAR 2 OF CREARE PROMPT '<VANZARI' MESSAGE 'Creare baza de date VANZARI.DBF'

DEFINE BAR 3 OF CREARE PROMPT 'C<UMPARARI' MESSAGE 'Creare baza de date CUMPARARI.DBF'

DEFINE BAR 4 OF CREARE PROMPT 'C<LIENTI' MESSAGE 'Creare baza de date CLIENTI.DBF'

DEFINE BAR 5 OF CREARE PROMPT '<ALL' MESSAGE 'Crearea tuturor bazelor de date '

ON SELECTION BAR 1 OF CREARE DO CREARE_CURSURI

ON SELECTION BAR 2 OF CREARE DO CREARE_VANZARI

ON SELECTION BAR 3 OF CREARE DO CREARE_CUMPARARI

ON SELECTION BAR 4 OF CREARE DO CREARE_CLIENTI

ON SELECTION BAR 5 OF CREARE DO CREARE_ALL

DEFINE POPUP STERGERE

DEFINE BAR 1 OF STERGERE PROMPT '<CURSURI' MESSAGE 'Stergere baza de date CURSURI.DBF'

DEFINE BAR 2 OF STERGERE PROMPT '<VANZARI' MESSAGE 'Stergere baza de date VANZARI.DBF'

DEFINE BAR 3 OF STERGERE PROMPT 'C<UMPARARI' MESSAGE 'Stergere baza de date CUMPARARI.DBF'

DEFINE BAR 4 OF STERGERE PROMPT 'C<LIENTI' MESSAGE 'Stergere baza de date CLIENTI.DBF'

DEFINE BAR 5 OF STERGERE PROMPT '<ALL' MESSAGE 'Stergerea tuturor bazelor de date '

ON SELECTION BAR 1 OF STERGERE DO STERGE1

ON SELECTION BAR 2 OF STERGERE DO STERGE2

ON SELECTION BAR 3 OF STERGERE DO STERGE3

ON SELECTION BAR 4 OF STERGERE DO STERGE4

ON SELECTION BAR 5 OF STERGERE DO STERGE5

ACTIVATE MENU MEN PAD six

WAIT ''

DEACTIVATE WINDOW ECRAN

proc culoare

set color to w/g+

@0,0,21,76 box replicate(chr(176),9)

*set color to GR+/b

return

PROCEDURE CREARE_ALL

DO CREARE_CURSURI

DO CREARE_VANZARI

DO CREARE_CUMPARARI

DO CREARE_CLIENTI

RETURN

PROCEDURE CREARE_CURSURI

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE ' Creare CURSURI.DBF '

ACTIVATE WINDOW W

CLOSE ALL

IF FILE ('CURSURI.DBF')

@ 1,1 SAY 'Baza de date CURSURI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti rescrierea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('CURSURI.DBF')

CREATE CURSURI FROM BAZA1

ENDIF

ELSE

CREATE CURSURI.DBF FROM BAZA1.DBF

@ 2,1 SAY 'Baza de date CURSURI.DBF'

@ 3,1 SAY 'a fost creata.'

WAIT (' Apasati orice tasta.')

ENDIF

DEACTIVATE WINDOW W

USE

RETURN

PROCEDURE CREARE_VANZARI

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE ' Creare VANZARI.DBF '

ACTIVATE WINDOW W

CLOSE ALL

IF FILE ('VANZARI.DBF')

@ 1,1 SAY 'Baza de date VANZARI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti rescrierea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('VANZARI.DBF')

CREATE VANZARI.DBF FROM BAZA2.DBF

ENDIF

ELSE

CREATE VANZARI.DBF FROM BAZA2.DBF

@ 2,1 SAY 'Baza de date VANZARI.DBF'

@ 3,1 SAY 'a fost creata.'

WAIT (' Apasati orice tasta.')

ENDIF

DEACTIVATE WINDOW W

USE

RETURN

PROCEDURE CREARE_CUMPARARI

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE ' Creare CUMPARARI.DBF '

ACTIVATE WINDOW W

CLOSE ALL

IF FILE ('CUMPARARI.DBF')

@ 1,1 SAY 'Baza de date CUMPARARI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti rescrierea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('CUMPARARI.DBF')

CREATE CUMPARARI.DBF FROM BAZA3.DBF

ENDIF

ELSE

CREATE CUMPARARI.DBF FROM BAZA3.DBF

@ 2,1 SAY 'Baza de date CUMPARARI.DBF'

@ 3,1 SAY 'a fost creata.'

WAIT (' Apasati orice tasta.')

ENDIF

DEACTIVATE WINDOW W

USE

RETURN

PROCEDURE CREARE_CLIENTI

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE 'Creare CLIENTI.DBF'

ACTIVATE WINDOW W

CLOSE ALL

IF FILE ('CLIENTI.DBF')

@ 1,1 SAY 'Baza de date CLIENTI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti rescrierea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('CLIENTI.DBF')

CREATE CLIENTI.DBF FROM BAZA4.DBF

ENDIF

ELSE

CREATE CLIENTI.DBF FROM BAZA4.DBF

@ 2,1 SAY 'Baza de date CLIENTI.DBF '

@ 3,1 SAY 'a fost creata.'

WAIT (' Apasati orice tasta.')

ENDIF

DEACTIVATE WINDOW W

USE

RETURN

PROCEDURE STERGE1

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE ' Stergere CURSURI.DBF '

ACTIVATE WINDOW W

CLOSE ALL

IF FILE ('CURSURI.DBF')

@ 1,1 SAY 'Baza de date CURSURI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti stergerea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('CURSURI.DBF')

ENDIF

ELSE

WAIT (' Baza de date nu exista.')

ENDIF

DEACTIVATE WINDOW W

RETURN

PROCEDURE STERGE2

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE ' Stergere VANZARI.DBF '

ACTIVATE WINDOW W

CLOSE ALL

IF FILE('VANZARI.DBF')

@ 1,1 SAY 'Baza de date VANZARI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti stergerea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('VANZARI.DBF')

ENDIF

ELSE

WAIT (' Baza de date nu exista.')

ENDIF

DEACTIVATE WINDOW W

RETURN

PROCEDURE STERGE3

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE ' Stergere CUMPARARI.DBF '

ACTIVATE WINDOW W

CLOSE ALL

IF FILE('CUMPARARI.DBF')

@ 1,1 SAY 'Baza de date CUMPARARI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti stergerea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('CUMPARARI.DBF')

ENDIF

ELSE

WAIT (' Baza de date nu exista.')

ENDIF

DEACTIVATE WINDOW W

RETURN

PROCEDURE STERGE4

DEFINE WINDOW W FROM 10,15 TO 17,55 DOUBLE TITLE ' Stergere CLIENTI.DBF '

ACTIVATE WINDOW W

CLOSE ALL

IF FILE ('CLIENTI.DBF')

@ 1,1 SAY 'Baza de date CLIENTI.DBF este creata.'

@ 2,1 SAY 'Stergerea ei poate provoca o functio-'

@ 3,1 SAY 'nare defectoasa a programului.'

R='N'

@ 4,1 SAY 'Sigur doriti stergerea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('CLIENTI.DBF')

ENDIF

ELSE

WAIT (' Baza de date nu exista.')

ENDIF

DEACTIVATE WINDOW W

RETURN

PROCEDURE STERGE5

DEFINE WINDOW W FROM 10,15 TO 21,56 DOUBLE TITLE ' Stergera tuturor bazeor de date'

ACTIVATE WINDOW W

CLOSE ALL

IF FILE ('CURSURI.DBF')

@ 1,1 SAY 'Baza de date CLIENTI.DBF este creata.'

ENDIF

IF FILE ('VANZARI.DBF')

@ 2,1 SAY 'Baza de date VANZARI.DBF este creata.'

ENDIF

IF FILE ('CUMPARARI.DBF')

@ 3,1 SAY 'Baza de date CUMPARARI.DBF este creata.'

ENDIF

IF FILE ('CLIENTI.DBF')

@ 4,1 SAY 'Baza de date CLIENTI.DBF este creata.'

ENDIF

@ 5,1 SAY 'Stergerea lor poate provoca o functio-'

@ 6,1 SAY 'nare defectoasa a programului.'

R='N'

@ 7,1 SAY 'Sigur doriti stergerea ei ?(D/N) ' GET R VALID UPPER(R)$'D|N'

READ

IF UPPER(R)='D'

ERASE('CLIENTI.DBF')

ERASE('CURSURI.DBF')

ERASE('VANZARI.DBF')

ERASE('CUMPARARI.DBF')

ENDIF

DEACTIVATE WINDOW W

RETURN

PROCEDURE MODIF_CURSURI

DEFINE WINDOW W FROM 7,3 TO 22,76 TITLE 'Modificare cursuri valutare ' COLOR SCHEME 4

ACTIVATE WINDOW W

SELE 1

USE CURSURI

MEN=0

DO WHILE MEN<>3

CLEAR

@ 1,1 SAY 'Codul valutei :' COLOR SCHEME 1

@ 2,1 SAY 'Numele valutei:' COLOR SCHEME 1

@ 3,1 SAY 'Pret vanzare :' COLOR SCHEME 1

@ 4,1 SAY 'Pret cumparare:' COLOR SCHEME 1

@ 6,3 PROMPT ' <Modificare acum ' MESSAGE 'Modificare cursului de schimb dupa codul valutei' COLOR SCHEME 5

@ 7,3 PROMPT ' <Vizualizare lista valutara ' MESSAGE 'Vizualizare lista cursuri dupa codul valutar ' COLOR SCHEME 5

@ 8,3 PROMPT ' <Iesire ' MESSAGE 'Terminarea modificare' COLOR SCHEME 5

MENU TO MEN

DO CASE

CASE MEN=1

MCODV=0

INDEX ON CODV TO COD1

@4,45 say 'F4' color scheme 2

@5,35 say 'Vizualizare lista valutara' color scheme 2

on key label F4 do viz12

@ 1,1 SAY 'Codul valutei : ' GET MCODV PICTURE '9999' COLOR SCHEME 1

READ

SEEK (MCODV)

IF FOUND()

MNUME=NUME

MPRETV=PRETV

MPRETC=PRETC

R='N'

DO WHILE UPPER(R)='N'

@ 2,1 SAY 'Numele valutei: ' COLOR SCHEME 1 GET MNUME

@ 3,1 SAY 'Pret vanzare : ' COLOR SCHEME 1 GET MPRETV VALID MPRETV>0

@ 4,1 SAY 'Pret cumparare: ' COLOR SCHEME 1 GET MPRETC VALID MPRETC>0

READ

R='D'

@ 5,1 SAY 'Datele introuse sunt corecte ? (D/N/C) ' GET R COLOR SCHEME 5 VALID UPPER(R)$ 'D|N|C|'

READ

IF UPPER(R)='D'

REPLACE NUME WITH MNUME

REPLACE PRETV WITH MPRETV

REPLACE PRETC WITH MPRETC

ENDIF

@ 5,1 SAY ' '

ENDDO

ELSE

@ 10,6 TO 14,36 DOUBLE

@ 11,8 SAY 'Cod valuta inexistent ' COLOR SCHEME 5

@ 12,8 SAY 'Consultati lista valutara' COLOR SCHEME 5

WAIT ''

ENDIF

CASE MEN=2

DO VIZ12

ENDCASE

ENDDO

CLOSE ALL

ERASE('COD1.IDX')

DEACTIVATE WINDOW W

RETURN

PROCEDURE INTRVALUTA

DEFINE WINDOW W FROM 7,3 TO 22,76 TITLE 'Introducere noi valute ' COLOR SCHEME 4

ACTIVATE WINDOW W

SELE 1

USE CURSURI

MEN=0

DO WHILE MEN<>3

CLEAR

@ 1,1 SAY 'Codul valutei : ' COLOR SCHEME 1

@ 2,1 SAY 'Numele valutei: ' COLOR SCHEME 1

@ 3,1 SAY 'Pret vanzare : ' COLOR SCHEME 1

@ 4,1 SAY 'Pret cumparare: ' COLOR SCHEME 1

@ 6,3 PROMPT ' I<ntroducere acum ' MESSAGE 'Introducere noi valute' COLOR SCHEME 5

@ 7,3 PROMPT ' <Vizualizare lista valutara ' MESSAGE 'Vizualizare lista cursuri dupa codul valutar ' COLOR SCHEME 5

@ 8,3 PROMPT ' <Iesire ' MESSAGE 'Terminarea introducere' COLOR SCHEME 5

MENU TO MEN

DO CASE

CASE MEN=1

MCODV=0

INDEX ON CODV TO COD1

@4,45 say 'F4' color scheme 2

@5,35 say 'Vizualizare lista valutara' color scheme 2

on key label F4 do viz12

@ 1,1 SAY 'Codul valutei : ' GET MCODV PICTURE '9999' COLOR SCHEME 1 VALID MCODV>0

READ

SEEK (MCODV)

IF NOT FOUND()

MNUME=SPACE(3)

MPRETV=0

MPRETC=0

R='N'

DO WHILE UPPER(R)='N'

@ 2,1 SAY 'Numele valutei: ' COLOR SCHEME 1 GET MNUME

@ 3,1 SAY 'Pret vanzare : ' COLOR SCHEME 1 GET MPRETV PICTURE '9999.99' VALID MPRETV>0

@ 4,1 SAY 'Pret cumparare: ' COLOR SCHEME 1 GET MPRETC PICTURE '9999.99' VALID MPRETC>0

READ

R='D'

@ 5,1 SAY 'Datele introuse sunt corecte ? (D/N/C) ' GET R COLOR SCHEME 5 VALID UPPER(R)$ 'D|N|C|'

READ

IF UPPER(R)='D'

APPE BLANK

REPLACE CODV WITH MCODV

REPLACE NUME WITH MNUME

REPLACE PRETV WITH MPRETV

REPLACE PRETC WITH MPRETC

ENDIF

@ 5,1 SAY ' '

ENDDO

ELSE

@ 10,6 TO 14,36 DOUBLE

@ 11,8 SAY 'Cod valuta existent ' COLOR SCHEME 5

@ 12,8 SAY 'Consultati lista valutara' COLOR SCHEME 5

WAIT ''

ENDIF

CASE MEN=2

DO VIZ12

ENDCASE

ENDDO

CLOSE ALL

ERASE('COD1.IDX')

DEACTIVATE WINDOW W

RETURN

PROCEDURE INTRclient

DEFINE WINDOW W FROM 7,3 TO 22,76 TITLE 'Introducere noi clienti ' COLOR SCHEME 4

ACTIVATE WINDOW W

SELE 4

USE clienti

MEN=0

DO WHILE MEN<>4

CLEAR

@ 1,1 SAY 'Codul clientului : ' COLOR SCHEME 1

@ 2,1 SAY 'Numele clientului: ' COLOR SCHEME 1

@ 3,1 SAY 'Oras client: ' COLOR SCHEME 1

@ 4,1 SAY 'Strada client: ' COLOR SCHEME 1

@ 5,1 say 'Nr client :' color scheme 1

@ 6,1 say 'Telefon client:' color scheme 1

@ 8,3 PROMPT ' I<ntroducere acum ' MESSAGE 'Introducere noi clienti' COLOR SCHEME 5

@ 9,3 PROMPT ' <Vizualizare lista clienti ' MESSAGE 'Vizualizare lista clienti dupa codul clientului ' COLOR SCHEME 5

@ 10,3 prom 'Vizualizare lista clienti dupa <nume' mess 'DUPA NUME' color scheme 5

@ 11,3 PROMPT ' <Iesire ' MESSAGE 'Terminarea introducere' COLOR SCHEME 5

MENU TO MEN

DO CASE

CASE MEN=1

MCODV=0

INDEX ON CODc TO COD4

@4,45 say 'F4' color scheme 2

@5,35 say 'Vizualizare lista clienti' color scheme 2

on key label F4 do viz42

@ 1,1 SAY 'Cod client: ' GET MCODV PICTURE '9999' COLOR SCHEME 1 VALID MCODV>0

READ

SEEK (MCODV)

IF NOT FOUND()

MNUME=SPACE(30)

Moras=space(15)

Mstrada=space(15)

mnr=0

mtelefon=space(12)

R='N'

DO WHILE UPPER(R)='N'

@ 2,1 SAY 'Numele client: ' COLOR SCHEME 1 GET MNUME

@ 3,1 SAY 'Oras client : ' COLOR SCHEME 1 GET Moras

@ 4,1 SAY 'Strada client: ' COLOR SCHEME 1 GET Mstrada

@ 5,1 say 'Nr client:' get mnr picture '9999' color scheme 1 valid mnr>=0

@ 6,1 say 'Telefon client:' get mtelefon color scheme 1

READ

R='D'

@ 8,1 SAY 'Datele introuse sunt corecte ? (D/N/C) ' GET R COLOR SCHEME 5 VALID UPPER(R)$ 'D|N|C|'

READ

IF UPPER(R)='D'

APPE BLANK

REPLACE CODc WITH MCODV

REPLACE NUME WITH MNUME

REPLACE oras WITH Moras

REPLACE strada WITH Mstrada

repl nr with mnr

repl telefon with mtelefon

ENDIF

@ 8,1 SAY ' '

ENDDO

ELSE

@ 10,6 TO 14,36 DOUBLE

@ 11,8 SAY 'Cod client existent ' COLOR SCHEME 5

@ 12,8 SAY 'Consultati lista clienti' COLOR SCHEME 5

WAIT ''

ENDIF

CASE MEN=2

DO VIZ41

case men=3

do viz42

ENDCASE

ENDDO

CLOSE ALL

ERASE('COD4.IDX')

DEACTIVATE WINDOW W

RETURN

PROCEDURE STERG_CURSURI

DEFINE WINDOW W FROM 7,3 TO 22,76 TITLE 'Introducere noi valute ' COLOR SCHEME 4

ACTIVATE WINDOW W

SELE 1

USE CURSURI

MEN=0

DO WHILE MEN<>3

CLEAR

@ 1,1 SAY 'Codul valutei : ' COLOR SCHEME 1

@ 2,1 SAY 'Numele valutei: ' COLOR SCHEME 1

@ 3,1 SAY 'Pret vanzare : ' COLOR SCHEME 1

@ 4,1 SAY 'Pret cumparare: ' COLOR SCHEME 1

@ 7,3 PROMPT ' S<tergere acum ' MESSAGE 'Introducere noi valute' COLOR SCHEME 5

@ 8,3 PROMPT ' <Vizualizare lista valutara ' MESSAGE 'Vizualizare lista cursuri dupa codul valutar ' COLOR SCHEME 5

@ 9,3 PROMPT ' <Iesire ' MESSAGE 'Terminarea introducere' COLOR SCHEME 5

MENU TO MEN

DO CASE

CASE MEN=1

MCODV=0

iNDEX ON CODV TO COD1

@4,45 say 'F4' color scheme 2

@5,35 say 'Vizualizare lista valutara' color scheme 2

on key label F4 do viz12

@ 1,1 SAY 'Codul valutei : ' GET MCODV PICTURE '9999' COLOR SCHEME 1 VALID MCODV>0

READ

SEEK (MCODV)

IF FOUND()

MNUME=NUME

MPRETV=PRETV

MPRETC=PRETC

@ 2,1 SAY 'Numele valutei: ' +MNUME COLOR SCHEME 1

@ 3,1 SAY 'Pret vanzare : ' +TRANSFORM(MPRETV,'9999.99') COLOR SCHEME 1

@ 4,1 SAY 'Pret cumparare: ' +TRANSFORM(MPRETC,'9999.99') COLOR SCHEME 1

R='N'

@ 6,1 SAY 'Datele vor fi sterse. Sunteti sigur? (D/N) ' GET R COLOR SCHEME 5 VALID UPPER(R)$ 'D|N|'

READ

IF UPPER(R)='D'

DELETE

PACK

ENDIF

@ 5,1 SAY ' '

ELSE

@ 10,6 TO 14,36 DOUBLE

@ 11,8 SAY 'Cod valuta inexistent ' COLOR SCHEME 5

@ 12,8 SAY 'Consultati lista valutara' COLOR SCHEME 5

WAIT ''

ENDIF

CASE MEN=2

DO VIZ12

ENDCASE

ENDDO

CLOSE ALL

ERASE('COD1.IDX')

DEACTIVATE WINDOW W

RETURN

PROCEDURE MODIF_VANZARI

DEFINE WINDOW W FROM 5,3 TO 22,76 TITLE 'Modificare date vanzari ' COLOR SCHEME 4

ACTIVATE WINDOW W

SELE 1

USE CURSURI

INDEX ON CODV TO COD1

SELE 2

USE VANZARI

MEN=0

DO WHILE MEN<>4

CLEAR

@ 1,1 SAY 'Cod client : ' COLOR SCHEME 1

@ 2,1 SAY 'Cod valuta : ' COLOR SCHEME 1

@ 3,1 SAY 'Numerar : ' COLOR SCHEME 1

@ 4,1 SAY 'Data vanzare : ' COLOR SCHEME 1

@ 5,1 SAY 'Tipul valutei : ' COLOR SCHEME 1

@ 7,3 PROMPT ' <Modificare acum ' MESSAGE 'Modificare datelor unei vanzari dupa codul clientului' COLOR SCHEME 5

@ 8,3 PROMPT ' <Vizualizare lista vanzari ' MESSAGE 'Vizualizare lista vanzari dupa cod client ' COLOR SCHEME 5

@ 9,3 PROMPT ' Vi<zualizare lista valuta ' MESSAGE 'Vizualizare lista valuta dupa codul valutei' COLOR SCHEME 5

@10,3 PROMPT ' <Iesire ' MESSAGE 'Terminarea modificare' COLOR SCHEME 5

MENU TO MEN

DO CASE

CASE MEN=1

SELE 2

MCODC=0

INDEX ON CODC TO COD2

@4,45 say 'F4' color scheme 2

@5,35 say 'Vizualizare lista vanzari' color scheme 2

on key label F4 do viz21

@ 1,1 SAY 'Cod client : ' GET MCODC PICTURE '9999' COLOR SCHEME 1

READ

SEEK (MCODC)

IF FOUND()

MCODV=CODV

MCANT=CANT

MDATA=DATA

R='N'

DO WHILE UPPER(R)='N'

@ 2,1 SAY 'Cod valuta : ' COLOR SCHEME 1 GET MCODV PICTURE '9999'

@ 3,1 SAY 'Numerar : ' COLOR SCHEME 1 GET MCANT PICTURE '9999999' VALID MCANT>0

@ 4,1 SAY 'Data vanzare : ' COLOR SCHEME 1 GET MDATA

READ

SELE 1

SEEK (MCODV)

IF FOUND()

@ 5,1 SAY 'Tipul valutei : ' COLOR SCHEME 1

@ 5,18 SAY NUME COLOR SCHEME 1

SELE 2

R='D'

@ 6,1 SAY 'Datele introuse sunt corecte ? (D/N/C) ' GET R COLOR SCHEME 5 VALID UPPER(R)$ 'D|N|C|'

READ

IF UPPER(R)='D'

REPLACE CODV WITH MCODV

REPLACE DATA WITH MDATA

REPLACE CANT WITH MCANT

ENDIF

@ 6,1 SAY ' '

ELSE

@ 12,6 TO 15,36 DOUBLE

@ 13,8 SAY 'Cod valuta inexistent ' COLOR SCHEME 5

@ 14,8 SAY 'Consultati lista valuta ' COLOR SCHEME 5

WAIT ''

R='C'

ENDIF

SELE 2

ENDDO

ELSE

@ 12,6 TO 15,36 DOUBLE

@ 13,8 SAY 'Cod client inexistent ' COLOR SCHEME 5

@ 14,8 SAY 'Consultati lista vanzari ' COLOR SCHEME 5

WAIT ''

ENDIF

CASE MEN=2

SELE 2

DO VIZ21

CASE MEN=3

SELE 1

DO VIZ12

ENDCASE

ENDDO

CLOSE ALL

ERASE('COD1.IDX')

ERASE('COD2.IDX')

DEACTIVATE WINDOW W

RETURN

PROCEDURE STERG_VANZARI

DEFINE WINDOW W FROM 5,3 TO 22,76 TITLE 'Stergere date vanzari ' COLOR SCHEME 4

ACTIVATE WINDOW W

SELE 1

USE CURSURI

INDEX ON CODV TO COD1

SELE 2

USE VANZARI

MEN=0

DO WHILE MEN<>4

CLEAR

@ 1,1 SAY 'Cod client : ' COLOR SCHEME 1

@ 2,1 SAY 'Cod valuta : ' COLOR SCHEME 1

@ 3,1 SAY 'Numerar : ' COLOR SCHEME 1

@ 4,1 SAY 'Data vanzare : ' COLOR SCHEME 1

@ 5,1 SAY 'Tipul valutei : ' COLOR SCHEME 1

@ 7,3 PROMPT ' <Stergere acum ' MESSAGE 'Stergerea datelor unei vanzari dupa codul clientului' COLOR SCHEME 5

@ 8,3 PROMPT ' <Vizualizare lista vanzari ' MESSAGE 'Vizualizare lista vanzari dupa cod client ' COLOR SCHEME 5

@ 9,3 PROMPT ' Vi<zualizare lista valuta ' MESSAGE 'Vizualizare lista valuta dupa codul valutei' COLOR SCHEME 5

@10,3 PROMPT ' <Iesire ' MESSAGE 'Terminarea stergere' COLOR SCHEME 5

MENU TO MEN

DO CASE

CASE MEN=1

SELE 2

MCODC=0

INDEX ON CODC TO COD2

@4,45 say 'F4' color scheme 2

@5,35 say 'Vizualizare lista vanzari' color scheme 2

on key label F4 do viz21

@ 1,1 SAY 'Cod client : ' GET MCODC PICTURE '9999' COLOR SCHEME 1

READ

SEEK (MCODC)

IF FOUND()

MCODV=CODV

MCANT=CANT

MDATA=DATA

R='N'

@ 2,1 SAY 'Cod valuta : ' COLOR SCHEME 1

@ 2,18 SAY TRANSFORM(MCODV,'9999') COLOR SCHEME 1

@ 3,1 SAY 'Numerar : ' COLOR SCHEME 1

@ 3,18 SAY TRANSFORM(MCANT,'9999999') COLOR SCHEME 1

@ 4,1 SAY 'Data vanzare : ' COLOR SCHEME 1

@ 4,18 SAY TRANSFORM(MDATA,'99/99/99') COLOR SCHEME 1

SELE 1

SEEK (MCODV)

IF FOUND()

@ 5,1 SAY 'Tipul valutei : ' COLOR SCHEME 1

@ 5,18 SAY NUME COLOR SCHEME 1

ENDIF

SELE 2

R='N'

@ 6,1 SAY 'Datele vor fi sterse din fisier. Sunteti sigur ?(D/N) ' GET R COLOR SCHEME 5 VALID UPPER(R)$ 'D|N|'

READ

IF UPPER(R)='D'

DELETE

PACK

ENDIF

@ 6,1 SAY ' '

ELSE

@ 12,6 TO 15,36 DOUBLE

@ 13,8 SAY 'Cod client inexistent ' COLOR SCHEME 5

@ 14,8 SAY 'Consultati lista vanzari ' COLOR SCHEME 5

WAIT ''

ENDIF

CASE MEN=2

SELE 2

DO VIZ21

CASE MEN=3

SELE 1

DO VIZ12

ENDCASE

ENDDO

CLOSE ALL

ERASE('COD1.IDX')

ERASE('COD2.IDX')

DEACTIVATE WINDOW W

RETURN

PROCEDURE SITUATIAL

DEFINE WINDOW W FROM 7,5 TO 22,74 DOUBLE TITLE ' Sitatia generala lunara '+CMONTH(DATE()) COLOR SCHEME 9

ACTIVATE WINDOW W

@ 1,14 SAY ' ** ** ** ** ****' COLOR SCHEME 1

@ 2,14 SAY '* RAPORT *' COLOR SCHEME 1

@ 3,14 SAY ' ** ** ** ** ****' COLOR SCHEME 1

MDATA1=DATE()

@ 5,5 SAY 'Data zilei : '+TRANSFORM(MDATA1,'99/99/99') COLOR SCHEME 1

@ 6,2 SAY 'Luna curenta : '+CMONTH(MDATA1) COLOR SCHEME 1

LUNA=MONTH(MDATA1)

SELE 1

USE CURSURI

INDEX ON CODV TO COD1

SELE 2

USE VANZARI

SELE 3

USE CUMPARARI

SELE 4

USE CLIENTI

INDEX ON CODC TO COD4

SELE 7

USE BAZA7

COPY STRU TO SIT_L

USE

SELE 7

USE SIT_L

SELE 3

TOTGEN=0

NUM=0

DO WHILE NOT EOF()

IF MONTH(DATA)=LUNA

NUM=NUM+1

MCODV=CODV

MCANT=CANT

MCODC=CODC

SELE 1

SEEK (MCODV)

IF FOUND()

MVALUTA=NUME

MPRETC=PRETC

MPRETV=PRETV

MTOTAL=MCANT*MPRETC

TOTGEN=TOTGEN+MTOTAL

ELSE

MVALUTA='???'

MPRETC=0

MTOTAL=0

ENDIF

SELE 4

SEEK(MCODC)

IF FOUND()

MNUME_C=NUME

MORAS=ORAS

MSTRADA=STRADA

MNR=NR

MTELEFON=TELEFON

ELSE

MNUME_C=' ? ? ???????'

MORAS=' ? ? ??'

MSTRADA=' ? ? ??'

MNR=0

MTELEFON=' ? ? '

ENDIF

SELE 7

APPEND BLANK

REPLACE CODVALUTA WITH MCODV

REPLACE VALUTA WITH MVALUTA

REPLACE CANTITATE WITH MCANT

REPLACE PRET_CUMP WITH MPRETC

REPLACE PRET_VANZ WITH MPRETV

REPLACE TOTAL_LEI WITH MTOTAL

REPLACE COD_CLIENT WITH MCODC

REPLACE NUME_C WITH MNUME_C

REPLACE ORAS WITH MORAS

REPLACE STRADA WITH MSTRADA

REPLACE NR WITH MNR

REPLACE TELEFON WITH MTELEFON

REPLACE OPERATIE WITH 'Cumparare'

ENDIF

SELE 3

SKIP

ENDDO

NUMC=NUM

TOTALC=TOTGEN

SELE 2

TOTGEN=0

NUM=0

DO WHILE NOT EOF()

IF MONTH(DATA)=LUNA

NUM=NUM+1

MCODV=CODV

MCANT=CANT

MCODC=CODC

SELE 1

SEEK (MCODV)

IF FOUND()

MVALUTA=NUME

MPRETC=PRETC

MPRETV=PRETV

MTOTAL=MCANT*MPRETC

TOTGEN=TOTGEN+MTOTAL

ELSE

MVALUTA='???'

MPRETC=0

MTOTAL=0

ENDIF

SELE 4

SEEK(MCODC)

IF FOUND()

MNUME_C=NUME

MORAS=ORAS

MSTRADA=STRADA

MNR=NR

MTELEFON=TELEFON

ELSE

MNUME_C=' ? ? ???????'

MORAS=' ? ? ??'

MSTRADA=' ? ? ??'

MNR=0

MTELEFON=' ? ? '

ENDIF

SELE 7

APPEND BLANK

REPLACE CODVALUTA WITH MCODV

REPLACE VALUTA WITH MVALUTA

REPLACE CANTITATE WITH MCANT

REPLACE PRET_CUMP WITH MPRETC

REPLACE PRET_VANZ WITH MPRETV

REPLACE TOTAL_LEI WITH MTOTAL

REPLACE COD_CLIENT WITH MCODC

REPLACE NUME_C WITH MNUME_C

REPLACE ORAS WITH MORAS

REPLACE STRADA WITH MSTRADA

REPLACE NR WITH MNR

REPLACE TELEFON WITH MTELEFON

REPLACE OPERATIE WITH 'Vanzare'

ENDIF

SELE 2

SKIP

ENDDO

NUMV=NUM

TOTALV=TOTGEN

SELE 7

IF NUMC+NUMC=0

@ 7,1 SAY 'Nu s-au efectuat operatiuni de vanzare - cumparare in luna curenta' COLOR SCHEME 1

wait' '

ELSE

DO VIZSIT_L

wait' '

ENDIF

CLOSE ALL

ERASE('COD1.IDX')

ERASE('COD4.IDX')

ERASE('SIT_L.DBF')

ERASE('NUM71.IDX')

ERASE('NUM72.IDX')

ERASE('TOT7.IDX')

DEACTIVATE WINDOW W

RETURN

PROCEDURE VIZSIT_L

DEFINE WINDOW VIZL FROM 6,2 TO 22,76 DOUBLE TITLE ' Sitatia lunara '+ CMONTH(MDATA1) COLOR SCHEME 1

ACTIVATE WINDOW VIZL

SELE 7

DEFINE POPUP V1 FROM 8,5

DEFINE BAR 1 OF V1 PROMPT 'Vizualizare dupa nume <client' MESSAGE 'Vizualizare in ordine crescatoare dupa numele clientului'

DEFINE BAR 2 OF V1 PROMPT 'Vizualizare dupa nume <valuta' MESSAGE 'Vizualizare in ordine crescatoare dupa numele valutei'

DEFINE BAR 3 OF V1 PROMPT 'Vizualizare dupa total <lei ' MESSAGE 'Vizualizare in ordine crescatoare dupa costul valutei vandute'

DEFINE BAR 4 OF V1 PROMPT ' <Iesire ' MESSAGE 'Iesire'

ON SELECTION BAR 1 OF V1 DO VIZ71

ON SELECTION BAR 2 OF V1 DO VIZ72

ON SELECTION BAR 3 OF V1 DO VIZ73

ON SELECTION BAR 4 OF V1 DEACTIVATE POPUP V1

ACTIVATE POPUP V1

DEACTIVATE WINDOW VIZL

RETURN

PROCEDURE VIZ71

DEFINE WINDOW W1 FROM 7,4 TO 22,74 DOUBLE TITLE ' Vizualizare dupa nume '

DEFINE WINDOW W2 FROM 8,5 TO 18,73

ACTIVATE WINDOW W1

@ 11,4 SAY ' Vanzare Cumparare'

@ 12,4 SAY 'Total general :' +STR(TOTALC+TOTALV)

@ 12,55 SAY STR(TOTALC)

@ 12,36 SAY STR(TOTALV)

@ 13,4 SAY 'Numar operatii :' +STR(NUMC+NUMV)

@ 13,55 SAY STR(NUMV)

@ 13,36 SAY STR(NUMC)

ACTIVATE WINDOW W2

SELE 7

INDEX ON NUME_C TO NUM71

BROWSE FIELDS OPERATIE, COD_CLIENT, NUME_C, CODVALUTA, VALUTA,;

CANTITATE, TOTAL_LEI, PRET_VANZ, PRET_CUMP, ORAS, STRADA, NR,;

TELEFON COLOR SCHEME 8 NOEDIT

DEACTIVATE WINDOW W2

DEACTIVATE WINDOW W1

RETURN

PROCEDURE VIZ72

DEFINE WINDOW W1 FROM 7,4 TO 22,74 DOUBLE TITLE ' Vizualizare dupa valuta '

DEFINE WINDOW W2 FROM 8,5 TO 18,73

ACTIVATE WINDOW W1

@ 11,4 SAY ' Vanzare Cumparare'

@ 12,4 SAY 'Total general :' +STR(TOTALC+TOTALV)

@ 12,55 SAY STR(TOTALC)

@ 12,36 SAY STR(TOTALV)

@ 13,4 SAY 'Numar operatii :' +STR(NUMC+NUMV)

@ 13,55 SAY STR(NUMV)

@ 13,36 SAY STR(NUMC)

ACTIVATE WINDOW W2

SELE 7

INDEX ON VALUTA TO NUM72

BROWSE FIELDS OPERATIE, CODVALUTA, VALUTA, CANTITATE, TOTAL_LEI,;

PRET_VANZ, PRET_CUMP, COD_CLIENT, NUME_C, ORAS, STRADA, NR,;

TELEFON COLOR SCHEME 8 NOEDIT

DEACTIVATE WINDOW W2

DEACTIVATE WINDOW W1

RETURN

PROCEDURE VIZ73

DEFINE WINDOW W1 FROM 7,4 TO 22,74 DOUBLE TITLE ' Vizualizare dupa total lei '

DEFINE WINDOW W2 FROM 8,5 TO 18,73

ACTIVATE WINDOW W1

@ 11,4 SAY ' Vanzare Cumparare'

@ 12,4 SAY 'Total general :' +STR(TOTALC+TOTALV)

@ 12,55 SAY STR(TOTALC)

@ 12,36 SAY STR(TOTALV)

@ 13,4 SAY 'Numar operatii :' +STR(NUMC+NUMV)

@ 13,55 SAY STR(NUMV)

@ 13,36 SAY STR(NUMC)

ACTIVATE WINDOW W2

SELE 7

INDEX ON TOTAL_LEI TO TOT7

BROWSE NOEDIT COLOR SCHEME 8

DEACTIVATE WINDOW W2

DEACTIVATE WINDOW W1

RETURN

procedure helpb1

help

return

procedure aboutp1

define window a from 10,20 to 17,60 title 'ABOUT' shadow

activate window a

@ 1,15 say 'CURS VALUTAR'

@ 2,13 say 'Seileanu Diana'

@ 3,18 say '2003'

@ 5,16 get ok function '*h !OK' default 1 size 1,10

read

if ok=1

show window a

release window a

endif

return

procedure iesp1

define window f from 10,20 to 17,60 shadow

activate window f

@ 1,10 say 'Sigur parasiti aplicatia ?'

@ 3,3 get okcancel function '*h !OK;?Cancel' default 1 size 1,10,13

read cycle

if okcancel=2

deactivate window f

*acti menu men

else

close all

on key label f1

*set help to foxhelp

deactivate window all

acti wind ecran

do closefer

clear

deacti wind all

set color to

cancel

endif

return

procedure iess1

define window f1 from 12,20 to 17,60 shadow

activate window f1

@ 1,11 say 'Parasiti FoxPro ?'

@ 3,3 get okcancel function '*h !OK;?Cancel' default 1;

size 1,10,13

read cycle

if okcancel=2

deactivate window f1

else

deactivate window all

quit

endif

return

PROCEDURE IESIRE

define window iesire from 8,20 to 15,55 title 'Iesire' double

activate window iesire

@1,1 say 'Doriti sa iesiti din program ? '

@2,3 prompt '    <Fox '

@3,3 prompt '    <Sistem '

@4,3 prompt '    <Nu '

menu to men

do case

case men=1

* deactivate window all

*acti wind ecran

do iesp1

*deact window ecran

case men=2

do iess1

endcase

deactivate window iesire

return

  • Ioan Lungu, Nely Musat – “Sistemul FoxPro-prezentare si aplicatii”, Editura ALL, Bucuresti, 1993
  • Gabriel Dima, Mihai Dima -- “FoxPro”, Editura TEORA, Bucuresti, 1995
  • Andrew Tannenbaum – “Retele de calculatoare”, Editura ALL, Bucuresti, 1996

Document Info


Accesari: 1226
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )