Sunteți pe pagina 1din 26

APLICATIE PRIVIND INCHIRIEREA DE CASETE VIDEO

1. Tema de realizare. Tema de realizare a proiectului consta in realizarea si implementarea unei aplicatii care realizeaza gestiunea activitatii de inchiriere casete video la o societate comerciala de profil. Aplicatia trebuie sa permita: a) monitorizarea activitatilor de baza ale firmei, cum ar fi imprumutul respectiv restituirea de casete video; b) afisarea de rapoarte cu privire la clientii restanti, la toti clientii firmei, la casetele disponibile; c) realizarea de cautari in tabelele bazei de date, dupa anumite caracteristici, pentru un anumit film, client, regizor, etc. d) stergerea, respectiv adaugarea de clienti, casete, actori, filme, etc. in tabelele bazei de date; 2. Proiectarea iesirilor. Asa dupa cum s-a aratat mai sus, iesirile aplicatiei sunt urmatoarele: a) valoarea contractelor de inchiriere pe zile si pe total; Macheta de iesire este urmatoarea: Data contract Total valoare contracte la data $$%$$%$$$$ Total valoare contracte la data curenta &$$%$$%$$$$) b) toate contractele firmei Macheta de iesire este urmatoarea: Data '( r.caseta Data restituirii "erioada r. caseta !erie buletin ume "renume #aloare

3. Proiectarea i trarilor. (ntrarile aplicatiei sunt corespondente urmatoarelor situatii:

a) imprumut de caseta b) restituire de caseta c) introducerea unui actor in baza de date d) stergerea unui actor din baza de date e) introducerea unei noi casete in baza de date f) stergerea unei casete din baza de date g) cautarea unor casete dupa regizor, actori, etc. h) adaugarea unui nou client in baza de date i) stergerea unui client din baza de date )) cautarea unui client in baza de date *) modificarea caracteristicilor unui client &e+. adresa); l) modificarea caracteristicilor unui actor !. Proiectarea "azei de date !e va porni de la modelul entitate-asociere, figurand in mod distinct in schema fiecare entitate, precum si relatiile ce e+ista intre entitati:

ACTORI

(1,1)

JOACA

PERSOANE

FILME

(1,n)

(0,m )

INCHIRIAZA

(1,n )

Atributele entitatilor in situatia de mai sus vor fi: 2

,) "-.!/A '(: caracter&0); ume: caracter&12); "renume: caracter&12); nrcas: numeric&4); nume actor: caracter&12); prenume actor: caracter&12); r. caseta: numeric&4); Titlu original: caracter&52); Titlu roman: caracter&52); ume regizor: caracter&52); An aparitie: numeric&4); !tare &e+istenta sau ine+istenta in gestiune): boolean;

1) A3T/.( 5) 6(7M-

Datorita faptului ca in diagrama de mai sus e+ista o legatura de tip 8multi la multi8, se va folosi in plus o tabela intermediara: 4) (M". Data: data; '(: caracter&0); r. caseta: numeric&4); Data restituirii: data; "erioada de inchiriere: numeric&,); acest camp s-a introdus pentru micsorarea timpului de realizare a situatiilor finale, in detrimentul spatiului de stocare folosit, folosind astfel o redundanta controlata a datelor;

.ezulta deci ca structura conceptuala a bazei de date este: "-.!/A '( 6(7M.3A! T(T/ T(T. 9M-. A A" !TA.9M".-

A3T/.( .3A! (M". DATA '( .3A! DATA.-! "-.(/ADA 9M-A3T ".- A3T

6olosind tehnica normalizarii, se va aduce baza de date in 6 5. !e observa ca baza de date se afla de)a in forma normala 5, deci structura conceptuala va ramane identica cu cea de mai sus. !-a considerat ca nu este ncesara o forma normala superioara, deoarece actualizarea bazei de date se face la un interval de timp destul de mare, deci cu o frecventa redusa. "entru a asigura un compromis intre redundanta datelor si timpul de acces, s-a introdus in tabela ( T. si campul "-.(/ADA, camp ce memoreaza durata de timp pe care este imprumutata o caseta. Astfel, creste dimensiunea bazei de date, dar situatiile operative, care sunt solicitate relativ des, sunt furnizate cu o viteza sporita. #. Sc$ema de str%ct%ra a a&licatiei. Aceasta schema reprezinta :viziunea: pe care fiecare subrutina a programului o are asupra bazei de date, intelegand prin aceasta specificarea tabelelor pe care le poate accesa fiecare aplicatie. Astfel, de e+emplu, pentru operatiile de adaugare, stergere, modificare, programul va avea acces la tabelele specifice operatiei respective &stergere caseta --; filme, stergere client --; persoane, etc.). "entru realizarea rapoartelor, programul va avea acces la toate tabelele bazei de date.

'. Listi ()%l a&licatiei. 4

close all clear set talk off set status off set safety off set date to dmy set procedure to r.prg use impr in a index on bi tag tbi index on data tag tdata index on nrcas tag tnrcas index on bi+str(nrcas,4) tag tcp use pers in b select pers index on bi tag tbi use filme in c select filme index on nrcas tag tnrcas index on anap tag tan index on reg tag treg use actori in d select actori index on nrcas tag tnrcas index on upper(nact+pact) tag tnp use imprint in e define window f from 1,0 to 24, ! public pubpret,pubpen pubpret"1000 pubpen"1#00 define define define define define define on pad on pad on pad on pad on pad menu meniu pad p1 of meniu prompt $%&operatii$ key alt+o pad p2 of meniu prompt $%&ba'edate$ key alt+b pad p( of meniu prompt $%&rapoarte$ key alt+r pad p4 of meniu prompt $%&setup$ key alt+s pad p# of meniu prompt $%&iesire$ key alt+i p1 of meniu acti)ate popup pp1 p2 of meniu acti)ate popup pp2 p( of meniu acti)ate popup pp( p4 of meniu acti)ate popup pp4 p# of meniu acti)ate popup pp#

define popup pp4 define bar 1 of pp4 prompt $%&preturi$ define bar 2 of pp4 prompt $p%&rinter$ define popup define bar 1 define bar 2 on selection on selection define define define define define on bar on bar on bar pp1 of pp1 prompt $%&imprumut$ of pp1 prompt $%&restituire$ bar 1 of pp1 do ada1 bar 2 of pp1 do del1

popup pp2 bar 1 of pp2 prompt $%&imprumuturi$ bar 2 of pp2 prompt $%&persoane$ bar ( of pp2 prompt $%&filme$ bar 4 of pp2 prompt $%&actori$ 1 of pp2 acti)ate popup ppp1 2 of pp2 acti)ate popup ppp2 ( of pp2 acti)ate popup ppp(

on bar 4 of pp2 define popup define bar 1 define bar 2 on selection on selection define popup define bar 1 define bar 2 on selection on selection define popup define bar 1 define bar 2 define bar ( on selection on selection on selection define popup define bar 1 define bar 2 define bar ( on selection on selection on selection define define define define on bar on bar on bar

acti)ate popup ppp4 ppp1 of ppp1 prompt $%&modificare$ of ppp1 prompt $%&stergere$ bar 1 of ppp1 do modi bar 2 of ppp1 do deli ppp2 of ppp2 prompt $%&modificare$ of ppp2 prompt $%&stergere$ bar 1 of ppp2 do modp bar 2 of ppp2 do delp ppp( of ppp( prompt $%&adaugare$ of ppp( prompt $%&modificare$ of ppp( prompt $%&stergere$ bar 1 of ppp( do adaf bar 2 of ppp( do modf bar ( of ppp( do delf ppp4 of ppp4 prompt $%&adaugare$ of ppp4 prompt $%&modificare$ of ppp4 prompt $%&stergere$ bar 1 of ppp4 do adaa bar 2 of ppp4 do moda bar ( of ppp4 do dela

popup pp( bar 1 of pp( prompt $con%&tractele...$ bar 2 of pp( prompt $%&clienti...$ bar ( of pp( prompt $%&filmele...$ 1 of pp( acti)ate popup pp(1 2 of pp( acti)ate popup pp(2 ( of pp( acti)ate popup pp(( define popup pp(2 define bar 1 of pp(2 prompt $...%&restantieri$ define bar 2 of pp(2 prompt $...%&total$ on selection bar 1 of pp(2 * 20,1 say $rest$ on selection bar 2 of pp(2 do liscl define popup pp(1 define bar 1 of pp(1 prompt $...%&total$ define bar 2 of pp(1 prompt $...dintr+o anumita %&perioada$ define bar ( of pp(1 prompt $...%&grupate pe 'ile$ on selection bar 1 of pp(1 do lisc on selection bar 2 of pp(1 * 20,1 say $cont per$ on selection bar ( of pp(1 do rgrr define popup pp(( define bar 1 of pp(( prompt $...de un anumit %&regi'or$ define bar 2 of pp(( prompt $...cu un anumit %&actor$ define bar ( of pp(( prompt $...dintr+un anumit a%&n$ define bar 4 of pp(( prompt $...%&total$ define bar # of pp(( prompt $...%&disponibile$ on selection bar 1 of pp(( do lisr on selection bar 2 of pp(( do lisa on selection bar ( of pp(( do lisan on selection bar 4 of pp(( do lisf on selection bar # of pp(( do lisd define popup pp# define bar 1 of pp# prompt $in %&fox$ define bar 2 of pp# prompt $in %&dos$ on selection bar 1 of pp# return on selection bar 2 of pp# ,uit

acti)ate menu meniu clear -close all return procedure lisc acti)ate window f select impr display all wait deacti)ate window f return procedure liscl acti)ate window f select pers display all wait deacti)ate window f return procedure rgrr acti)ate window f select impr set order to tag tdata report form rgr wait deacti)ate window f return ---------------------------------------------------po.prg procedure afis public i clear * 1,1 say $../. 01 ..2.3.$ * (,20 say $45.6 57821719 $ * #,# say $inc:eiata la data de $ get mdata * ;,2 say $nume $ get mnume picture $*<a$ * ;,2# say $prenume $ get mpren picture $*<a$ * ,2 say $serie buletin $ get mbi picture $aa!!!!!!$ = )alid dupbi() error $are casete nerestituite$ * ,(0 say $numar casete imprumutate > $ get nrc picture $!$ range 1,# = error $maxim # casete $ read * ?,# to 10+nrc,2# double * !, say $nrcaseta---durata$ for i"1 to nrc mnrc"0 * !+i, say str(i,1)+$>$ get mnrc picture $!!!!$ = )alid dupnrc() and exf() and dupcp()= error $caseta de@a imprumutata,caseta inexistenta sau cp duplicat$ * !+i,20 get mperAiB picture $!$ range 1,# read mnrcasAiB"mnrc endfor * 1;,# to 1?,4# double a"1 * 1 ,1# get a function $-:t %<%&sa)e=%&nosa)e$ si'e 1,4,1 return

function dupcp set order to tag tcp )b"not(seek(mbi+str(mnrc,4))) return )b function exf select filme set order to tag tnrcas )b"seek(mnrc) select impr return )b function dupnrc set order to tag tnrcas )b"not(seek(mnrc)) return )b function dupbi set order to tag tbi nr"recno() )b".t. locate for bi"mbi do w:ile (not eof()) and )b".t. and found() -if found() if )al(sys(11,date()))+)al(sys(11,data))Cper )b".f. else continue endif -endif enddo go nr return )b procedure inito mdata"date() mnume"space(1#) mpren"space(1#) mbi"space(?) nrc"0 dimension mnrcasA#B,mperA#B for i"1 to # mnrcasAiB"0 mperAiB"0 endfor return procedure ada1 public mdata,mnume,mpren,mlocal = mbi,nrc,a,mnrc public array mnrcasA#B,mperA#B select impr acti)ate window f do w:ile .t. do inito do afis read if a"1 select pers seek mbi if not found()

append blank replace bi wit: mbi,nume wit: mnume,pren wit: mpren endif for i"1 to nrc select impr append blank replace nrcas wit: mnrcasAiB,data wit: mdata = per wit: mperAiB,bi wit: mbi select filme set order to tnrcas seek mnrcasAiB replace record recno() sit wit: .t. endfor endif * 1!,1 to 21, ! double ras"$d$ * 20,20 say $continuati(dDn) > $ get ras picture $a$ read * 20,2 clear to 21, ? if lower(ras)"$n$ exit endif enddo deacti)ate window f return procedure mo)e mdata"impr.data mbi"pers.bi mnume"pers.nume mpren"pers.pren mpr"impr.per return procedure del1 public mnrcs,mdata,mbi,mpr,mnume,mpren acti)ate window f rs"$d$ do w:ile lower(rs)"$d$ clear select impr mnrcs"0 mbi"space(?) * 1,10 say $35/E5F6206 578217191315$ * 2,# to ;,;0 double * (,; say $c:eia inregistrarii(serie buletin si numar caseta)$ * 4,; say $%%%%%(serie buletin) > $ get mbi * #,; say $%%%%%(numar caseta) > $get mnrcs picture $!!!!$ * 1!,1 to 21, ! double read cp"mbi+str(mnrcs,4) set order to tag tcp if seek(cp,$impr$) do mo)e do afisd * ?,#0 to 12, # double di")al(sys(11,mdata)) dr")al(sys(11,date())) if dr+diCmpr plata"mpr-pubpret pen"(dr+di+mpr)-pubpen

else

totp"plata+pen plata"mpr-pubpret totp"plata pen"0

endif * !,#1 say $/G.9 HG2763>$+str(plata) * 10,#1 say $80H635I625>$+str(pen) * 11,#1 say $9G963 83696>$+str(totp) * 1!,1 to 21, ! double ras"$d$ * 20,20 say $.0 20.959150(dDn) > $ get ras picture $a$ read * 20,2 clear to 20, ? if lower(ras)"$d$ select impr scatter mem)ar m.datares"date() select imprint append blank gat:er mem)ar select impr delete pack select filme set order to tnrcas seek mnrcs replace record recno() sit wit: .f. select impr else * 20,(0 say $5H20J5.92620 H0.9062.6$ K659 * 20,2 clear to 20, ! endif else * 20,(0 say $5H20J5.92620 H0J6.596$ wait * 20,1 clear to 20, ?

endif * 20,(0 say $continuati(dDn) > $ get rs picture $a$ read * 20,1 clear to 20, ? if lower(rs)"$n$ exit endif enddo deacti)ate window f return procedure afisd clear * 1,1 say $../. 01 ..2.3.$ * (,20 say $35/E5F620 57821719 $ * #,# say $inc:eiat la data de $+dtoc(mdata) * #,(# say $cu$ * ;,2 say $nume $ +mnume * ;,20 say $prenume $+mpren * ,2 say $serie buletin $+mbi * !,10 to 12,(0 double * 10,12 say $nrcaseta---durata$ * 11,12 say mnrcs picture $!!!!$

10

* 11,2# say mpr picture $!$ return ------------------------------------------------------pi.prg procedure modi public mnrcs,mpr acti)ate window f rs"$d$ do w:ile lower(rs)"$d$ clear select impr mnrcs"0 mbi"space(?) * 1,(0 say $7GF545/620 57821719$ * 2,# to ;,;0 double * (,; say $c:eia inregistrarii(serie buletin si numar caseta)$ * 4,; say $%%%%%(serie buletin) > $ get mbi picture $aa!!!!!!$ * #,; say $%%%%%(numar caseta) > $get mnrcs picture $!!!!$ read * 1!,1 to 21, ! double cp"mbi+str(mnrcs,4) set order to tag tcp if seek(cp,$impr$) scatter mem)ar clear * 1,1 say $../. 01 ..2.3.$ * (,20 say $45.6 57821719 $ * #,# say $inc:eiat la data de $ get m.data * #,40 say $cu persoana cu$ * ;,2 say $seria de buletin $ get m.bi picture $aa!!!!!!$ = )alid exbi() and m.bi&C$ $ = error $serie buletin existenta sau )aloare nula$ * !,# to 12,2# double * 10, say $nrcaseta---durata$ * 11, say $1>$ get m.nrcas picture $!!!!$ = )alid testnc() and dupcpm() and m.nrcas&C0 = error $c:eie principala duplicat$ * 11,20 get m.per picture $!$ range 1,# * 14,# to 1;,4# double a"1 * 1#,1# get a function $-:t %<%&sa)e=%&nosa)e$ si'e 1,4,1 * 1!,1 to 21, ! double read -ras"$d$ -* 20,20 say $sal)ati(dDn) > $ get ras picture $a$ -read if a"1 select impr gat:er mem)ar else * 20,20 say $5H20J5.92620 H0.63L696$ wait * 20,2 /3062 9G 20, ? endif else * 20,20 say $5H20J5.92620 H0J6.596$ wait * 20,2 clear to 20, ? endif * 1?,20 say $/GH95H1695(FDH) > $ get rs picture $a$ read

11

if lower(rs)"$n$ exit endif enddo deacti)ate window f return function exbi pri)ate auxbi nr"recno() auxbi"bi seek m.bi if found() and auxbi&Cbi )b".f. else select pers seek m.bi if found() replace bi wit: m.bi for bi"auxbi endif )b".t. endif select impr go nr return )b procedure afism clear * 1,1 say $../. 01 ..2.3.$ * (,20 say $45.6 57821719 $ * #,# say $inc:eiat la data de $ get m.data * #,40 say $cu persoana cu$ * ;,2 say $seria de buletin $ get m.bi picture $aa!!!!!!$ = )alid exbi() and m.bi&C$ $ = error $serie buletin existenta sau )aloare nula$ * !,# to 12,2# double * 10, say $nrcaseta---durata$ * 11, say $1>$ get m.nrcas picture $!!!!$ = )alid testnc() and dupcpm() and m.nrcas&C$ $ = error $c:eie principala duplicat$ * 11,20 get m.per picture $!$ range 1,# * 14,# to 1;,4# double a"1 * 1#,1# get a function $-:t %<%&sa)e=%&nosa)e$ si'e 1,4,1 * 1!,1 to 21, ! double return function testnc pri)ate nr,)b nr"recno() set order to tnrcas seek m.nrcas if found() and recno()&Cnr )b".f. else )b".t. endif go nr return )b

12

function dupcpm pri)ate nr nr"recno() set order to tag tcp seek m.bi+str(m.nrcas,4) if found() if recno()"nr )b".t. else )b".f. endif else )b".t. endif go nr return )b procedure deli public mnrcs acti)ate window f rs"$d$ do w:ile lower(rs)"$d$ clear select impr mnrcs"0 mbi"space(?) * 2,# to ;,;0 double * (,; say $c:eia inregistrarii(serie buletin si numar caseta)$ * 4,; say $%%%%%(serie buletin) > $ get mbi picture $aa!!!!!!$ * #,; say $%%%%%(numar caseta) > $get mnrcs picture $!!!!$ read * 1!,1 to 21, ! double cp"mbi+str(mnrcs,4) aux"order() set order to tag tcp if seek(cp,$impr$) scatter mem)ar clear * 1,1 say $../. 01 ..2.3.$ * (,20 say $45.6 57821719 $ * #,# say $inc:eiat la data de $+dtoc(m.data) * #,(# say $cu$ * ,2 say $serie buletin $+m.bi * !,20 to 12,40 double * 10,22 say $nrcaseta---durata$ * 11,22 say m.nrcas picture $!!!!$ * 11,(# say m.per picture $!$ * 14,# to 1;,4# double a"1 * 1#,1 get a function $-: %<%&dele=%&nodele$ si'e 1,4,# read * 1!,1 to 21, ! double -ras"$d$ -* 20,20 say $stergeti(dDn) > $ get ras picture $a$ -read if a"1 select impr delete pack

else

13

endif else

* 20,20 say $5H20J5.92620 H0.9062.6$ K659 * 20,2 clear to 20, ?

* 20,20 say $5H20J5.92620 H0J6.596$ wait * 20,2 clear to 20, ?

endif * 20,20 say $/GH95H1695(FDH)M>$ get rs picture $a$ read * 20,2 clear to 20, ! if lower(rs)"$n$ exit endif enddo deacti)ate window f return ----------------------------------------------------pp.prg procedure modp acti)ate window f select pers do w:ile .9. clear c:"space(?) * 1,2# to (,## double * 2,(0 say $serie buletin >$ get c: * 1!,1 to 21, ! double read seek c: if found() clear scatter mem)ar * 1,1 say $../. 01 ..2.3.$ * (,# to ,;# double * 4,(0 say $serie buletin >$ get m.bi = )alid m.bi&C$ $ and )bi() = error $serie buletin eronata$ * #,10 say $nume >$ get m.nume * ;,10 say $prenume >$ get m.pren * 1(,# to 1#,4# double a"$sa)e$ * 14,1 get a function $-: %<%&sa)e=%&nosa)e$ si'e 1,4,# read if a"$sa)e$ select impr seek pers.bi if found() replace bi wit: m.bi for bi"pers.bi endif select pers gat:er mem)ar else * 20,20 say $inregistrare nesal)ata$ wait * 20,2 clear to 20, ? endif else * 20,20 say $5H20J5.92620 H0J6.596$

14

r"$d$ * 20,20 say $continuati(dDn)M$ get r read * 20,2 /3062 9G 20, ? if r"$n$ exit endif enddo deacti)ate window f return function )bi nr"recno() seek m.bi if found() and recno()&Cnr )b".f. else -select impr -seek pers.bi -if found() replace bi wit: m.bi for bi"pers.bi -endif )b".t. endif go nr return )b procedure delp acti)ate window f select pers do w:ile .t. clear c:"space(?) * 1,2# to (,## double * 2,(0 say $serie buletin >$ get c: * 1!,1 to 21, ! double read seek c: if found() clear scatter mem)ar * 1,1 say $../. 01 ..2.3.$ * (,# to ,;# double * 4,(0 say $serie buletin >$+ upper(m.bi) * #,10 say $nume >$+upper(m.nume) * ;,10 say $prenume >$+upper(m.pren) * 1(,# to 1#,4# double a"1 * 14,1 get a function $-: %<%&dele=%&nodele$ si'e 1,4,# read if a"1 if cbi()".t. define window fer from #,10 to 20, 0 acti)ate window fer * ,1 say $022G2,/GH926/9 5H/E0569 /1 6/06.96 802.G6H6$ wait deacti)ate window fer

wait * 20,2 clear to 20, ? endif

15

release window fer -* 20,2 clear to 22, ? else endif else delete pack

* 20,20 say $inregistrare nestearsa$ wait * 20,2 clear to 20, ? endif else * 20,20 say $inregistrare negasita$ wait * 20,2 clear to 20, ? endif r"$d$ * 20,20 say $/GH95H1695(FDH)M$ get r read * 20,2 clear to 20, ? if r"$n$ exit endif enddo deacti)ate window f return function cbi select impr nr"recno() seek m.bi if found() )b".t. else )b".f. endif go nr select pers return )b ----------------------------------------------pf.prg procedure init mnrcas"0 mtito"space((0) mtitr"space((0) mreg"space((0) manap"0 msit".f. mnract"space(4) nac"0 dimension mnactA;B,mpactA;B for i"1 to ; mnact"space(20) mpact"space(20) endfor return procedure adaf public mnrcas,mtito,mtitr,mreg,manap,msit,mnract,mnact,mpact,nac acti)ate window f select filme

16

do w:ile .t. do init clear * 1,1 say $../. 01 ..2.3.$ * (,2 say $numar caseta > $ get mnrcas picture $!!!!$= )alid not seek(mnrcas) error $numar caseta in)alid$ * 4,2 say $titlu original > $ get mtito * #,2 say $titlu romanesc > $ get mtitr * #,#2 say $an aparitie>$ get manap picture $!!!!$= range 1!00,year(date()) * ;,2 say $regi'or >$ get mreg * ;,42 say $situatia(imprumutata+t,neimp+f)>$ get msit * ,10 say $numar actori care se introduc(maxim #)> $ get nac = range 1,# picture $!$ read * ?,# to 10+nac,#0 double * !,; say $nume actor$ * !,2 say $prenume actor$ for i"1 to nac * !+i,; get mnactAiB * !+i,2 get mpactAiB endfor * 1;,# to 1?,#0 double a"1 * 1 ,1 get a function $-: %<%&sa)e=%&nosa)e$ si'e 1,4,# * 1!,1 to 21, ! double read if a"1 select filme append blank replace nrcas wit: mnrcas,tito wit: mtito,titr wit: mtitr,reg wit: mreg = ,anap wit: manap,sit wit: msit for i"1 to nac select actori append blank replace nrcas wit: mnrcas,pact wit: mpactAiB,nact wit: mnactAiB endfor select filme else * 20,20 say $5H20J5.92620 H0.63L696$ wait * 20,2 /3062 9G 20, ? endif r"$d$ * 20,20 say $/GH95H1695(FDH)M$ get r read * 20,2 /3062 9G 20, ? if r"$n$ exit endif enddo deacti)ate window f return function dupnrcas nr"recno() )b"not(seek(mnrcas)) go nr return )b

17

procedure modf public mnrcas,b,a -set near on acti)ate window f do w:ile .t. clear mnrcas"0 * 2,# to #,;0 double * (,; say $c:eia inregistrarii$ * 4,; say $numar caseta > $ get mnrcas picture $!!!!$ * 1!,1 to 21, ! double read select filme set order to tnrcas seek mnrcas if found() scatter mem)ar clear * 1,1 say $../. 01 ..2.3.$ * (,# say $numar caseta > $ get m.nrcas = )alid m.nrcas&C0 and mdupnrc() = error $H1762 /6.096 0N5.90H9$ * 4,# say $titlu original > $ get m.tito * #,#0 say $an aparitie>$ get m.anap * #,# say $titlu romanesc > $ get m.titr * ;,# say $regi'or >$ get m.reg * ,# say $situatia(imprumutata+f,neimp+t) > $ get m.sit * 14,# 9G 1;,4# double a"$sa)e$ * 1#,1 get a function $-: %<%&sa)e=%&nosa)e$ si'e 1,4,# * 1!,1 to 21, ! double read if a"$sa)e$ select filme gat:er mem)ar select actori locate for nrcas"filme.nrcas if found() do w:ile not eof() replace nrcas wit: m.nrcas continue enddo endif else * 20,20 say $5H20J5.92620 H0.63L696$ wait * 20,2 /3062 9G 20, ? endif else * 20,20 say $5H20J5.92620 H0J6.596$ wait * 20,2 /3062 9G 20, ? endif r"$d$ * 20,20 say $/GH95H1695(FDH)M$ get r read * 20,2 /3062 9G 20, ? if r"$n$ exit

18

endif enddo deacti)ate window f return function mdupnrc pri)ate )b nr"recno() seek m.nrcas if found() and recno()&Cnr )b".f. else select actori set order to tnrcas seek filme.nrcas if found() replace nrcas wit: m.nrcas for nrcas"filme.nrcas endif )b".t. endif select filme go nr return )b procedure delf public mnrcas acti)ate window f do w:ile .t. clear select filme mnrcas"0 * 2,# to #,;0 double * (,; say $c:eia inregistrarii$ * 4,; say $numar caseta > $ get mnrcas picture $!!!!$ * 1!,1 to 21, ! double read select filme set order to tnrcas if seek(mnrcas) scatter mem)ar clear * 1,1 say $../. 01 ..2.3.$ * (,# say $numar caseta > $+str(m.nrcas,4) * 4,# say $titlu original > $+m.tito * #,#0 say $an aparitie>$ +str(m.anap,4) * #,# say $titlu romanesc > $+m.titr * ;,# say $regi'or >$ +m.reg * ,# say $situatia > $ if m.sit".f. * ,1; say $imprumutata$ else * ,1; say $neimprumutata$ endif * 14,# 9G 1;,4# FG1O30 a"1 * 1#,1 get a function $-: %<%&dele=%&nodele$ si'e 1,4,# * 1!,1 to 21, ! double read if a"1 select actori locate for nrcas"filme.nrcas

19

if found() do w:ile not eof() delete continue enddo endif pack select filme delete pack else * 20,20 say $5H20J5.92620 H0.9062.6$ wait * 20,2 /3062 9G 20, ?

endif else * 20,20 say $5H20J5.92620 H0J6.596$ wait endif r"$d$ * 20,20 say $/GH95H1695(FDH)M$ get r read * 20,2 /3062 9G 20, ? if r"$n$ exit endif enddo deacti)ate window f return --------------------------------------------------pa.prg procedure moda acti)ate window f select actori do w:ile .t. clear c:"0 * 1,(0 to (,#0 double * 2,(1 say $numar caseta >$ get c: picture $!!!!$ * 1!,1 to 21, ! double read set order to tag tnrcas locate for nrcas"c: if found() ras"$d$ do w:ile not eof() and lower(ras)"$d$ clear scatter mem)ar * 1,1 say $../. 01 ..2.3.$ * (,# to ?,;# double * 4,(0 say $numar caseta >$ get m.nrcas picture $!!!!$ * ;,10 say $nume actor >$ get m.nact * ,10 say $prenume actor >$ get m.pact * 14,0# to 1;,4# double a"$sa)e$ * 1#,1; get a function $-: %<%&sa)e=%&nosa)e$ si'e 1,4,# * 1!,1 to 21, ! double read if a"$sa)e$ gat:er mem)ar else

20

endif

* 20,20 say $5H20J5.92620 H0.63L696$ wait * 20,2 /3062 9G 20, ?

r"$d$ * 20,20 say $/GH95H1695(FDH)M$ get r read * 20,2 /3062 9G 20, ? if lower(r)"$n$ exit endif enddo deacti)ate window f return

* 20,2 clear to 20, ? * 20,( say = $FG2595 J6.5206 12769G6205 5H20J5.92625 /1 6/036.5 H2/6.$ = get ras read * 20,2 /3062 9G 20, ? if ras"$d$ continue endif enddo else * 20,20 say $5H20J5.92620 H0J6.596$ K659 * 20,2 /3062 9G 20, ? endif

procedure adaa acti)ate window f select actori do w:ile .t. clear scatter mem)ar blank * 1,1 say $../. 01 ..2.3.$ * (,# to ?,;# double * 4,(0 say $numar caseta >$ get m.nrcas picture $!!!!$= )alid seek(m.nrcas,$filme$) = error $H1762 /6.096 5H0N5.90H9 5H 45370.FO4$ * ;,10 say $nume actor >$ get m.nact * ,10 say $prenume actor >$ get m.pact * 14,# to 1;,4# double a"1 * 1#,1 get a function $-: %<%&sa)e=%&nosa)e$ si'e 1,4,# * 1!,1 to 21, ! double read if a"1 append blank gat:er mem)ar else * 20,20 say $5H20J5.92620 H0.63L696$ wait * 20,2 /3062 9G 20, ? endif r"$d$ * 20,20 say $/GH95H1695(FDH)M$ get r read * 20,2 /3062 9G 20, ? if r"$n$

21

exit endif enddo deacti)ate window f return function exnrc pri)ate )b nr"recno() select filme set order to tnrcas seek m.nrcas if found() )b".t. else )b".f. endif select actori go nr return )b procedure dela acti)ate window f select actori do w:ile .t. clear c:"0 * 1,(0 to (,#0 double * 2,(1 say $numar caseta >$ get c: picture $!!!!$ * 1!,1 to 21, ! double read set order to tag tnrcas locate for nrcas"c: if found() ras"$d$ do w:ile not eof() and lower(ras)"$d$ clear scatter mem)ar * 1,1 say $../. 01 ..2.3.$ * (,# to ?,;# double * 4,(0 say $numar caseta >$+str(m.nrcas,4) picture $!!!!$ * ;,10 say $nume actor >$ +m.nact * ,10 say $prenume actor >$ +m.pact * 14,# to 1;,4# double a"$dele$ * 1#,1 get a function $-: %<%&dele=%&nodele$ si'e 1,4,# * 1!,1 to 21, ! double read if a"$dele$ delete pack else * 20,20 say $5H20J5.92620 H0.9062.6$ wait * 20,2 /3062 9G 20, ? endif * 20,2 clear to 20, ? * 20,( say = $FG2595 J6.5206 12769G6205 5H20J5.92625 /1 6/036.5 H2/6.$ = get ras

22

enddo else

read * 20,2 /3062 9G 20, ! if ras"$d$ continue endif

r"$d$ * 20,20 say $/GH95H1695(FDH)M$ get r read * 20,2 /3062 9G 20, ? if lower(r)"$n$ exit endif enddo deacti)ate window f return procedure lisf acti)ate window f select filme set order to tnrcas * 1,1 say $sc eu srl$ * 2,(0 say $filme gestionate$ * row()+2,1 say replicate($+$, 4) * row()+1,1 say $nr$ * row(), say $denumire$ * row(),(! say $regi'or$ * row(), 1 say $an$ * row()+1,1 say $cas$ * row(), say $film$ * row()+1,1 say replicate($+$ , 4) * row()+1,1 scan * row(),1 say nrcas * row(), say titr * row(),(! say reg * row(), 1 say anap * row()+1,1 if row()"20 wait * ?,1 clear to 21,?0 * ?,1 endif endscan * row()+1,1 say replicate($+$ , 4) wait deacti)ate window f return procedure lisd acti)ate window f select filme set order to tag tnrcas * 1,1 say $sc eu srl$ * 2,(0 say $filme disponibile$

* 20,20 say $5H20J5.92620 H0J6.596$ K659 * 20,2 /3062 9G 20, ? endif

23

* row()+2,1 say replicate($+$, 4) * row()+1,1 say $nr$ * row(), say $denumire$ * row(),(! say $regi'or$ * row(), 1 say $an$ * row()+1,1 say $cas$ * row(), say $film$ * row()+1,1 say replicate($+$ , 4) * row()+1,1 scan if sit".f. * row(),1 say nrcas * row(), say titr * row(),(! say reg * row(), 1 say anap * row()+1,1 if row()"1! wait * ?,1 clear to 1!,?0 * ?,1 endif endif endscan * row()+1,1 say replicate($+$ , 4) wait deacti)ate window f return procedure lisr acti)ate window f select filme mreg"space((0) * 12,# to 14, # double * 1(,10 say $numele regi'orului >$ get mreg picture $*x$ read clear set order to tag treg locate for reg"mreg if found() * 1,1 say $sc eu srl$ * 2,20 say $filme cu regi'orul $+upper(mreg) * row()+2,1 say replicate($+$, 4) * row()+1,1 say $nr$ * row(), say $titlu romanesc$ * row(),(! say $titlu original$ * row(), 1 say $an$ * row()+1,1 say $cas$ * row(), say $film$ * row()+1,1 say replicate($+$, 4) * row()+1,1 do w:ile not eof() * row(),1 * row(),1 say nrcas * row(), say titr * row(),(! say tito * row(), 1 say anap * row()+1,1 if row()"1! wait * ?,1 clear to 1!,?0

24

enddo else

* ?,1 endif continue

endif wait deacti)ate window f return

* 20,1 to 22,?0 double * 21,20 say $nume regi'or inexistent$ wait * 21,2 clear to 21, !

procedure lisan acti)ate window f select filme man"0 * 12,# to 14, # double * 1(,10 say $6H13 F0 204025H96 >$ get man picture $!!!!$ read clear set order to tan locate for anap"man if found() * 1,1 say $sc eu srl$ * 2,(0 say $filme gestionate$ * row()+2,1 say replicate($+$, 4) * row()+1,1 say $nr$ * row(), say $denumire$ * row(),(! say $regi'or$ * row()+1,1 say $cas$ * row(), say $film$ * row()+1,1 say replicate($+$, 4) * row()+1,1 do w:ile not eof() * row(),1 * row(),1 say nrcas * row(), say titr * row(),(! say reg * row()+1,1 if row()"1! wait * ?,1 clear to 1!,?0 * ?,1 endif continue enddo else * 20,1 to 22,?0 double * 21,20 say $6H F0 204025H96 5H0N5.90H9$ wait * 21,2 clear to 21, ! endif wait deacti)ate window f return procedure lisa

25

acti)ate window f public mnact,mpact select actori select filme mnact"space(20) mpact"space(20) * 12,# to 1;, # double * 1(,10 say $nume actor >$ get mnact * 1#,10 say $prenume actor >$ get mpact read clear do lisact.,pr wait deacti)ate window f return

26

S-ar putea să vă placă și