1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
StringGrid1.BeginUpdate;
StringGrid1.RowCount:=0;
for I :=1 to FrameMemoLineCount1.Mtxt.Lines.count-1 do
begin
ProgressBar1.Value:=ProgressBar1.Value+1;
Application.ProcessMessages;
if FrameMemoLineCount1.Mtxt.Lines[i].IsEmpty then Continue;
StringGrid1.RowCount:=StringGrid1.RowCount+1;
StringGrid1.Cells[0,i-1]:=I.ToString;
SP:=FrameMemoLineCount1.Mtxt.Lines[i].Split([',']);
StringGrid1.Cells[1,i-1]:=SP[pospn]; // part number
StringGrid1.Cells[2,i-1]:=SP[posmu]; // item code
StringGrid1.Cells[3,i-1]:=SP[pospiece]; // Piece
StringGrid1.Cells[4,i-1]:=EmptyStr;
if not SP[posmu].StartsWith('MU') then StringGrid1.Cells[4,i-1]:='Erreur';
end;
StringGrid1.EndUpdate; |