protsedura Tform1.autorachet(Sender: TObject);
varn,l:longint; maksimal: kengaytirilgan;
boshlanishi
n:=1;
maksimal:=0;
takrorlang
sg1 bilan boshlang
agar katakchalar[0,n]<>'' keyin boshlang
hujayralar[4,n]:=inttostr(strtoint(hujayralar[1,n])+strtoint(hujayralar[2,n])-strtoint(hujayralar[3,n]));
katakchalar[6,n]:=floattostr(strtoint(hujayralar[4,n])*strtofloat(hujayralar[5,n])/1000);
agar strtofloat(cells[6,n])>max bo'lsa, start l:=n; max:=strtofloat(hujayralar[6,n]);end;
oxiri;
oxiri;
n:=n+1;
n>=sg1.rowCount gacha;
memo1.Lines.Insert(0,DateTimeToStr(Now)+' - Hisoblash tugallandi. Maksimal SVOCOR '+ floattostr ( max )+' RUB y '+ sg 1. katakchalar [0, l ]);
oxiri;
protsedura TForm1.Button6Click(Sender: TObject);
varn:longint;
boshlanishi
salvationlog1 bilan boshlang
title:='Ma'lumotlar bazasini saqlash';
agar bajarilsa
boshlanishi
filenamezap:=fayl nomi;
tayinlash fayli (filezap, fayl mezap);
qayta yozish (fayl bilan);
n:=0;
takrorlang
mzap[n].prod:='';
mzap[n].onng:=0;
Mzap[n].plan:=0;
mzap[n].onkg:=0;
mzap[n].svocep:=0;
n:=n+1;
n>=200 gacha;
n:=1;
takrorlang
agar sg1.Cells[0,n]<>'' bo'lsa, boshlang
Mzap[n].prod:=sg1.Cells[0,n];
Mzap[n].onng:=strtoint(sg1.cells[1,n]);
Mzap[n].plan:=strtoint(sg1.cells[2,n]);
Mzap[n].onkg:=strtoint(sg1.cells[3,n]);
Mzap[n].svocep:=strtofloat(sg1.cells[5,n]);
oxiri;
n:=n+1;
n>=sg1.RowCount gacha;
uchun n:=1 dan 100 gacha yozing(filezap,mzap[n]);
yopiq fayl (fayl fayli);
oxiri;
oxiri;
memo1.Lines.Insert(0,DateTimeToStr(Now)+' - Ma'lumotlar bazasi '+filenamezap) sifatida saqlangan;
oxiri;
rocedure TForm1.Button5Click(Sender: TObject);
varn,k:longint;
boshlanishi
opendialog1 bilan boshlang
title:= ' Ochilish bazasi';
agar bajarilsa
boshlanishi
filenamezap:=fayl nomi;
tayinlash fayli (filezap, fayl mezap);
asl holatini tiklash (fayl fayli);
n:=0;
takrorlang
mzap[n].prod:='';
mzap[n].onng:=0;
Mzap[n].plan:=0;
mzap[n].onkg:=0;
mzap[n].svocep:=0;
n:=n+1;
n>=200 gacha;
n:=1;
eof (filezap) bo'lmasa ham
boshlanishi
o'qing (filezap, mzap [n]);
n:=n+1;
oxiri;
cleansg(jo'natuvchi);
n:=0;k:=1;
takrorlang
agar Mzap[n].prod<>'' keyin boshlang
sg1.Cells[0,k]:=Mzap[n].prod;
sg1.Cells[1,k]:=inttostr(Mzap[n].onng);
sg1.Cells[2,k]:=inttostr(Mzap[n].plan);
sg1.Cells[3,k]:=inttostr(Mzap[n].onkg);
sg1.Cells[5,k]:=floattostr(Mzap[n].svocep);
k:=k+1;
oxiri;
n:=n+1;
n>=200 gacha;
autorachet (jo'natuvchi);
oxiri;
oxiri;
memo1.Lines.Insert(0,DateTimeToStr(Now)+' - Ma'lumotlar bazasi '+filenamezap+ ' ochildi');
oxiri;
// protsedura olib tashlash yozuvlar
Do'stlaringiz bilan baham: |