Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateC
C sharpCalculatoareCorel drawDot netExcelFox pro
FrontpageHardwareHtmlInternetJavaLinux
MatlabMs dosPascalPhpPower pointRetele calculatoare
SqlTutorialsWebdesignWindowsWordXml

informatica Evidenta scolara

calculatoare



+ Font mai mare | - Font mai mic



 




Evidenta scolara

Cu acest program ne propunem gestionarea unei clase de elevi, aceasta presupunand:

Evidenta elevilor si a datelor personale;

Evidenta rezultatelor la invatatura;

Evidenta absentelor si acordarea de avertismente si chiar exmatricularea (stergerea din baza de date) elevilor care au acumulat un numar mare (definit de gestionar) de absente;

Introducerea si afisarea orarului, a profesorilor si a materiilor predate;

Calculul mediilor pe clasa sau individual;

Evidenta si gestionarea fondului clasei pe domenii de activitate;

Crearea de modificari in evidenta clasei (plecari sau veniri ale elevilor).

O baza de date reprezinta o colectie de date persistente. Din punct de vedere logic, baza de date este un set de tabele, impreuna cu un set de indecsi si cu anumite relatii stabilite intre tabele. Din punct de vedere fizic, baza de date este un fisier cu o anumita structura, memorat pe disc intr-un anumit director. In cazul limbajului FOX, tabelele care apartin unei baze de date, sunt memorate in fisiere separate, avand extensia .dbf.

Fisiere program sau fisiere de comenzi:

- Comenzile se executa secvential, in ordinea in care au fost scrise;

- Prin folosirea fisierelor program este posibila utilizarea unor structuri specifice de control al fluxului de executie al respectivelor comenzi.

- Editarea unui fisier program se executa prin comanda:

MODIFY COMMAND <nume_fisier>

Princ.prg

Este fisierul program care creaza si activeaza meniul de lucru facand legaturile la celalalt fisier program (proc.prg) care contine procedurile aferente.

close all

clear

deactivate window f1

deactivate window w1

set talk off

set escape off

define window f2 from 2,5 to 5,55 close

activate window f2

@ 0,2 say '----INTRODUCETI PAROLA : ' get a default ' ' size 1,10

read

if upper(alltrim(a))<>'CHILLY'

deactivate window f2

define window f3 from 10,1 to 13,55 close

activate window f3

@ 0,3 say '______PAROLA NU ESTE CORECTA !!!???______'

@ 1,3 say '<<< APASATI Esc SI INCERCATI DIN NOU . >>>'

read

deactivate window f3

else

deactivate window f2

do meniu

deactivate menu principal

release menu principal

close all

clear

endif

procedure meniu

define menu principal bar at line 0

set escape on

DEFINE PAD intro_pad of principal prompt '<  Introducere ';

color scheme 3 key alt+I,''

DEFINE PAD list_pad of principal prompt '<  List ';

color scheme 3 key alt+L,''

DEFINE PAD calc_pad of principal prompt '<  Calcule ';

color scheme 3 key alt+C,''

DEFINE PAD modif_pad of principal prompt '<  Modificari ';

color scheme 3 key alt+M,''

DEFINE PAD exit_pad of principal prompt '  E<xit ';

color scheme 3 key alt+E,''

ON PAD intro_pad of principal activate popup intro

ON PAD list_pad of principal activate popup list

ON PAD calc_pad of principal activate popup calc

ON PAD modif_pad of principal activate popup modif

ON selection PAD exit_pad of principal return to master

DEFINE POPUP intro margin relative shadow color scheme 3

DEFINE BAR 1 of intro prompt '<Stergere';

KEY CTRL+S,'^S'

DEFINE BAR 2 of intro prompt '<Nume & Adresa';

KEY CTRL+N,'^N'

DEFINE BAR 3 of intro prompt '<Note & Absente '

on bar 3 of intro activate popup sem

DEFINE POPUP sem margin relative shadow color scheme 4

DEFINE BAR 1 of sem prompt '<Sem I' key ctrl+A,'^A'

DEFINE BAR 2 of sem prompt '<Sem II' key ctrl+Q,'^Q'

DEFINE BAR 4 of intro prompt '<Profi & Materii';

KEY CTRL+M,'^M'

DEFINE POPUP list margin relative shadow color scheme 3

DEFINE BAR 1 of list prompt '<Elevi';

KEY CTRL+E,'^E'

DEFINE BAR 2 of list prompt '<Orar';

KEY CTRL+O,'^O'

DEFINE BAR 3 of list prompt '<Situatie';

KEY CTRL+T,'^T'

DEFINE BAR 4 of list prompt '<Profesori';

KEY CTRL+R,'^R'

DEFINE BAR 5 of list prompt '<Fond';

KEY CTRL+F,'^F'

DEFINE BAR 6 of list prompt '<Clear';

KEY CTRL+D,'^D'

DEFINE POPUP calc margin relative shadow color scheme 3

DEFINE BAR 1 of calc prompt '<Medii  '

on bar 1 of calc activate popup tip

DEFINE POPUP tip margin relative shadow color scheme 4

DEFINE BAR 1 of tip prompt '<Pe clasa';

KEY CTRL+L,'^L'

DEFINE BAR 2 of tip prompt '<Individual';

KEY CTRL+I,'^I'

DEFINE BAR 2 of calc prompt '<Avertismente';

KEY CTRL+Z,'^Z'

DEFINE BAR 3 of calc prompt '<Exmatriculari';

KEY CTRL+K,'^K'

DEFINE POPUP modif margin relative shadow color scheme 3

DEFINE BAR 1 of modif prompt '<Note';

KEY CTRL+B,'^B'

DEFINE BAR 2 of modif prompt '<Absente';

KEY CTRL+G,'^G'

DEFINE BAR 3 of modif prompt '<Plecari';

KEY CTRL+H,'^H'

DEFINE BAR 4 of modif prompt '<Veniri';

KEY CTRL+J,'^J'

DEFINE BAR 5 of modif prompt '<Orar';

KEY CTRL+U,'^U'

DEFINE BAR 6 of modif prompt '<Fond '

ON BAR 6 of modif activate popup gest

DEFINE POPUP gest margin relative shadow color scheme 4

DEFINE BAR 1 of gest prompt '< Introduc '

DEFINE BAR 2 of gest prompt '< Adaug '

DEFINE BAR 3 of gest prompt '< Cheltuiesc'

DEFINE BAR 7 of modif prompt '<Profesori';

KEY CTRL+P,'^P'

ON selection POPUP intro do proc_introd in proc

ON selection POPUP sem do proc_seme in proc

ON selection POPUP list do proc_lista in proc

ON selection POPUP calc do proc_calcu in proc

ON selection POPUP tip do proc_calc1 in proc

ON selection POPUP modif do proc_modifi in proc

ON selection POPUP gest do proc_gesti in proc

do while .t.

ACTIVATE MENU principal

Enddo

Proc.prg

Acest fisier program creeaza ferestrele de lucru si face legaturile dintre functiile si procedurile programului si meniul de lucru.

procedure proc_lista

if bar()=1

do lista1

else

if bar()=2

do lista2

else

if bar()=3

do lista3

else

if bar()=4

do lista4

else

if bar()=5

do lista5

else

if bar()=6

do lista6

endif

endif

endif

endif

endif

endif

return

procedure proc_calcu

if bar()=1

do calc1

else

if bar()=2

do calc2

else

if bar()=3

do calc3

endif

endif

endif

return

procedure proc_calc1

if bar()=1

do calcul1

else

do calcul2

endif

return

procedure proc_modifi

if bar()=1

do modifi1

else

if bar()=2

do modifi2

else

if bar()=3

do modifi3

else

if bar()=4

do modifi4

else

if bar()=5

do modifi5

else

if bar()=6

do gesti

else

if bar()=7

do modifi7

endif

endif

endif

endif

endif

endif

endif

return

procedure proc_gesti

if bar()=1

do gesti1

else

if bar()=2

do gesti2

else

if bar()=3

do gesti3

endif

endif

endif

return

procedure proc_introd

if bar()=1

do introd1

else

if bar()=2

do introd2

else

if bar()=3

do seme

else

if bar()=4

do introd4

endif

endif

endif

endif

return

procedure proc_seme

if bar()=1

do seme1

else

if bar()=2

do seme2

endif

endif

return

procedure introd1

define window f1 from 2,5 to 5,55 close

activate window f1

@ 0,1 say ' SE VA STERGE BAZA CURENTA '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

if upper(alltrim(j))='D'

define window f2 from 6,5 to 8,55 close

activate window f2

@ 0,2 say 'INTRODUCETI PAROLA: ' get b default ' ' size 1,10

read

if upper(alltrim(b))='SINED'

deactivate window f2

deactivate window f1

use delevi.dbf

set talk off

set escape on

scan

for i=1 to reccount()

delete

pack

endfor

endscan

use situatie.dbf

scan

for i=1 to reccount()

delete

pack

endfor

endscan

use 2situati.dbf

scan

for i=1 to reccount()

delete

pack

endfor

endscan

use profesor.dbf

scan

for i=1 to reccount()

delete

pack

endfor

endscan

else

define window f3 from 10,1 to 13,55 close

activate window f3

@ 0,3 say '--------- PAROLA NU ESTE CORECTA !!!!!????? '

@ 1,3 say '--------- INTRODUCETI PAROLA CORECTA '

read

deactivate window f3

endif

deactivate window f2

endif

deactivate window f1

return

procedure introd2

use delevi.dbf

if empty(nume)

define window f1 from 4,3 to 7,55 close

activate window f1

@ 0,1 say ' SE VA COMPLETA NUMELE SI ADRESA '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(j))='D'

define window f3 from 8,3 to 10,75 close

activate window f3

@ 0,1 say ' INTRODUCETI NUMARUL DE ELEVI INSCRISI ' get n default 0 picture '999';

valid n>=0 error ' NU POATE FI NEGATIV !!! '

read

deactivate window f3

set talk off

set escape on

use delevi.dbf

go bottom

for i=1 to n

insert blank

endfor

go top

brows

endif

else

define window f2 from 4,3 to 7,55 close

activate window f2

@ 0,1 say ' ERROR : BAZA PRECEDENTA NU A FOST STEARSA !!! '

@ 1,1 say ' -- ACTIVATI MAI INTAI OPTIUNEA STERGERE --'

read

deactivate window f2

endif

return

procedure introd4

use profesor.dbf

if empty(nume_prof)

define window f1 from 4,3 to 7,70 close

activate window f1

@ 0,1 say ' SE VA COMPLETA CU PROFESORII SI MATERIILE PE CARE LE PREDAU '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(j))='D'

define window f3 from 8,3 to 10,70 close

activate window f3

@ 0,1 say ' INTRODUCETI NUMARUL DE MATERII ' get n default 0 picture '999';

valid n>=0 error 'NU POATE FI NEGATIV !!!'

read

deactivate window f3

set talk off

set escape on

use profesor.dbf

go bottom

for i=1 to n

insert blank

endfor

go top

brows

endif

else

define window f2 from 4,3 to 7,55 close

activate window f2

@ 0,1 say 'ERROR : BAZA PRECEDENTA NU A FOST STEARSA !!! '

@ 1,1 say ' -- ACTIVATI MAI INTAI OPTIUNEA STERGERE --'

read

deactivate window f2

endif

return

procedure seme1

use situatie.dbf

if empty(nume)

define window f1 from 4,3 to 7,75 close

activate window f1

@ 0,1 say ' SE VA COMPLETA SITUATIA FIECARUI ELEV PE PRIMUL SEMESTRU '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(j))='D'

set talk off

set escape on

use delevi.dbf

n=0

scan

n=n+1

endscan

use situatie.dbf

for i=1 to n

go bottom

insert blank

endfor

use delevi.dbf

copy to situatie.dbf field nume,nrmatricol

use situatie.dbf

define window f3 from 8,3 to 12,75 close

activate window f3

@ 0,3 say ' URMEAZA SA INTRODUCETI MATERIILE CARE SE PREDAU '

@ 1,3 say ' -la urma introduceti si rubrica ABSENTE - '

@ 2,3 say ' TASTATI << ENTER >> '

read

deactivate window f3

modi stru

brows

go top

endif

else

define window f2 from 4,3 to 7,55 close

activate window f2

@ 0,1 say ' ERROR : BAZA PRECEDENTA NU A FOST STEARSA !!! '

@ 1,1 say ' -- ACTIVATI MAI INTAI OPTIUNEA STERGERE --'

read

deactivate window f2

endif

return

procedure seme2

use 2situati.dbf

if empty(nume)

define window f1 from 4,3 to 7,75 close

activate window f1

@ 0,1 say ' SE VA COMPLETA SITUATIA FIECARUI ELEV PE SEMESTRUl II '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(j))='D'

set talk off

set escape on

use delevi.dbf

n=0

scan

n=n+1

endscan

use 2situati.dbf

for i=1 to n

go bottom

insert blank

endfor

use delevi.dbf

copy to 2situati.dbf field nume,nrmatricol

use situatie.dbf

define window f3 from 8,3 to 12,75 close

activate window f3

@ 0,3 say ' URMEAZA SA INTRODUCETI MATERIILE CARE SE PREDAU '

@ 1,3 say ' -la urma introduceti si rubrica ABSENTE - '

@ 2,3 say ' TASTATI << ENTER >> '

read

deactivate window f3

modi stru

brows

go top

endif

else

define window f2 from 4,3 to 7,55 close

activate window f2

@ 0,1 say ' ERROR : BAZA PRECEDENTA NU A FOST STEARSA !!! '

@ 1,1 say ' -- ACTIVATI MAI INTAI OPTIUNEA STERGERE --'

read

deactivate window f2

endif

return

procedure lista1

define window f1 from 10,1 to 14,75 close

activate window f1

@ 0,1 say ' SE VOR LISTA ELEVII CLASEI, NR. MATRICOL, '

@ 1,1 say ' ADRESA, DATA NASTERII SI TELEFONUL '

@ 2,1 say ' DORITI SA CONTINUATI ? (D/N)' get q default ' ' size 1,2;

valid upper(alltrim(q))='D' or upper(alltrim(q))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(q))='D'

set talk off

set escape on

use delevi.dbf

browse noedit

endif

return

procedure lista2

define window f1 from 10,1 to 13,45 close

activate window f1

@ 0,1 say ' SE VA LISTA ORARUL CLASEI '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(j))='D'

set talk off

set escape on

use orar.dbf

brows noedit

endif

return

procedure lista3

define window f1 from 10,1 to 13,55 close

define window f2 from 10,1 to 14,60 close

activate window f1

@ 0,1 say ' SE VA AFISA SITUATIA LA INVATATURA '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get c default ' ' size 1,2;

valid upper(alltrim(c))='D' or upper(alltrim(c))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(c))='D'

set talk off

set escape on

activate window f2

@ 0,2 say ' TASTATI X PENTRU A AFISA SITUATIA LA INVATATURA IN :'

@ 1,2 say ' I SEMESTRU ' get j default ' ' size 1,2

@ 2,2 say ' AL II-lea SEMESTRU ' get b default ' ' size 1,2

read

deactivate window f2

if upper(alltrim(j))='X'

use situatie.dbf

brows noedit

endif

if upper(alltrim(b))='X'

use 2situati.dbf

brows noedit

endif

endif

return

procedure lista4

define window f1 from 10,1 to 13,70 close

activate window f1

@ 0,1 say 'SE VOR AFISA PROFESORII ,MATERIILE PREDATE SI ORARUL LOR '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

set talk off

set escape on

if upper(alltrim(j))='D'

use profesor.dbf

brows noedit

endif

return

procedure lista5

define window f1 from 10,1 to 13,50 close

activate window f1

@ 0,1 say 'SE VA LISTA FONDUL CLASEI SI GESTIUNEA SA '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D' or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(j))='D'

set talk off

set escape on

use fond.dbf

brows noedit

endif

return

procedure lista6

define window f1 from 10,1 to 13,50 close

activate window f1

@ 0,1 say ' SE VA STERGE ECRANUL '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get q default ' ' size 1,2;

valid upper(alltrim(q))='D' or upper(alltrim(q))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(q))='D'

clear

endif

return

procedure calcul1

define window f1 from 10,10 to 13,45 close

activate window f1

@ 0,1 say ' SE VA CALCULA MEDIA PE CLASA '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N) ' get q default ' ' size 1,3;

valid upper(alltrim(q))='D' or upper(alltrim(q))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(q))='D'

set talk off

set escape on

set decimals to 2

use situatie.dbf

l=0

scan

t=0

for i=3 to fcount()-1

store field(i) to x

s=alltrim(&x)

n=0

med=0

do while at(',',s)>0

m=at(',',s)

n=n+1

p=left(s,m-1)

med=med+val(p)

s=substr(s,m+1,len(s)-m)

enddo

if at(':',s)>0

tz=val(substr(s,2,len(s)-1))

med=(3*med/n+tz)/4

else

med=med/n

endif

if (round(med,2)-round(med,0))>0.49

t=t+ceil(med)

else

t=t+floor(med)

endif

endfor

l=l+t/(fcount()-3)

endscan

'PE I SEMESTRU MEDIA ESTE: ',l/reccount()

use 2situati.dbf

l1=0

scan

t1=0

for i=3 to fcount()-1

store field(i) to y

s1=alltrim(&y)

n1=0

med1=0

do while at(',',s1)>0

m1=at(',',s1)

n1=n1+1

p1=left(s1,m1-1)

med1=med1+val(p1)

s1=substr(s1,m1+1,len(s1)-m1)

enddo

if at(':',s1)>0

tz1=val(substr(s1,2,len(s1)-1))

med=(3*med1/n1+tz1)/4

else

med=med1/n1

endif

if (round(med,2)-round(med,0))>0.49

t1=t1+(round(med,0)+1)

else

t1=t1+round(med,0)

endif

endfor

l1=l1+t1/(fcount()-3)

endscan

? 'MEDIA PE SEMESTRUL II ESTE: ',l1/reccount()

? 'MEDIA PE CLASA ESTE : ',(l/reccount()+l1/reccount())/2

endif

return

procedure calcul2

define window f1 from 5,1 to 8,75 close

activate window f1

@ 0,1 say 'SE VA CALCULA MEDIILE UNUI ELEV LA TOATE MATERIILE '

@ 1,1 say 'DORITI SA CONTINUATI ? (D/N) ' get c default ' ' size 1,2;

valid upper(alltrim(c))='D' or upper(alltrim(c))='N' error 'INTRODUCETI DOAR D/N '

read

deactivate window f1

if upper(alltrim(c))='D'

set talk off

set escape on

set decimals to 2

define window f2 from 9,1 to 15,75 close

activate window f2

@ 0,2 say 'Introduceti numele elevului : ' get n default ' 'size 1,35

@ 1,2 say 'TASTATI X PENTRU A ALEGE SEMESTRUL DORIT: '

@ 2,2 say ' I SEMESTRU ' get u default ' ' size 1,2

@ 3,2 say ' AL II-lea SEMESTRU ' get b default ' ' size 1,2

read

if upper(alltrim(u))='X' and upper(alltrim(b))='X'

define window f3 from 16,1 to 18,75 close

activate window f3

@ 0,3 say 'INTRODUCERE ERONATA !!! '

read

deactivate window f3,f2

return

endif

deactivate window f2

use delevi.dbf

t=0

scan

if upper(alltrim(nume))=upper(alltrim(n))

t=t+1

endif

endscan

if t=0

define window f3 from 16,1 to 19,65 close

activate window f3

@ 0,3 say 'ERROR: NUMELE INTRODUS NU SE GASESTE IN BAZA DE DATE !!!'

@ 1,3 say '-------INTRODUCETI NUMELE CORECT '

read

deactivate window f2,f3

return

else

if t>1

define window f4 from 16,1 to 19,65 close

activate window f4

@ 0,4 say 'SUNT MAI MULTE ASTFE DE NUME IN CLASA '

@ 1,4 say 'SPECIFICATI NR. MATRICOL AL ELEVULUI ' get p default ' ' size 1,5;

valid val(p)>=0 error ' NU POATE FI NEGATIV '

read

deactivate window f4

endif

if t=1

locate for upper(alltrim(n))=upper(alltrim(nume))

p=nrmatricol

endif

if upper(alltrim(u))='X'

use situatie.dbf

w=0

scan

if upper(alltrim(nume))=upper(alltrim(n)) and alltrim(nrmatricol)=alltrim(p)

for i=3 to fcount()-1

store field(i) to x

s1=alltrim(&x)

n1=0

med1=0

do while at(',',s1)>0

m1=at(',',s1)

n1=n1+1

p1=left(s1,m1-1)

med1=med1+val(p1)

s1=substr(s1,m1+1,len(s1)-m1)

enddo

if at(':',s1)>0

tz1=val(substr(s1,2,len(s1)-1))

med=(3*med1/n1+tz1)/4

else

med=med1/n1

endif

if (round(med,2)-round(med,0))>0.49

med=round(med,0)+1

else

med=round(med,0)

endif

w=w+med

if med<5

? field(i),'--CORIGENT-- ',med

else

? field(i),' ',med

endif

endfor

? ' TOTAL : ',w/(fcount()-3)

endif

endscan

else

if upper(alltrim(b))='X'

use 2situati.dbf

w=0

scan

if upper(alltrim(nume))=upper(alltrim(n)) and alltrim(nrmatricol)=alltrim(p)

for i=3 to fcount()-1

store field(i) to x

s1=alltrim(&x)

n1=0

med1=0

do while at(',',s1)>0

m1=at(',',s1)

n1=n1+1

p1=left(s1,m1-1)

med1=med1+val(p1)

s1=substr(s1,m1+1,len(s1)-m1)

enddo

if at(':',s1)>0

tz1=val(substr(s1,2,len(s1)-1))

med=(3*med1/n1+tz1)/4

else

med=med1/n1

endif

if (round(med,2)-round(med,0))>0.49

med=round(med,0)+1

else

med=round(med,0)

endif

w=w+med

if med<5

? field(i),'--CORIGENT-- ',med

else

? field(i),' ',med

endif

endfor

? ' TOTAL : ',w/(fcount()-3)

endif

endscan

endif

endif

endif

endif

return

procedure calc2

define window f1 from 1,1 to 4,50 close

activate window f1

@ 0,1 say ' SE VOR AFISA ELEVII CU AVERTISMENTE '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get h default ' ' size 1,2;

valid upper(alltrim(h))='D' or upper(alltrim(h))='N' error 'INTRODUCETI DOAR D/N '

read

if upper(alltrim(h))='D'

set talk off

set escape on

define window f3 from 5,0 to 16,74 close

activate window f3

@ 0,3 say 'Numarul absentelor va influenta media la PURTARE'

@ 1,3 say ' Elevi vor primi avertismente in functie de numarul de absente astfel:'

@ 2,3 say 'sub 15 absente <> ----- ----- -------- <> PURTARE 10'

@ 3,3 say ' 15-30 absente <> ----- ----- -------- <> PURTARE 9'

@ 4,3 say ' 30-50 absente <> ----- ----- -------- <> PURTARE 8'

@ 5,3 say ' 50-70 absente <> primul avertisment <> PURTARE 7'

@ 6,3 say ' 70-90 absente <> al doilea avertisment <> PURTARE 6'

@ 7,3 say ' 90-100 absente <> al treilea avertisment <> PURTARE 5'

@ 8,3 say ' peste 100 absente <> EXMATRICULAT <> ----- ----- --------'

@ 9,3 say ' DORITI ACEASTA REPARTITIE (D/N) ? ' get x default ' ' size 1,2;

valid upper(alltrim(x))='D' or upper(alltrim(x))='N' error 'INTRODUCETI DOAR D/N '

read

if upper(alltrim(x))='D'

a=15

b=30

c=50

d=70

e=90

f=100

else

if upper(alltrim(x))='N'

define window f3 from 5,0 to 16,74 close

activate window f3

@ 0,3 say ' INTRODUCETI NOUA REPARTITIE : '

@ 1,3 say ' Elevi vor primi avertismente in functie de numarul de absente astfel:'

@ 2,3 say ' PURTARE 10 daca nr. absentelor este sub a=' get a default 0 picture '9999';

valid a>=0 error 'NU POATE FI NEGATIV !!! '

@ 3,3 say ' PURTARE 9 daca nr. absentelor este intre a si b=' get b default 0 picture '9999';

valid b>a error 'NU POATE FI b < a !!! '

@ 4,3 say ' PURTARE 8 daca nr. absentelor este intre b si c=' get c default 0 picture '9999';

valid c>b error 'NU POATE FI c < b !!! '

@ 5,3 say ' PURTARE 7 daca nr. absentelor este intre c si d=' get d default 0 picture '9999';

valid d>c error 'NU POATE FI d < c !!! '

@ 6,3 say ' PURTARE 6 daca nr. absentelor este intre d si e=' get e default 0 picture '9999';

valid e>d error 'NU POATE FI e < d !!! '

@ 7,3 say ' PURTARE 5 daca nr. absentelor este intre e si f=' get f default 0 picture '9999';

valid f>e error 'NU POATE FI f < e !!! '

@ 8,3 say ' URMEAZA SA FIE EXMARTICULAT DACA ARE PESTE -- f -- absente '

read

else

deactivate window f1,f3

return

endif

endif

if b=0 or c=0 or d=0 or e=0 or f=0 or ;

a>b or b>c or c>d or d>f or a>c or a>d or a>e or a>f or b>c or b>d or ;

b>e or b>f or c>d or c>e or c>f or d>e or d>f or e>f

deactivate window f3

define window f4 from 1,1 to 4,50 close

activate window f4

@ 0,4 say 'ERROR !!! REPARTITIA ESTE ERONATA ???!!!'

@ 1,4 say 'INTRODUCETI UNA CORECTA '

read

deactivate window f1,f2,f3,f4

return

endif

define window f2 from 17,1 to 19,50 close

activate window f2

@ 0,2 say 'INTRODUCETI SEMESTRUL (1/2) ' get y default ' ' size 1,2;

valid upper(alltrim(y))='1' or upper(alltrim(y))='2' error 'TASTATI DOAR 1/2 !!! '

read

deactivate window f1,f2,f3

if upper(alltrim(y))='1'

IN I SEMESTRU AVEM:'

use situatie.dbf

scan

if absente<a

replace purtare with '10,'

else

if (absente>(a-1)) and (absente<(b+1))

replace purtare with '9,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: media 9 la PURTARE'

else

if (absente>(b-1)) and (absente<(c+1))

replace purtare with '8,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: media 8 la PURTARE'

else

if (absente>(c-1)) and (absente<(d+1))

replace purtare with '7,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: primul avertisment si media 7 la PURTARE'

else

if (absente>(d-1)) and (absente<(e+1))

replace purtare with '6,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: al doilea avertisment si media 6 la PURTARE'

else

if (absente>(e-1)) and (absente<(f+1))

replace purtare with '5,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: al treilea avertisment si media 5 la PURTARE'

else

if (absente>f)

replace purtare with '4,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: URMEAZA SA FIE ---EXMATRICULAT---!!! '

endif

endif

endif

endif

endif

endif

endif

endscan

endif

if upper(alltrim(y))='2'

IN AL II-lea SEMESTRU AVEM:'

use 2situati.dbf

scan

if absente<a

replace purtare with '10,'

else

if (absente>(a-1)) and (absente<(b+1))

replace purtare with '9,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: media 9 la PURTARE'

else

if (absente>(b-1)) and (absente<(c+1))

replace purtare with '8,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: media 8 la PURTARE'

else

if (absente>(c-1)) and (absente<(d+1))

replace purtare with '7,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: primul avertisment si media 7 la PURTARE'

else

if (absente>(d-1)) and (absente<(e+1))

replace purtare with '6,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: al doilea avertisment si media 6 la PURTARE'

else

if (absente>(e-1)) and (absente<(f+1))

replace purtare with '5,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: al treilea avertisment si media 5 la PURTARE'

else

if (absente>f)

replace purtare with '4,'

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' are ',absente,' absente'

?' CONSECINTA: URMEAZA SA FIE ---EXMATRICULAT---!!! '

endif

endif

endif

endif

endif

endif

endif

endscan

endif

else

return

endif

return

procedure calc3

define window f1 from 5,1 to 8,75 close

activate window f1

@ 0,1 say ' VOR FI EXMATRICULATI (STERSI) ELEVII CU PESTE 100 DE ABSENTE '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get j default ' ' size 1,2;

valid upper(alltrim(j))='D'or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N !!! '

read

deactivate window f1

if upper(alltrim(j))='D'

set talk off

set escape on

b=100

else

if upper(alltrim(j))='N'

define window f2 from 9,1 to 13,75 close

activate window f2

@ 0,2 say ' VOR FI EXMATRICULATI (STERSI) ELEVII CU PESTE c=? ABSENTE '

@ 1,2 say ' INTRODUCETI ---------- c=' get c default 0 picture '9999';

valid c>=0 error 'NU POATE FI NEGATIV !!!

@ 2,2 say ' DORITI SA CONTINUATI (D/N) ? ' get d default ' ' size 1,2;

valid upper(alltrim(d))='D'or upper(alltrim(d))='N' error 'INTRODUCETI DOAR D/N !!! '

read

deactivate window f2

if upper(alltrim(d))='D'

b=c

else

deactivate window f2,f1

return

endif

else

deactivate window f1

endif

endif

-----------IN PRIMUL SEMESTRU AVEM:-----------'

t=0

use situatie.dbf

scan

if absente>b

t=1

?' Elevul ',alltrim(proper(nume)),'cu nr.matricol',nrmatricol,' a avut ',absente,' absente'

?' CONSECINTA: A fost !! -EXMATRICULAT- !!'

n=upper(alltrim(nume))

delete

pack

use delevi.dbf

scan

if upper(alltrim(nume))=n

delete

pack

endif

endscan

endif

endscan

if t=0

? '******NU SUNT ELEVI CU PESTE ',b,' DE ABSENTE !!!'

endif

-----------IN SEMESTRUL AL II-lea AVEM:-----------'

p=0

use 2situati.dbf

scan

if absente>b

p=1

?' Elevul ',alltrim(proper(nume)),' cu nr.matricol',nrmatricol,' a avut ',absente,' absente'

?' CONSECINTA: A fost !! -EXMATRICULAT- !!'

m=upper(alltrim(nume))

delete

pack

use delevi.dbf

scan

if upper(alltrim(nume))=m

delete

pack

endif

endscan

endif

endscan

if p=0

? '******NU SUNT ELEVI CU PESTE ',b,' DE ABSENTE !!!'

endif

return

procedure modifi1

define window f1 from 10,1 to 14,50 close

activate window f1

@ 0,1 say ' SE VOR INTRODUCE NOI NOTE '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

deactivate window f1

if upper(alltrim(e))='D'

set talk off

set escape on

define window f2 from 10,1 to 18,73 close

activate window f2

@ 0,2 say ' TASTATI ' X ' PENTRU OPTIUNEA ALEASA'

@ 1,2 say ' I SEMESTRU ' get j default ' ' size 1,2

@ 2,2 say ' AL II-lea SEMESTRU ' get b default ' ' size 1,2

@ 3,2 say ' INTRODUCETI MATERIA LA CARE ADAUGATI NOTA ' get c default ' ' size 1,15

@ 4,2 say ' INTRODUCETI NUMELE ELEVULUI ' get d default ' ' size 1,30

@ 5,2 say ' INTRODUCETI NR. MATRICOL ' get f default ' ' size 1,5

read

deactivate window f2

if upper(alltrim(j))='X' and upper(alltrim(b))='X'

define window f3 from 19,1 to 21,60 close

activate window f3

@ 0,3 say ' INTRODUCERE ERONATA !!!'

read

deactivate window f2,f3

return

endif

if upper(alltrim(j))='X'

use delevi.dbf

m=0

n=0

scan

if upper(alltrim(nume))=upper(alltrim(d)) and alltrim(nrmatricol)=alltrim(f)

n=1

endif

endscan

use situatie.dbf

for i=3 to fcount()-1

if upper(alltrim(field(i)))=upper(alltrim(c))

m=1

i=i+1

endif

endfor

if m=0

? 'ERROR: MATERIA INTRODUSA NU EXISTA IN BAZA DE DATE'

if n=0

? 'ERROR: NUMELE INTRODUS NU EXISTA IN BAZA DE DATE '

return

endif

return

endif

use situatie.dbf

scan

if upper(alltrim(nume))=upper(alltrim(d)) and alltrim(nrmatricol)=alltrim(f)

browse freeze(c)

endif

endscan

endif

if upper(alltrim(b))='X'

use 2situati.dbf

scan

if upper(alltrim(nume))=upper(alltrim(d)) and alltrim(nrmatricol)=alltrim(f)

browse freeze(c)

endif

endscan

endif

endif

return

procedure modifi2

define window f1 from 10,1 to 14,50 close

activate window f1

@ 0,1 say ' SE VA MODIFICA NUMARUL ABSENTELOR '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

deactivate window f1

if upper(alltrim(e))='D'

set talk off

set escape on

define window f2 from 10,1 to 17,73 close

activate window f2

@ 0,2 say ' TASTATI ' X ' PENTRU OPTIUNEA ALEASA'

@ 1,2 say ' I SEMESTRU ' get j default ' ' size 1,2

@ 2,2 say ' AL II-lea SEMESTRU ' get b default ' ' size 1,2

@ 3,2 say ' INTRODUCETI NUMELE ELEVULUI : ' get d default ' ' size 1,30

@ 4,2 say ' INTRODUCETI NR. MATRICOL : ' get f default ' ' size 1,5

read

if upper(alltrim(j))='X' and upper(alltrim(b))='X'

define window f3 from 19,1 to 21,60 close

activate window f3

@ 0,3 say ' INTRODUCERE ERONATA !!!'

read

deactivate window f2,f3

return

endif

deactivate window f2

use delevi.dbf

t=0

scan

if upper(alltrim(nume))=upper(alltrim(d)) and alltrim(nrmatricol)=alltrim(f)

t=1

endif

endscan

if t=0

? 'ERROR: NUMELE INTRODUS NU SE GASESTE IN BAZA DE DATE'

else

if upper(alltrim(j))='X'

use situatie.dbf

scan

if upper(alltrim(nume))=upper(alltrim(d)) and alltrim(nrmatricol)=alltrim(f)

brows freeze(field(fcount()-1))

endif

endscan

endif

if upper(alltrim(b))='X'

use 2situati.dbf

scan

if upper(alltrim(nume))=upper(alltrim(d))

browse freeze(field(fcount()))

endif

endscan

endif

endif

endif

return

procedure modifi3

define window f1 from 10,1 to 14,50 close

activate window f1

@ 0,1 say ' SE VOR EFECTUA PLECARI (MUTARI) DIN CLASA '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

deactivate window f1

if upper(alltrim(e))='D'

set talk off

set escape on

define window f2 from 10,1 to 14,75 close

activate window f2

@ 0,2 say ' Introduceti numele elevului care a fost mutat din clasa' get e default ' ' size 1,30

@ 1,2 say ' Introduceti nr. lui matricol ' get f default ' ' size 1,5;

valid val(f)>=0 error 'NU POATE FI NEGATIV '

read

deactivate window f2

use delevi.dbf

t=0

scan

if upper(alltrim(nume))=upper(alltrim(e)) and alltrim(nrmatricol)=alltrim(f)

t=1

endif

endscan

if t=0

? 'ERROR: NUMELE INTRODUS NU SE GASESTE IN BAZA DE DATE'

return

else

use delevi.dbf

scan

locate for proper(alltrim(nume))=proper(e) and alltrim(nrmatricol)=alltrim(f)

delet

pack

endscan

use situatie.dbf

scan

locate for proper(alltrim(nume))=proper(e) and alltrim(nrmatricol)=alltrim(f)

delet

pack

endscan

use 2situati.dbf

scan

locate for proper(alltrim(nume))=proper(e) and alltrim(nrmatricol)=alltrim(f)

delet

pack

endscan

endif

else

return

endif

return

procedure modifi4

define window f1 from 10,1 to 14,50 close

activate window f1

@ 0,1 say ' SE VA INTRODUCE UN NOU ELEV '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

deactivate window f1

if upper(alltrim(e))='D'

set talk off

set escape on

define window f3 from 10,1 to 12,75 close

activate window f3

@ 0,3 say 'DATI NUMELE ELEVULUI :' get c default ' ' size 1,30

read

clear

deactivate window f3

use delevi.dbf

scan

go bottom

insert blank

replace nume with proper(c)

brows

endscan

define window f2 from 10,1 to 16,75 close

activate window f2

@ 0,2 say 'TASTATI ' X ' PENTRU SEMESTRU IN CARE SE FACE MUTAREA :'

@ 1,2 SAY ' I SEMESTRU ' get j default ' ' size 1,2

@ 2,2 say ' AL II-lea SEMESTRU ' get b default ' ' size 1,2

read

if upper(alltrim(j))='X' and upper(alltrim(b))='X'

define window f3 from 19,1 to 21,60 close

activate window f3

@ 0,3 say ' INTRODUCERE ERONATA !!!'

read

deactivate window f2,f3

return

endif

deactivate window f2

if upper(alltrim(j))='X'

use situatie.dbf

scan

go bottom

insert blank

replace nume with proper(c)

brows

endscan

use 2situati.dbf

scan

go bottom

insert blank

replace nume with proper(c)

endscan

endif

if upper(alltrim(b))='X'

use 2situati.dbf

scan

go bottom

insert blank

replace nume with proper(c)

brows

endscan

endif

endif

return

procedure modifi5

define window f1 from 4,5 to 7,50 close

activate window f1

@ 0,1 say ' SE VOR EFECTUA MODIFICARI IN ORAR '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N)' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

if upper(alltrim(e))='D'

define window f2 from 8,1 to 10,72 close

activate window f2

@ 0,2 say ' Introduceti ziua cand se va efectua modificarea : ' get j default ' ' size 1,12;

valid upper(alltrim(j))='LUNI' or upper(alltrim(j))='MARTI' or upper(alltrim(j))='MIERCURI' or;

upper(alltrim(j))='JOI' or upper(alltrim(j))='VINERI' error 'ZIUA ESTE INTRODUSA GRESIT !!!'

read

clear

deactivate window f2

deactivate window f1

use orar.dbf

for i=1 to fcount()

if field(i)=upper(alltrim(j))

store field(i) to x

browse freeze &x

endif

endfor

endif

return

procedure gesti1

define window f1 from 1,1 to 4,45 close

activate window f1

@ 0,1 say ' SE VA INTRODUCE UN NOU FOND AL CLASEI '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N) ' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

if upper(alltrim(e))='D'

set talk off

set escape on

b=0

define window f2 from 4,1 to 12,73 close

activate window f2

@ 0,2 say ' INTRODUCETI FONDUL CLASEI: ' get b default 0 picture '999999999.99';

valid b>=0 error ' NU POATE FI NEGATIV !!!'

@ 1,2 say ' FONDUL CLASEI SE VA IMPARTI ANUAL IN FUNCTIE DE PRIORITATI ASTFEL: '

@ 2,2 say ' *** UZ SCOLAR pana la 100 000 '

@ 3,2 say ' *** RENOVARI pana la 5 000 000 '

@ 4,2 say ' *** EXCURSII pana la 10 000 000 '

@ 5,2 say ' *** AU RAMAS restul '

@ 6,2 say ' DORITI ACEASTA REPARTITIE ? (D/N) ' get j default ' ' size 1,2;

valid upper(alltrim(j))='D'or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N !!! '

read

if upper(alltrim(j))='N'

define window f3 from 12,1 to 18,70 close

activate window f3

@ 0,3 say ' INTRODUCETI NOUA REPARTITIE ASTFEL: '

@ 1,3 say ' * 1 * UZ SCOLAR PANA LA : ' get x default 0 picture '999999999 ';

valid x>=0 error ' NU POATE FI NEGATIV !!!'

@ 2,3 say ' * 2 * RENOVARI PANA LA : ' get y default 0 picture '999999999 ';

valid y>=0 error ' NU POATE FI NEGATIV !!!'

@ 3,3 say ' * 3 * EXCURSII PANA LA  : ' get z default 0 picture '999999999 ';

valid z>=0 error ' NU POATE FI NEGATIV !!!'

read

else

deactivate window f3

x=100000

y=5000000

z=10000000

r=0

endif

use fond.dbf

scan

replace total with b

if b<(x+1)

replace uz_scolar with b

x=b

y=0

z=0

r=0

replace renovari with y

replace excursii with z

replace au_ramas with r

else

if (b>x) and (b<(x+y+1))

replace uz_scolar with x

replace renovari with b-x

y=b-x

z=0

r=0

replace excursii with z

replace au_ramas with r

else

if b>(x+y) and b<(x+y+z+1)

replace uz_scolar with x

replace renovari with y

replace excursii with b-(x+y)

r=0

replace au_ramas with r

else

if b>(x+y+z)

replace uz_scolar with x

replace renovari with y

replace excursii with z

r=b-(x+y+z)

replace au_ramas with r

endif

endif

endif

endif

endscan

define window f4 from 18,1 to 24,55 close

activate window f4

@ 0,3 say ' REPARTITIA FONDULUI ESTE: '

@ 1,3 say ' *** UZ SCOLAR : ' get x

@ 2,3 say ' *** RENOVARI : ' get y

@ 3,3 say ' *** EXCURSI : ' get z

@ 4,3 say ' * AU MAI RAMAS : ' get r

read

deactivate window f4

deactivate window f3

deactivate window f2

endif

deactivate window f1

return

procedure gesti2

define window f1 from 1,1 to 4,60 close

activate window f1

@ 0,1 say ' SE VOR ADAUGA BANI LA FONDUL DEJA EXISTENT '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N) ' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

use fond.dbf

f=total

if upper(alltrim(e))='D'

set talk off

set escape on

define window f2 from 4,1 to 13,73 close

activate window f2

@ 0,2 say ' FONDUL ESTE DE : ' get f

@ 1,2 say ' INTRODUCETI SUMA CARE SE ADAUGA : ' get b default 0 picture '999999999.99';

valid f>=0 error ' NU POATE FI NEGATIV !!!'

@ 2,2 say ' FONDUL CLASEI SE VA IMPARTI ANUAL IN FUNCTIE DE PRIORITATI ASTFEL: '

@ 3,2 say ' *** UZ SCOLAR pana la 100 000 '

@ 4,2 say ' *** RENOVARI pana la 5 000 000 '

@ 5,2 say ' *** EXCURSI pana la 10 000 000 '

@ 6,2 say ' *** AU RAMAS --- restul--- '

@ 7,2 say ' DORITI ACEASTA REPARTITIE ? (D/N) ' get j default ' ' size 1,2;

valid upper(alltrim(j))='D'or upper(alltrim(j))='N' error 'INTRODUCETI DOAR D/N !!! '

read

b=f+b

if upper(alltrim(j))='N'

define window f3 from 13,1 to 18,70 close

activate window f3

@ 0,3 say ' INTRODUCETI NOUA REPARTITIE ASTFEL: '

@ 1,3 say ' * 1 * UZ SCOLAR PANA LA : ' get x default 0 picture '999999999 ';

valid x>=0 error ' NU POATE FI NEGATIV !!!'

@ 2,3 say ' * 2 * RENOVARI PANA LA : ' get y default 0 picture '999999999 ';

valid y>=0 error ' NU POATE FI NEGATIV !!!'

@ 3,3 say ' * 3 * EXCURSI PANA LA : ' get z default 0 picture '999999999 ';

valid z>=0 error ' NU POATE FI NEGATIV !!!'

read

else

deactivate window f3

x=100000

y=5000000

z=10000000

endif

use fond.dbf

replace total with b

if b<(x+1)

replace uz_scolar with b

replace renovari with 0

replace excursii with 0

replace au_ramas with 0

else

if (b>x) and (b<(x+y+1))

replace uz_scolar with x

replace renovari with b-x

replace excursii with 0

replace au_ramas with 0

else

if (b>(x+y)) and (b<(x+y+z+1))

replace uz_scolar with x

replace renovari with y

replace excursii with b-(x+y)

replace au_ramas with 0

else

if b>(x+y+z)

replace uz_scolar with x

replace renovari with y

replace excursii with z

replace au_ramas with b-(x+y+z)

r=b-(x+y+z)

endif

endif

endif

endif

define window f4 from 18,1 to 24,55 close

activate window f4

@ 0,3 say ' REPARTITIA FONDULUI ESTE: '

@ 1,3 say ' *** UZ SCOLAR : ' get x

@ 2,3 say ' *** RENOVARI : ' get y

@ 3,3 say ' *** EXCURSII : ' get z

@ 4,3 say ' *AU MAI RAMAS : ' get r

read

deactivate window f4

deactivate window f3

deactivate window f2

endif

deactivate window f1

procedure gesti3

define window f1 from 1,1 to 4,60 close

activate window f1

@ 0,1 say ' SE VA SCADE DIN FONDUL TOTAL EVENTUALELE CHELTUIELI '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N) ' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

if upper(alltrim(e))='D'

set talk off

set escape on

define window f2 from 5,1 to 11,75 close

activate window f2

@ 0,2 say ' TASTATI ' X ' PENTRU DOMENIUL(DOMENIILE) IN CARE S-AU FACUT CHELTUIELI '

@ 1,2 say ' UZ SCOLAR : ' get j default ' ' size 1,2

@ 2,2 say ' RENOVARI : ' get b default ' ' size 1,2

@ 3,2 say ' EXCURSII : ' get c default ' ' size 1,2

@ 4,2 say 'BANI RAMASI: ' get r default ' ' size 1,2

read

ac=0

bc=0

cc=0

br=0

if upper(alltrim(j))='X'

define window f3 from 12,1 to 14,73 close

activate window f3

@ 0,3 say ' INTRODUCETI SUMA CARE S-A CHELTUIT PT. UZ SCOLAR ' get ac default 0 picture '999999999';

valid ac>=0 error ' NU POATE FI NEGATIV !!!'

read

use fond.dbf

if ac>uz_scolar

define window f4 from 15,1 to 18,73 close

activate window f4

@ 0,4 say 'ERROR: SUMA CHELTUITA DEPASESTE SUMA ALOCATA !!! '

@ 1,4 say '------ INTRODUCETI O VALOARE ACCEPTABILA '

read

deactivate window f4,f3,f2,f1

return

else

replace uz_scolar with uz_scolar-ac

replace total with total-ac

endif

endif

if upper(alltrim(b))='X'

define window f5 from 15,1 to 17,73 close

activate window f5

@ 0,5 say ' INTRODUCETI SUMA CARE S-A CHELTUIT PT. RENOVARI ' get bc default 0 picture '999999999';

valid bc>=0 error ' NU POATE FI NEGATIV !!!'

read

use fond.dbf

if bc>renovari

define window f4 from 18,1 to 21,73 close

activate window f4

@ 0,4 say 'ERROR: SUMA CHELTUITA DEPASESTE SUMA ALOCATA !!! '

@ 1,4 say '------ INTRODUCETI O VALOARE ACCEPTABILA '

read

deactivate window f5,f4,f3,f2,f1

return

else

replace renovari with renovari-bc

replace total with total-bc

endif

endif

if upper(alltrim(c))='X'

define window f6 from 18,1 to 20,73 close

activate window f6

@ 0,6 say ' INTRODUCETI SUMA CARE S-A CHELTUIT PT. EXCURSII ' get cc default 0 picture '999999999';

valid cc>=0 error ' NU POATE FI NEGATIV !!!'

read

use fond.dbf

if cc>excursii

define window f4 from 21,1 to 24,73 close

activate window f4

@ 0,4 say 'ERROR: SUMA CHELTUITA DEPASESTE SUMA ALOCATA !!! '

@ 1,4 say '------ INTRODUCETI O VALOARE ACCEPTABILA '

read

deactivate window f6,f5,f4,f3,f2,f1

return

else

replace excursii with excursii-cc

replace total with total-cc

endif

endif

if upper(alltrim(r))='X'

define window f7 from 21,1 to 23,73 close

activate window f7

@ 0,7 say ' INTRODUCETI SUMA CARE S-A CHELTUIT DIN BANII RAMASI ' get br default 0 picture '999999999';

valid br>=0 error ' NU POATE FI NEGATIV !!!'

read

use fond.dbf

if br>au_ramas

define window f4 from 17,1 to 20,73 close

activate window f4

@ 0,4 say 'ERROR: SUMA CHELTUITA DEPASESTE SUMA ALOCATA !!! '

@ 1,4 say '------ INTRODUCETI O VALOARE ACCEPTABILA '

read

deactivate window f1,f2,f3,f4,f5,f6,f7

return

else

replace au_ramas with au_ramas-br

replace total with total-br

endif

endif

deactivate window f2,f3,f4,f5,f7,f6

endif

deactivate window f1

use fond.dbf

browse noedit

return

procedure modifi7

define window f1 from 5,1 to 8,70 close

activate window f1

@ 0,1 say ' SE VOR EFECTUA SCHIMBARI ALE PROFESORILOR '

@ 1,1 say ' DORITI SA CONTINUATI ? (D/N) ' get e default ' ' size 1,2;

valid upper(alltrim(e))='D'or upper(alltrim(e))='N' error 'INTRODUCETI DOAR D/N !!! '

read

deactivate window f1

if upper(alltrim(e))='D'

set talk off

set escape on

use profesori.dbf

browse freeze nume_prof

endif

return

Dupa ce a fost creata o tabela, aceasta se afla in stare 'deschis'. Aceasta inseamna ca respectivul fisier este deschis si se pot astfel efectua operatii (adaugare, modificare, afisare etc) asupra datelor respective. Pentru a deschide o tabela deja existenta, folosim comanda:

USE <nume>[.dbf]

Iar pentru a o inchide, comanda:

USE

Listarea pe ecran a informatiilor continute in tabela se efectueaza cu comanda:

LIST

DELEVI.DBF

Tabela contine informatii despre elevi.

situatie.dbf & 2situati.dbf

Contin informatii despre situatiile elevilor la invatatura pe primul respectiv al doilea semestru.

Profesor.dbf

Contine informatii despre profesori si materiile predate.

orar.dbf

Contine informatii referitoare la orarul de studiu al elevilor.

Fond.dbf

Contine informatii despre fondul clasei si repartitia banilor pe domenii de activitate.



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 2145
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved