Export of information from the directory of manufacturers (profile and hardware systems) to a file
Go to navigation
Go to search
uses Classes, SysUtils; const razdel='|'; nl=#$0D#$0A; var pri:TProizvodItem; i:integer; f:TStringStream; st:string; begin f:=TStringStream.Create; // первая строка - заголовки st:=; st:=st+'ID_Proizvod'+razdel; st:=st+'Наименование'+razdel; st:=st+'Тип ID'+razdel; st:=st+'Тип наименование'+razdel; st:=st+nl; f.WriteString(st); // for i:=0 to gd.Proizvods.Items.Count-1 do begin pri:=gd.Proizvods.Items.GetByNum(i); st:=; st:=st+inttostr(pri.Id)+razdel+pri.Name+razdel+inttostr(pri.Typ)+razdel; st:=st+ProizvodTypeItemKeeper.GetName(pri.Typ)+razdel; st:=st+nl; f.WriteString(st); end; f.SaveToFile('proizvods.txt'); f.Free; end;