UNIVERSITATEA DIN
FACULTATEA DE STIINTE ECONOMICE
FACULTATEA DE STIINTE ECONOMICE
ANEXA NR 22
Se considera urmatoarea structura de date privind balanta de verificare omolistica ( cantitativa ) a contului materiale:
Denumirea contului omolistic ( tip material ) 424d37e
Unitate de masura
Stoc initial
Cantitate intrata
Cantitate iesita
Campurile se repeta conform numarului de materiale. Pentru fiecare cont sa se calculeze stocul final. Sa se afiseze antet, titlu, cap de tabel. Lista contine: nr .crt. toate datele de mai sus si stocul final. Sa se afiseze si sa se calculeze materialele cu stoc final mai mult de 100 de unitati.
STRUCTURA BAZEI DE DATE
NUME |
TIP |
LUNGIME |
DENUMIRE CONT |
CARACTER | |
UNITATE DE MASURA |
CARACTER | |
STOC INITIAL |
NUMERIC | |
CANTITATE INITIALA |
NUMERIC | |
CANTITATE FINALA |
NUMERIC |
PROCEDURA PRINCIPAL
![]() | ![]() | ![]() | ![]() |
||||
![]() | ![]() |
||
Do principal
close all
set status on
set menu on
set talk on
set clock off
set escape on
procedure principal
deactivate window all
public log
Log=.T.
do while log=.T.
Define window w2 from 0 to 23,68 double color n/g
Activate window w2
define menu princ_1 message 'GESTIUNE MARFA'
define pad opt_1 of princ_1 prompt 'introducere date'
define pad opt_2 of princ_1 prompt 'listare date'
define pad opt_3 of princ_1 prompt 'stergere date'
define pad opt_4 of princ_1 prompt 'iesire'
on selection pad opt_1 of princ_1 do INTRODUCERE
on selection pad opt_2 of princ_1 do LISTARE
on selection pad opt_3 of princ_1 do STERGERE
on selection pad opt_4 of princ_1 do STOP
Activate menu princ_1
Deactivate window w2
Release window w2
Enddo
return
procedure introducere
ciclul=.T.
define window wl from 1,9 to 22,68 title 'introducere date'
activate window wl
use d:FPD26marfa.dbf
optiune 1='N'
m.DENUMIRE_CONT=space(20)
m.UNITATE_DE_MASURA=space(10)
m.STOC_INITIAL=space(5)
m.CANTITATE_INTRATA=space(5)
m.CANTITATE_IESITA=space(5)
do while ciclu=.T
say 'DENUMIRE_CONT:' get m. DENUMIRE_CONT picture 'XXXXXXXXXXXXXXXXXXXX'
say 'UNITATE_DE_MASURA:' get m. UNITATE_DE_MASURA picture 'XXXXXXXXXX'
say 'STOC_INITIAL:' get m. STOC_INITIAL picture '99999'
say 'CANTITATE_INTRATA:' get m.CANTITATE_INTRATA picture '99999'
say ' CANTITATE_IESITA:' get m. CANTITATE_IESITA picture '99999'
read
append blank
replace DENUMIRE_CONT with m.DENUMIRE_CONT
replace UNITATE_DE_MASURA with m. UNITATE_DE_MASURA
replace STOC_INITIAL with m. STOC_INITIAL
replace CANTITATE_INTRATA: with m.CANTITATE_INTRATA:
replace CANTITATE_IESITA with m. CANTITATE_IESITA
say 'Mai sunt conturi de introdus? (D/N)' get optiune 1 picture '!' valid optiune 1='D'.or.optiune 1='N' error 'D pentru DA, N pentru Nu' color r+/n+
read
if optiune 1='D'
m.DENUMIRE_CONT =space(20)
m.UNITATE_DE_MASURA =space(10)
m.STOC_INITIAL =space(5)
m.CANTITATE_INTRATA:=space(5)
m.CANTITATE_IESITA =space(5)
else
set bell to 1500,1
?? chr(7)
clear
ciclul=.F.
deactivate window wl
release window wl
endif
enddo
return
procedure stergere
use d:FPD26marfa.dbf
count from 1
brow normal title 'Pozitionare cu sageti, stergere cu Ctrl+T, Iesire cu Ctrl+w'
pack count to n
if n<1 then
wait 'stergere efectuata cu succes' window time 3
else
do ALARM
Wait 'stergere neefectuata' window time 4
endif
procedure listare
set talk off
use d:FPD26marfa.dbf
do NR
report from c:raport to file c:r.txt
modi comm.R.txt noedit
clear
return
procedure stop
set bell to 2000,1
??? chr(7)
set bell to 1000,2
??? chr(7)
set cursor off
say 'Gata'
set cursor on
log=.F.
deactivate menu
return
procedure nr
X=1
do while.not.eof()
replace nr_crt with x
X=x+1
skip
enddo
return
procedure alarm
sun
do while sun 1<=3
sun 2=1
inte=1500
do while sun 2<=6
set bell to inte,1
??chr(7)
inte=inte+50
sun 2= sun 2+1
enddo
enddo
return
|