Home - Rasfoiesc.com
Educatie Sanatate Inginerie Business Familie Hobby Legal
Doar rabdarea si perseverenta in invatare aduce rezultate bune.stiinta, numere naturale, teoreme, multimi, calcule, ecuatii, sisteme




Biologie Chimie Didactica Fizica Geografie Informatica
Istorie Literatura Matematica Psihologie

Baze de date


Index » educatie » » informatica » Baze de date
» BAZE DE DATE - EVIDENTA UNUI MAGAZIN DE ELECTROCASNICE


BAZE DE DATE - EVIDENTA UNUI MAGAZIN DE ELECTROCASNICE


 

BAZE DE DATE



EVIDENTA UNUI MAGAZIN DE ELECTROCASNICE

Tema

Tema: aplicatie posibil reala, aceea de a tine o evidenta a marfurilor unui magazin, in cazul de fata unul de electrocasnice. Proiectul este compus din trei tabele de date aferente stocului, vanzarilor si a necesarului acestui magazin, aplicatia avand o interfata prietenoasa fiind si foarte usor de utilizat si de gasit un obiect sau de modificat,proiectul folosind modelul relational al bazelor de date.

Prezentare

Prezentarea bazelor de date

STOC.DBF

numeprodus C(20)

pret N(15)

garantie N(8)

datprimire D(8)

returnat L(1)

VANZARI.DBF   

numeprodus C(20)

garantie N(2)

gar_ramasa N(2)

pret N(10)

datvanzare D(8)

NECESAR.DBF

numeprodus C(20)

In baza de date STOC.DBF sunt continute informatii cu privire la produsele aflate in stoc si anume: numele produsului, pretul de vanzare, garantia exprimata in luni, data primirii sale si daca a fost returnat in garantie de cumparator(daca produsul a fost returnat campul are valoarea .T.,iar in caz contrar are valoarea .F.).

In baza de date VANZARI.DBF se gasesc informatii cu privire la produsele vandute de magazin, si anume: numele produsului, data vanzarii, garantia ramasa in luni care determina daca un produs mai poate fi returnat(se calculeaza ca diferenta intre data expirarii si data vanzarii), pretul de vanzare si garantia produsului in luni.

In baza de date NECESAR.DBF se gasesc numele produselor necesare aprovizionarii magazinului.

Prezentarea meniurilor si a ferestrelor

Aplicatia se deschide cu o fereastra in care apare meniul programului din care se executa toate aplicatiile programelor.

Meniul programului

Meniul programului are urmatoarele pad-uri:

1. STOC EXISTENT

STOC EXISTENT activeaza un popup care contine comenzi ce lucreaza cu baza de date STOC.DBF

adaugarea unui produs in stoc(procedura ADAUGARE

listarea ordonata a tuturor produselor existente in stoc dupa nume(procedura LISTAREDN),dupa pret(procedura LISTAREDP sau garantie(procedura LISTAREDG), stergerea unui produs(procedura STERGERE

modificarea informatiilor despre un produs din stoc(procedura ACTUALIZARE), cautarea unui produs din stoc dupa nume(procedura CAUTAREDN dupa pret(procedura CAUTAREDP) sau dupa garantie(procedura CAUTAREDG

evidenta produselor primite intr-o anumita zi(procedura PRIMIRI_ZI sau intr-o anumita perioada(procedura PRIMIRI_PERIOADA);

afisarea produselor cu pretul maxim(procedura PRET_MAXIM sau minim(procedura PRET_MINIM

afisarea marfurilor returnate in garantie (procedura RETURNATE sau nereturnate (procedura NERETURNATE

2.EVIDENTA VANZARII

EVIDENTA VANZARI activeaza un popup care contine comenzi pentru lucrul cu baza de date VANZARI.DBF

adugarea unui produs in baza de date VANZARI.DBF adica vanzarea acestui produs. Produsul poate fi vandut numai daca se afla in stoc. In acest caz produsul este sters din STOC.DBF si incepe monitorizarea garantiei ramase. Daca produsul nu se afla in stoc se considera ca produs cerut de client si trecut la(procedura ADAUGAREV

listarea tuturor produselor vandute ordonate crescator dupa nume (procedura LISTAREV

stergerea unui produs vandut din baza de date VANZARI.DBF) procedura STERGEREV

cautarea dupa nume a unui produs vandut in baza de date VANZARI.DBF (procedura CAUTAREV

listarea produselor vandute intr-o anumita zi citita de la tastatura(procedura VANZARI_ZI sau intr-o anumita perioada citita de la tastatura(procedura VANZARI_PERIOADA

3. EVIDENTA GARANTIEI

EVIDENTA GARANTIE activeaza un popup care contine comenzi cu privire la garantia ramasa pana la iesirea produsului din garantie:

afisarea produselor care mai sunt in garantie sub 12 de luni (procedura 0_12_LUNI

afisarea produselor care mai sunt in garantie intre 12 si 24 de luni (procedura 12_24_LUNI

afisarea produselor care au garantia ramasa peste 24 de luni (procedura PESTE_24_LUNI

afisarea produselor iesite din garantie (procedura IESITE_DIN_GARANTIE

cautarea unui produs a carui garantie ramasa se citeste de la tastatura (procedura CAUTARE _GAR

4.STOC NECESAR

STOC NECESAR activeaza un popup care contine comenzi pentru lucrul cu baza de date NECESAR.DBF

adaugarea unui produs in baza de date NECESAR.DBF care contine numele produselor ce sunt necesare reinnoirii stocului(procedura ADAUGAREN

listarea ordonata alfabetic dupa nume a stocului necesar de produse(procedura LISATREN

stergerea unui produs din baza de date NECESAR.DBF (procedura STERGEREN

cautarea unui produs in baza de date NECESAR.DBF(procedura CAUTAREN

5. IESIRE

IESIRE activeaza un popup care ofera posibilitatea iesirii din aplicatie in FOX sau in WINDOWS (procedurile IES_FOX si IES_WINDOWS

Programul aplicatiei

"a atestat.prg"

SET COLOR OF SCHEME 5 TO ,+6*/+1+ , 6+/5*

*Scris galben pe fundal albastru'

define wind sc from 0,0 to 54,128 color G+/B+

activ wind sc

say 'MAGAZIN ELECTROCAZNICE' colo R+/B+ font 'Monotype Corsiva',50 style 'b'

say 'Nume elev:' font 'times new roman',14 style 'bu' color R/B+

say 'C l a s a:' font 'times new roman',14 style 'bu' color r/b+

say 'S c o a l a:'font 'times new roman',14 style 'bu' color r/b+

say 'P r o f:'font 'times new roman',14 style 'bu' color r/B+

say 'OLARU ILIE DANIEL'font 'times new roman',14 style 'bi' color r/b+

say 'a XII-a A 2005/2006'font 'times new roman',14 style 'bi' color r/b+

say 'CATARAGA ISSABELLA'font 'times new roman',14 style 'bi' color r/B+

@ 30,93 say 'Grup Scolar 'HENRI COANDA'' font 'times new roman',14 style 'bi' color r/b+

say 'Rm. Valcea'font 'times new roman',14 style 'bi' color r/b+

define menu pp

define pad p1 of pp prom 'Continuare' at 35,100 font 'times new roman',12 style 'b' color scheme 5

define pad p2 of pp prom 'Iesire' at 35,125font 'times new roman',12 style 'b' color scheme 5

on sele pad p1 of pp do at_prg_s

on sele pad p2 of pp quit

activate menu pp

"at_prg_s.prg"

SET COLOR OF SCHEME 1TO ,+4/+n+ , 6+/5*

* Scris rosu pe fundal negru

SET COLOR OF SCHEME 2 TO ,+3/+4*+ , 6+/5*

*Scris albastru pe fundal rosu

DEFINE WINDOW F FROM 0,0 TO 54,132 DOUBLE COLOR R+/+1 fill file 1

DEFINE WINDOW f1 FROM 1,1 TO 20,76 PANEL COLOR 3/0 CLOSE

DEFINE WINDOW f2 FROM 7,7 TO 20,60 COLOR 6/0 CLOSE

DEFINE WIND f3 TITLE 'LISTARE' FROM 1 TO 40,76 COLOR 0/3 CLOSE

ACTIVATE WINDOW f

DEFINE MENU m

DEFINE PAD p1 OF m PROMPT 'STOC EXISTENT' at 5,6 color scheme 1 font 'times new roman',12 style 'b'

DEFINE PAD p2 OF m PROMPT 'EVIDENTA VANZARI' at 8,35 color scheme 1 font 'times new roman',12 style 'b'

DEFINE PAD p3 OF m PROMPT 'EVIDENTA GARANTIE' at 11,70 color scheme 1 font 'times new roman',12 style 'b'

DEFINE PAD p4 OF m PROMPT 'STOC NECESAR' at 14,105 color scheme 1 font 'times new roman',12 style 'b'

DEFINE PAD p5 OF m PROMPT 'IESIRE' at 17,135 color scheme 1 font 'times new roman',12 style 'b'

DEFINE POPUP pp1 from 9,5 color scheme 1 font 'times new roman' style 'b'

DEFINE POPUP pp2 FROM 13,26 color scheme 1 font 'times new roman' style 'b'

DEFINE POPUP pp3 FROM 17,53 color scheme 1 font 'times new roman' style 'b'

DEFINE POPUP pp4 FROM 21,79 color scheme 1 font 'times new roman' style 'b'

DEFINE POPUP pp5 FROM 25,102 color scheme 1 font 'times new roman' style 'b'

DEFINE POPUP pp6 FROM 5,25 color scheme 1 font 'times new roman' style 'b'

DEFINE POPUP pp7 FROM 2,25 color scheme 1 font 'times new roman' style 'b'

DEFINE BAR 1 OF pp1 PROMPT 'adaugare'

DEFINE BAR 2 OF pp1 PROMPT 'listare ordonata'

DEFINE BAR 3 OF pp1 PROMPT 'stergere'

DEFINE BAR 4 OF pp1 PROMPT 'actualizare'

DEFINE BAR 5 OF pp1 PROMPT 'cautare'

DEFINE BAR 6 OF pp1 PROMPT 'primiri(zi)'

DEFINE BAR 7 OF pp1 PROMPT 'primiri(perioada)'

DEFINE BAR 8 OF pp1 PROMPT 'pret maxim'

DEFINE BAR 9 OF pp1 PROMPT 'pret minim'

DEFINE BAR 10 OF pp1 PROMPT 'produse returnate'

DEFINE BAR 11 OF pp1 PROMPT 'produse nereturnate'

DEFINE BAR 1 OF pp2 PROMPT 'adaugare'

DEFINE BAR 2 OF pp2 PROMPT 'listare'

DEFINE BAR 3 OF pp2 PROMPT 'stergere'

DEFINE BAR 4 OF pp2 PROMPT 'cautare'

DEFINE BAR 5 OF pp2 PROMPT 'vanzari/zi'

DEFINE BAR 6 OF pp2 PROMPT 'vanzari/perioada'

DEFINE BAR 1 OF pp3 PROMPT '0-12 luni'

DEFINE BAR 2 OF pp3 PROMPT '12-24 luni'

DEFINE BAR 3 OF pp3 PROMPT 'peste 24 luni'

DEFINE BAR 4 OF pp3 PROMPT 'iesite din garantie'

DEFINE BAR 5 OF pp3 PROMPT 'cautare'

DEFINE BAR 1 OF pp4 PROMPT 'adaugare'

DEFINE BAR 2 OF pp4 PROMPT 'listare'

DEFINE BAR 3 OF pp4 PROMPT 'stergere'

DEFINE BAR 4 OF pp4 PROMPT 'cautare'

DEFINE BAR 1 OF pp5 PROMPT 'iesire in windows'

DEFINE BAR 2 OF pp5 PROMPT 'iesire in fox'

DEFINE BAR 1 OF pp6 PROMPT 'dupa nume'

DEFINE BAR 2 OF pp6 PROMPT 'dupa pret'

DEFINE BAR 3 OF pp6 PROMPT 'dupa garantie'

DEFINE BAR 1 OF pp7 PROMPT 'dupa nume'

DEFINE BAR 2 OF pp7 PROMPT 'dupa pret'

DEFINE BAR 3 OF pp7 PROMPT 'dupa garantie'

ON SELECTION PAD p1 OF m ACTIVATE POPUP pp1

ON SELECTION PAD p2 OF m ACTIVATE POPUP pp2

ON SELECTION PAD p3 OF m ACTIVATE POPUP pp3

ON SELECTION PAD p4 OF m ACTIVATE POPUP pp4

ON SELECTION PAD p5 OF m ACTIVATE POPUP pp5

ON SELECTION POPUP pp1 DO proc1

ON SELECTION POPUP pp2 DO proc2

ON SELECTION POPUP pp3 DO proc3

ON SELECTION POPUP pp4 DO proc4

ON SELECTION POPUP pp5 DO proc5

ON SELECTION POPUP pp6 DO proc6

ON SELECTION POPUP pp7 DO proc7

ACTIVATE MENU m

PROCEDURE proc1

DO CASE

CASE BAR()=1

DO adaugare

CASE BAR()=2

ACTI POPUP pp7

CASE BAR()=3

DO stergere

CASE BAR()=4

DO actualizare

CASE BAR()=5

ACTI POPUP pp6

CASE BAR()=6

DO primiri_zi

CASE BAR()=7

DO primiri_perioada

CASE BAR()=8

DO pret_maxim

CASE BAR()=9

DO pret_minim

CASE BAR()=10

DO returnate

CASE BAR()=11

DO nereturnate

ENDCASE

RETURN

PROCEDURE proc2

DO CASE

CASE BAR()=1

DO adaugarev

CASE BAR()=2

DO listarev

CASE BAR()=3

DO stergerev

CASE BAR()=4

DO cautarev

CASE BAR()=5

DO vanzari_zi

CASE BAR()=6

DO vanzari_perioada

ENDCASE

RETURN

PROCEDURE proc3

DO CASE

CASE BAR()=1

DO 0_12_luni

CASE BAR()=2

DO 12_24_luni

CASE BAR()=3

DO peste_24_luni

CASE BAR()=4

DO iesite_din_garantie

CASE BAR()=5

DO cautare_gar

ENDCASE

RETURN

PROCEDURE proc4

DO CASE

CASE BAR()=1

DO adaugaren

CASE BAR()=2

DO listaren

CASE BAR()=3

DO stergeren

CASE BAR()=4

DO cautaren

ENDCASE

RETURN

PROCEDURE proc5

DO CASE

CASE BAR()=1

DO ies_wind

CASE BAR()=2

DO ies_fox

ENDCASE

RETURN

PROCEDURE proc6

DO CASE

CASE BAR()=1

DO dupa_nume

CASE BAR()=2

DO dupa_pret

CASE BAR()=3

DO dupa_garantie

ENDCASE

RETURN

PROCEDURE proc7

DO CASE

CASE BAR()=1

DO listaredn

CASE BAR()=2

DO listaredp

CASE BAR()=3

DO listaredg

ENDCASE

RETURN

PROCEDURE adaugare

CLOSE DATABASES

USE stoc

STORE SPACE(20) TO nume

STORE TO D

STORE 0 TO pr,GR

STORE .F. TO ret

ACTI WIND f2

SAY 'dati numele produsului' GET nume function'!' valid(not empty (nume))

SAY 'dati pretul' GET pr RANGE 1,

SAY 'dati garantia(luni)' GET GR

SAY 'dati data primirii' GET D

SAY 'returnat(true/false)' GET ret function'!'

READ

APPEND BLANK

REPLACE numeprodus WITH nume, pret WITH pr, garantie WITH GR,;

datprimire WITH D, returnat WITH ret

CLEAR

DEAC WIND f2

RETURN

PROCEDURE listaredn

CLOSE DATABASES

USE stoc

ACTI WIND f3

CLEAR

INDEX ON numeprodus TAG N OF INDEX

SET ORDER TO N

GO TOP

DISPLAY ALL OFF

WAIT WIND

DEAC WIND f3

USE

RETURN

PROCEDURE listaredp

CLOSE DATABASES

USE stoc

ACTI WIND f3

CLEAR

INDEX ON pret TAG p OF INDEX

SET ORDER TO p

GO TOP

DISPLAY ALL OFF

WAIT WIND

DEAC WIND f3

USE

RETURN

PROCEDURE listaredg

CLOSE DATABASES

USE stoc

ACTI WIND f3

CLEAR

INDEX ON garantie TAG G OF INDEX

SET ORDER TO G

GO TOP

DISPLAY ALL OFF

WAIT WIND

DEAC WIND f3

USE

RETURN

PROCEDURE stergere

CLOSE DATABASES

USE stoc

STORE SPACE(20) TO nume

ACTI WIND f1

SAY 'dati numele produsului ce doriti sa-l stergeti' ;

GET nume FUNCTION '!' VALID(NOT EMPTY(nume))

READ

LOCATE FOR ALLTRIM(numeprodus)=ALLTRIM(nume)

IF FOUND()

DELETE

PACK

WAIT WIND 'inregistrarea a fost stearsa'

ELSE

WAIT WIND 'produsul nu exista'

ENDIF

DEAC WIND f1

RETURN

PROCEDURE actualizare

CLOSE DATABASES

USE stoc

STORE SPACE(15) TO numeprodus,num

STORE .F. TO ret

STORE 0 TO pr,GR

STORE TO D

ACTI WIND f3

@1,1 SAY 'ce produs doriti sa modificati?' GET num function'!'valid(not empty(num))

READ

GO TOP

ok='D'

op='D'

LOCATE FOR ALLTRIM(numeprodus)=ALLTRIM(num)

IF FOUND()

CLEAR

DISPLAY OFF

@4 SAY 'modificati(D/N)' GET ok picture'!'

READ

IF ok='D'

CLEAR

@3 SAY 'noile date'

@4 SAY 'nume produs' GET num FUNCTION '!'

@5 SAY 'pretul' GET pr

@6 SAY 'garantie' GET GR

@7 SAY 'data primirii' GET D

@8 SAY 'returnat' GET ret

READ

@9 SAY 'datele sunt corecte?(D/N)' GET op picture'!' default 'N'

READ

IF op='D'

REPLACE numeprodus WITH num,pret WITH pr,garantie WITH GR,datprimire WITH D,returnat WITH ret

WAIT WIND 's-a modificat'

ELSE

WAIT WIND 'nu se memoreaza modificarile'

ENDIF

ELSE

WAIT WIND 'apasati o tasta'

ENDIF

ELSE

WAIT WIND 'produsul nu exista in baza de date'

ENDIF

DEAC WIND f3

RELEASE ALL

RETURN

PROCEDURE dupa_nume

CLOSE DATABASES

USE stoc

ACTI WIND f1

STORE SPACE(10) TO num

SAY 'dati numele produsului cautat:' GET num function'!'valid(not empty(num))

READ

GO TOP

LIST FOR ALLTRIM(numeprodus)=ALLTRIM(num) OFF

WAIT WIND 'apasati orice tasta'

CLEAR

DEAC WIND f1

USE

RETURN

PROCEDURE dupa_pret

USE stoc

ACTI WIND f1

STORE 0 TO p

SAY 'dati pretul produsului cautat:' GET p VALID(NOT EMPTY(p))

READ

GO TOP

LIST FOR pret=p OFF

WAIT WIND 'apasati orice tasta'

CLEAR

DEAC WIND f1

RETURN

PROCEDURE dupa_garantie

CLOSE DATABASES

USE stoc

ACTI WIND f1

STORE 0 TO G

SAY 'dati garntia produsului cautat(in luni):' GET G VALID(NOT EMPTY(G))

READ

GO TOP

LIST FOR garantie=G OFF

WAIT WIND 'apasati orice tasta'

CLEAR

DEAC WIND f1

USE

RETURN

PROCEDURE primiri_zi

CLOSE DATABASES

USE stoc

STORE TO D

ACTI WIND f1

SAY 'DATI DATA IN CARE DORITI SA VADETI CE S-A PRIMIT';

GET D VALID(NOT EMPTY(D))

READ

GO TOP

SCAN

IF datprimire=D

LIST FOR datprimire=D OFF

WAIT wind'apasati o tasta'

ELSE

WAIT WIND 'apasati o tasta'

ENDIF

ENDSCAN

DEAC WIND f1

RETURN

PROCEDURE primiri_perioada

CLOSE DATABASES

USE stoc

STORE TO d1,d2

ACTI WIND f3

CLEAR

say'dati DATA 1' GET d1 VALID(NOT EMPTY(d1))

SAY 'dati data 2' GET d2 VALID(NOT EMPTY(d2))

READ

SCAN

IF datprimire>=d1 .AND. datprimire<=d2

LIST FOR datprimire>=d1 .AND. datprimire<=d2 OFF

WAIT wind'apasati o tasta'

ELSE

WAIT wind'nu exista produse primite IN aceasta perioada'

ENDIF

ENDSCAN

DEAC WIND f3

RETURN

PROCEDURE pret_maxim

CLOSE DATABASES

USE stoc

STORE 0 TO MAX

GO TOP

SCAN

IF pret>MAX

MAX=pret

ENDIF

ENDSCAN

ACTI WIND f1

CLEAR

?'PRODUSUL CU PRETUL MAXIM ESTE'

LIST FOR pret=MAX OFF

WAIT WIND 'apasati orice tasta pt a iesi'

DEAC WIND f1

RETURN

PROCEDURE pret_minim

CLOSE DATABASES

USE stoc

STORE 10000000000 TO MIN

ACTIVATE WINDOW f1

CLEAR

GO TOP

SCAN

IF pret<MIN

MIN=pret

ENDIF

ENDSCAN

?'PRODUSUL CU PRETUL MINIM ESTE'

LIST FOR pret=MIN OFF

WAIT WIND 'apasati orice tasta pt a iesi'

DEAC WIND f1

RETURN

PROCEDURE returnate

CLOSE DATABASES

USE stoc

ACTI WIND f3

CLEAR

GO TOP

LIST FOR returnat=.T. OFF

WAIT wind'apasati o tasta'

DEAC WIND f3

RETURN

PROCEDURE nereturnate

CLOSE DATABASES

USE stoc

ACTI WIND f3

CLEAR

GO TOP

LIST FOR returnat=.F. OFF

WAIT wind'apasati o tasta'

DEAC WIND f3

RETURN

PROCEDURE adaugarev

CLOSE DATABASES

USE vanzari IN A

USE stoc IN B

USE necesar IN C

STORE SPACE(20) TO num

STORE TO D,exp_gar

STORE 0 TO GR,G,p

ACTI WIND f1

SAY 'dati numele produsului' GET num function'!'

READ

SELE 2

LOCATE FOR ALLTRIM(numeprodus)=ALLTRIM(num)

G=garantie

p=pret

IF FOUND()

@2 SAY 'dati data vanzarii' GET D

READ

LIST FOR numeprodus=num OFF

DELETE FOR numeprodus=num

PACK

exp_gar=GOMONTH(D,G)

GR=VAL(STR(exp_gar-DATE()))/30

SELE 1

APPEND BLANK

REPLACE numeprodus WITH num, gar_ramasa WITH GR,datvanzare WITH D,;

garantie WITH G,pret WITH p

WAIT WIND 'produsul a fost vandut'

ELSE

CLEAR

SELE 3

APPEND BLANK

REPLACE numeprodus WITH num

WAIT WIND 'produsul nu se afla in stoc a fost trecut la necesar '

ENDIF

DEAC WIND f1

USE

RETURN

PROCEDURE listarev

CLOSE DATABASES

USE vanzari

ACTI WIND f3

CLEAR

GO BOTTOM

N=RECNO( )

FOR i=1 TO N

GOTO i

GR=VAL(STR(GOMONTH(datvanzare,garantie)-DATE()))/30

REPLACE gar_ramasa WITH GR

ENDFOR

INDEX ON numeprodus TAG nv OF INDEX

SET ORDER TO nv

DISPLAY ALL OFF

WAIT WIND

DEAC WIND f3

USE

RETURN

PROCEDURE stergerev

CLOSE DATABASES

USE vanzari

STORE SPACE(20) TO nume

ACTI WIND f1

@1,1 SAY 'dati numele produsului ce doriti sa-l stergeti' ;

GET nume FUNCTION '!' VALID(NOT EMPTY(nume))

READ

LOCATE FOR ALLTRIM(numeprodus)=ALLTRIM(nume)

IF FOUND()

DISPLAY OFF

DELETE

PACK

WAIT WIND 'inregistrarea a fost stearsa'

ELSE

WAIT WIND 'produsul nu exista'

ENDIF

DEAC WIND f1

RETURN

PROCEDURE cautarev

CLOSE DATABASES

USE vanzari

ACTI WIND f1

STORE SPACE(10) TO num

SAY 'dati numele produsului cautat:' GET num function'!'valid(not empty(num))

READ

GO TOP

LIST FOR ALLTRIM(numeprodus)=ALLTRIM(num) OFF

WAIT WIND 'apasati orice tasta'

CLEAR

DEAC WIND f1

USE

RETURN

PROCEDURE vanzari_zi

CLOSE DATABASES

USE vanzari

STORE TO D

ACTI WIND f1

SAY 'DATI DATA IN CARE DORITI SA VEDETI VANZARILE' GET D

READ

GO TOP

SCAN

IF datvanzare=D

LIST FOR datvanzare=D OFF

ENDIF

ENDSCAN

WAIT WIND 'apasati o tasta'

DEAC WIND f1

RETURN

PROCEDURE vanzari_perioada

CLOSE DATABASES

USE vanzari

STORE TO d1,d2

ACTI WIND f1

say'DATI DATA 1' GET d1

say'DATI DATA 2' GET d2

READ

LIST FOR (datvanzare>=d1) .AND. (datvanzare<=d2) OFF

WAIT WIND 'apasati o tasta'

DEAC WIND f1

RETURN

PROCEDURE 0_12_luni

CLOSE DATABASES

USE vanzari

ACTI WIND f1

CLEAR

N=RECNO( )

FOR i=1 TO N

GOTO i

GR=VAL(STR(GOMONTH(datvanzare,garantie)-DATE()))/30

REPLACE gar_ramasa WITH GR

ENDFOR

LIST FOR (gar_ramasa>0) .AND. (gar_ramasa<=12) OFF

WAIT WIND 'apasati o tasta'

DEAC WIND f1

RETURN

PROCEDURE 12_24_luni

CLOSE DATABASES

USE vanzari

ACTI WIND f1

CLEAR

N=RECNO( )

FOR i=1 TO N

GOTO i

GR=VAL(STR(GOMONTH(datvanzare,garantie)-DATE()))/30

REPLACE gar_ramasa WITH GR

ENDFOR

LIST FOR (gar_ramasa>12) .AND. (gar_ramasa<=24) OFF

WAIT WIND 'apasati o tasta'

DEAC WIND f1

RETURN

PROCEDURE peste_24_luni

USE

USE vanzari

ACTI WIND f1

CLEAR

N=RECNO( )

FOR i=1 TO N

GOTO i

GR=VAL(STR(GOMONTH(datvanzare,garantie)-DATE()))/30

REPLACE gar_ramasa WITH GR

ENDFOR

LIST FOR (gar_ramasa>24)

WAIT WIND 'apasati o tasta'

DEAC WIND f1

RETURN

PROCEDURE iesite_din_gar

USE

USE vanzari

ACTI WIND f1

CLEAR

CLEAR

N=RECNO( )

FOR i=1 TO N

GOTO i

GR=VAL(STR(GOMONTH(datvanzare,garantie)-DATE()))/30

REPLACE gar_ramasa WITH GR

ENDFOR

LIST FOR (gar_ramasa<=0) OFF

WAIT WIND 'apasati o tasta'

DEAC WIND f1

RETURN

PROCEDURE cautare_gar

CLOSE DATABASES

USE vanzari

ACTI WIND f1

CLEAR

STORE 0 TO G

SAY 'dati garantia ramasa a produsului cautat:' GET G VALID(NOT EMPTY(G))

READ

GO TOP

LIST FOR gar_ramasa=G OFF

WAIT WIND 'apasati orice tasta'

CLEAR

DEAC WIND f1

USE

RETURN

PROCEDURE adaugaren

CLOSE DATABASES

USE necesar

STORE SPACE(20) TO nume

ACTI WIND f2

SAY 'dati numele produsului' GET nume function'!' valid (not empty(nume))

READ

APPEND BLANK

REPLACE numeprodus WITH nume

CLEAR

DEAC WIND f2

RETURN

PROCEDURE listaren

CLOSE DATABASES

USE necesar

ACTI WIND f3

CLEAR

INDEX ON numeprodus TAG nn OF indexn

SET ORDER TO nn

GO TOP

DISPLAY ALL OFF

WAIT WIND 'apasati o tasta'

DEAC WIND f3

USE

RETURN

PROCEDURE stergeren

CLOSE DATABASES

USE necesar

STORE SPACE(20) TO nume

ACTI WIND f1

SAY 'dati numele produsului ce doriti sa-l stergeti' ;

GET nume FUNCTION '!'VALID(NOT EMPTY(nume))

READ

LOCATE FOR ALLTRIM(numeprodus)=ALLTRIM(nume)

IF FOUND()

DISPLAY OFF

DELETE

PACK

WAIT WIND 'inregistrarea A fost stearsa'

ELSE

WAIT wind'produsul nu exista'

ENDIF

DEAC WIND f1

RETURN

PROCEDURE cautaren

CLOSE DATABASES

USE necesar

ACTI WIND f1

STORE SPACE(10) TO num

SAY 'dati numele produsului cautat:' GET num function'!'valid(not empty(num))

READ

GO TOP

LIST FOR ALLTRIM(numeprodus)=ALLTRIM(num) OFF

WAIT WIND 'apasati orice tasta'

CLEAR

DEAC WIND f1

USE

RETURN

PROCEDURE ies_fox

DEAC WIND F

DEAC MENU m

RETURN

PROCEDURE ies_wind

QUIT

RETURN





Politica de confidentialitate





Copyright © 2024 - Toate drepturile rezervate