Programalama > PASCAL

Etiketler: stok, takip, programi

Ort. 0
Puan ver:
program STOK_TAKiP;
uses crt,dos;
type
    st10=string[10];
    var
kod:array[1..100]of string[8];
stokadi:array[1..100]of string[20];
DOSYA:TEXT;
birim:array[1..10]of string[10];
miktar,afiat,sfiat:array[1..100]of longint;
i,j,m:byte;
tus:char;
cizgi:string[80];
satir:byte;
procedure cerceve(x1,y1,x2,y2:byte);
var
k:byte;
begin
GOTOXY(31,6);write('STOK KONTROL PROGRAMI');
textbackground(black);
gotoxy(x1,y1);write(#201);
for k:=x1+1 to x2-1 do write(#205);
write(#187);
FOR k:=y1+1 to y2-1 do
begin
gotoxy(x1,k);write(#186);
gotoxy(x2,k);write(#186);
end;
gotoxy(x1,y2);write(#200);
for k:=x1+1 to  x2-1 do write(#205);
write(#188);
end;
procedure ilkekran;
begin clrscr;
cerceve(1,1,80,24);
     cerceve(4,2,78,4);
cerceve(3,5,20,20);
     cerceve(22,5,60,7);
          cerceve(62,5,78,20);
     cerceve(3,21,20,23);
     cerceve(62,21,78,23);
     CERCEVE(23,21,55,23);


gotoxy(25,3);
write('hazırlayan:::ABDURRAHİM ');
end;
procedure stokbilgigir;
begin clrscr;
assign(dosya,'stokkontrol.txt') ;
reset(dosya);


append(dosya);
if m<100 then
begin
m:=m+1;
gotoxy(20,5);write(m,'.stok kodu..:');readln(kod[m]);
gotoxy(20,7);write('stok ad......:');readln(stokadi[m]);
gotoxy(20,9);write('birimi........:');readln(birim[m]);
gotoxy(20,11);write('miktar.......:');readln(miktar[m]);
gotoxy(20,13);write('al&#376; fiat....:');readln(afiat[m]);
gotoxy(20,15);write('sat&#376; fiat...:');readln(sfiat[m]);
end
else
begin
gotoxy(20,10);write('daha fazla bilgi girilmez.');
tus:=readkey;
end;
end;
procedure baslik;
begin clrscr;
write('kod');
gotoxy(10,1);write('stok adi');
gotoxy(35,1);write('birim');
gotoxy(54,1);write('miktar');
gotoxy(63,1);write('a-fiat');
gotoxy(73,1);write('s-fiat');
writeln(cizgi);
end;
procedure stoklistesi;
begin baslik;
for i:=1 to m do
begin
if i/2=trunc(i/2) then lowvideo else highvideo;
gotoxy(1,i+2);write(kod[i]);
gotoxy(10,i+2);write(stokadi[i]);
gotoxy(35,i+2);write(birim[i]);
gotoxy(50,i+2);write(miktar[i]:10);
gotoxy(55,i+2);write(afiat[i]:10);
gotoxy(66,i+2);write(sfiat[i]:10);
normvideo;
if i/20=trunc(i/20) then
begin
gotoxy(25,25);
write('di§er sayfa i&#8225;in bir tu&#376;a basnz.');
tus:=readkey;baslik;
end;
end;
gotoxy(25,25);
write('listelenecek kaytlat bitti...');
tus:=readkey;
end;
procedure yaz;
begin clrscr;
gotoxy(10,5);writeln('stok kodu....:',kod[i]);
gotoxy(10,7);writeln('stok adi.....:',stokadi[i]);
gotoxy(10,9);writeln('birimi.......:',birim[i]);
gotoxy(10,10);writeln('miktar.....:',miktar[i]:10);
gotoxy(10,11);writeln('al&#376; fiat..:',afiat[i]:10);
gotoxy(10,13);writeln('sat&#376; fiat.:',sfiat[i]:10);
end;
procedure stokgircik(gelen:boolean);
var
ara:string[20];
g:longint;
begin
repeat
clrscr;
cerceve(20,9,60,11);
gotoxy(22,10);write('stok kodu..:');readln(ara);
if ara ="then exit ;
for i:=1 to m do
begin
if kod[i]=ara then
begin
yaz;
gotoxy(10,19);write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
gotoxy(10,20);write('ºi&#376;lem yaplacak stok bu mu? [E/H]        º');readln(tus);
gotoxy(10,21);write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
repeat
tus:=upcase(readkey);
until tus in ['E','H'];
if tus='E' then
begin
if gelen then
begin
gotoxy(10,15);write('giri&#376; miktar=');
readln(g);
miktar[i]:=miktar[i]+g;
end
else begin
gotoxy(10,15);write('&#8225;k&#376; miktar=');
readln(g);
if g>miktar[i] then
begin
gotoxy(10,20);
write('stok miktar yeterli de§il',#7);
tus:=readkey; exit;
end;
end;
gotoxy(10,22);
write('kalan stok miktar=',miktar[i]);
tus:=readkey; exit;
end;
end;end;
gotoxy(10,23);write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»') ;
gotoxy(10,24);write('ºarad§nz kayt yok..     º ');
gotoxy(10,25);write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ') ;
tus:=readkey;
until 1=2;
end;
procedure stoksilme;
var
ara:string[20];
begin
repeat
clrscr;
gotoxy(22,10);
write('silinecek stok kodu..:');readln(ara);
if ara="then exit;
for i:=1 to m do
begin
yaz;
gotoxy(10,20);

write('silinecek stok bu mu? [e/h]');
repeat
tus:=upcase(readkey);
until tus in['E','H'];
if tus='E' then
begin clrscr;
gotoxy(30,12);write('lutfen bekleyiniz...',#7);
for j:=i to m-1 do
begin
kod[j]:=kod[j+1];
stokadi[j]:=stokadi[j+1];
birim[j]:=birim[j+1];
miktar[j]:=miktar[j+1];
afiat[j]:=afiat[j+1];
sfiat[j]:=sfiat[j+1];
end;
m:=m-1;
GOTOXY(25,11);WRITE('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» ');
gotoxy(25,12);write('º i&#376;lem tamamland. bir tu&#376;a basnz     º ',#7 );
GOTOXY(25,13);WRITE('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ')  ;
tus:=readkey;
exit;
end;
end;
gotoxy(22,12);write('ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»');
gotoxy(22,13);write('ºarad§nz kayt yok...:      º ');
gotoxy(22,14);write('ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ');
tus:=readkey;
until 1=2;
end;
begin
m:=0;
fillchar(cizgi,80,205);
cizgi[0]:=#79;
repeat
ilkekran;textcolor(yellow);
gotoxy(30,9);write('1-  STOK B&#732;LG&#732; G&#732;R&#732;&#382;&#732;   ');
gotoxy(30,11);write('2- STOK L&#732;STES&#732;         ');
gotoxy(30,13);write('3- STOK G&#732;R&#732;&#382; (Al&#376;) ');
gotoxy(30,15);write('4- STOK &#8364;IKI&#382; (Sat&#376;)');
gotoxy(30,17);write('5- STOK S&#732;LME        ');
gotoxy(30,19);write('6- &#8364;IKI&#382;               ');
gotoxy(30,22);write(' Se&#8225;iminiz [1..6]      ');
REPEAT
tus:=readkey;
until tus in ['1'..'6'];
case tus of
'1':stokbilgigir;
'2':stoklistesi;
'3':stokgircik(true);
'4':stokgircik(false);
'5':stoksilme;
'6':begin clrscr; halt;end;
end; {   case   }
until 1=2;
close(dosya);
readln;
end.


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2019 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.