143
fmain.DobZap.SQL.Clear;
fmain.DobZap.SQL.Add('DELETE From Успеваемость Where
ИДУчебНагрузка = '+IntToStr(fmain.DBLookupListBox1.KeyValue)+' AND
ИДУчащийся =' + IntToStr(id[i]));
fmain.DobZap.ExecSQL;
if fmain.StringGrid1.Cells[1,i] <> '' then
begin
fmain.DobZap.SQL.Clear;
fmain.DobZap.SQL.Add('Insert INTO
Успеваемость(ИДУчебНагрузка,ИДУчащийся,1_четверть,2_четверть,3_четверть
,4_четверть,1_полугодие,2_полугодие,годовая) VALUES
('+IntToStr(fmain.DBLookupListBox1.KeyValue)+','+IntToStr(id[i])+','+fmain.String
Grid1.Cells[1,i]+','+fmain.StringGrid1.Cells[2,i]+','+fmain.StringGrid1.Cells[3,i]+','+f
main.StringGrid1.Cells[4,i]+','+IntToStr(Ppol)+','+IntToStr(Vpol)+','+IntToStr(god)+')
');
fmain.DobZap.ExecSQL;
end;
end;
for i:=1 to fmain.Tuch.FieldCount do
begin
if fmain.StringGrid1.Cells[1,i] = IntToStr(0) then
fmain.StringGrid1.Cells[1,i]:='';
if fmain.StringGrid1.Cells[2,i] = IntToStr(0) then
fmain.StringGrid1.Cells[2,i]:='';
if fmain.StringGrid1.Cells[3,i] = IntToStr(0) then
fmain.StringGrid1.Cells[3,i]:='';
if fmain.StringGrid1.Cells[4,i] = IntToStr(0) then
fmain.StringGrid1.Cells[4,i]:='';
end;
fmain.BitBtn1.Enabled:=false;