Die Zeilen Jahr und Monat müssten raus mit dem Zahlen in der Ini.
Schleife:
Delphi-Quellcode:
For i := 0 to ComponentCount - 1 do
begin
if (TEdit(Components[i]).Name = 'prodLK') or (TEdit(Components[i]).Name = 'unprodLK') or (TEdit(Components[i]).Name = 'GehaltServ') or
(TEdit(Components[i]).Name = 'PersonalNK') or (TEdit(Components[i]).Name = 'Berufsbekl') or (TEdit(Components[i]).Name = 'KostenServ') or
(TEdit(Components[i]).Name = 'AnschKostFremd') then
ini.WriteString('Daten'+(Jahr.text),(Components[i] as TEdit).name,(Components[i] as TEdit).text)
else if Components[i] is TCombobox then
ini.WriteString('Summen'+(Jahr.Text)+(Monat.Text),(Components[i] as TCombobox).name,((Components[i] as TCombobox).text));
end;
Danke