Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TForm1.N2Click(Sender: TObject);
- var
- f:Textfile;
- temp, x, y, i, delphishlak: integer;
- tempstr, shit: string;
- begin
- assignfile(f,'Сотрудники.txt');
- reset(f);
- readln(f, temp);
- StringGrid1.colcount := temp;
- readln(f, temp);
- StringGrid1.rowcount := temp;
- for X := 0 to StringGrid1.colcount - 1 do
- for y := 0 to StringGrid1.rowcount - 1 do
- begin
- readln(F, tempstr);
- StringGrid1.cells[x, y] := tempstr;
- end;
- closefile(f);
- stringgrid1.Visible:=true;
- stringgrid1.Cells[9,0]:='Стаж';
- for i:=1 to StringGrid1.rowcount - 1 do
- begin
- shit := StringGrid1.Cells[5,i];
- Delete(shit, 1, 6);
- delphishlak := 2017 - StrToInt(shit);
- StringGrid1.Cells[9,i]:=IntToStr(delphishlak);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement