19-12-2008, 09:57 PM
اضن انه يوجد الان نوعا ما . اختصار . 

PHP كود :
procedure TForm1.table1CalcFields(DataSet: TDataSet);
var
i:Integer;
begin
i:=(DataSet.RecNo);
case i of
0..9:Table1['Code_Matier']:='Ar000'+inttostr(i);
10..99:Table1['Code_Matier']:='Ar00'+inttostr(i);
100..199:Table1['Code_Matier']:='Ar0'+inttostr(i);
end;
if i>=1000 then Table1['Code_Matier']:='Ar'+inttostr(i);
end;

