Контрольная работа: Разработка программного комплекса
for i := 1 to StringGrid1.RowCount - 2 do
begin
TableRowToWorker(i,StringGrid1);
DecodeDate(Worker.StartWork,y1,m1,d1);
if y2 = y1 then
Workers[i] :=Worker;
end;
if (Length(Workers) > 3) then
QuickSort(Workers,1, Length(Workers))
else
if Workers[1].BirthDay < Workers[1].BirthDay then
begin
worker :=Workers[1];
Workers[1] := Workers[2];
Workers[2] := worker;
end;
Form6.FillTable(Workers);
Form6.ShowModal;
end
else
if ComboBox1.ItemIndex = 3 then
begin
SetLength(Workers, StringGrid1.RowCount - 2);
for i := 1 to StringGrid1.RowCount - 2 do
begin
TableRowToWorker(i,StringGrid1);
Workers[i-1] :=Worker;
end;
Form7.FillTable(Workers);