Рефераты. Расчет стоимости пластиковых оконных конструкций и дверей

ton:=ComboBox3.Text;

senton:=h7;end;

if ComboBox3.Text='Стекло 4мм' then begin

ton:=ComboBox3.Text;

senton:=h8;end;end;

procedure TForm17.SpeedButton1Click(Sender: TObject);

begin  form22.Show;end;end.


unit Unit18;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Buttons, StdCtrls, Spin, jpeg, ExtCtrls,unit1,unit8;

type

TForm18 = class(TForm)

Image1: TImage; Label1: TLabel; Label2: TLabel; SpeedButton8: TSpeedButton;

RadioButton1: TRadioButton;RadioButton2: TRadioButton;ComboBox1: TComboBox;

SpinEdit1: TSpinEdit; CheckBox1: TCheckBox;

procedure SpeedButton8Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var  Form18: TForm18;

h100,h150,h200,h250,h300,h350,h400,h450,h500,h600,h700,h800:string;

implementation

{$R *.dfm}

procedure TForm18.SpeedButton8Click(Sender: TObject);

Var f:textfile;k:integer;l,z:real;

begin  l:=0; z:=0;

if Form8.StringGrid2.Cells[2,1]='да' then begin

Showmessage('На окно можно ставить только один подоконник!');

Close; end   else

if (RadioButton1.Checked<>true)and(RadioButton2.Checked<>true)

then Showmessage('Сначала что-нибудь нужно выбрать!')

else

if (Combobox1.Text='')or(SpinEdit1.Value<=0)then

Showmessage('Введите все необходимые данные!')

else begin

if RadioButton2.Checked=True then begin

markP:='Ulьtra';

{$I-}

AssignFile(f,dir+'\Цены\Подоконники\Ultra.dat');

{$I+}

If IOResult=0 then begin     Reset(f);

while not EoF(f) do begin

readln(f,h100); readln(f,h150);

readln(f,h200); readln(f,h250);

readln(f,h300); readln(f,h350);

readln(f,h400); readln(f,h450);

readln(f,h500); readln(f,h600);

readln(f,h700); readln(f,h800); end;

if Combobox1.Text='100' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h100);

podsen:=floattostr(l);

razpod:='100'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then  l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да'; end;

if Combobox1.Text='150' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h150);

podsen:=floattostr(l);

razpod:='150'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then  l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='200' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h200);

podsen:=floattostr(l);

razpod:='200'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='250' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h250);

podsen:=floattostr(l);

razpod:='250'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='300' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h300);

podsen:=floattostr(l);

razpod:='300'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='350' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h350);

podsen:=floattostr(l);

razpod:='350'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='400' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h400);

podsen:=floattostr(l);

razpod:='400'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='450' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h450);

podsen:=floattostr(l);

razpod:='450'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='500' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h500);

podsen:=floattostr(l);

razpod:='500'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='600' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h600);

podsen:=floattostr(l);

razpod:='600'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='700' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h700);

podsen:=floattostr(l);

razpod:='700'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='800' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h800);

podsen:=floattostr(l);

razpod:='800'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

end else begin Exit;

Showmessage('Ошибка чтения файла цены');   end;  CloseFile(f); Close; end;

if RadioButton1.Checked=True then begin

markP:='Moller';

{$I-}

AssignFile(f,dir+'\Цены\Подоконники\Moller.dat');

{$I+}

If IOResult=0 then begin

Reset(f);

while not EoF(f) do begin

readln(f,h150);  readln(f,h200);

readln(f,h250);  readln(f,h300);

readln(f,h350);  readln(f,h400);

readln(f,h450);  readln(f,h500);

readln(f,h600);  end;

if (Combobox1.Text='100')or(Combobox1.Text='700')or(Combobox1.Text='800') then

Showmessage('Такого размера нет, выберите другой!')

else begin

if Combobox1.Text='150' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h150);

podsen:=floattostr(l);

razpod:='150'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then  l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='200' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h200);

podsen:=floattostr(l);

razpod:='200'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='250' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h250);

podsen:=floattostr(l);

razpod:='250'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[0,6]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='300' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h300);

podsen:=floattostr(l);

razpod:='300'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='350' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h350);

podsen:=floattostr(l);

razpod:='350'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='400' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h400);

podsen:=floattostr(l);

razpod:='400'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='450' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h450);

podsen:=floattostr(l);

razpod:='450'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='500' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h500);

podsen:=floattostr(l);

razpod:='500'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;

if Combobox1.Text='600' then begin

l:=(SpinEdit1.Value*0.001)*strtofloat(h600);

podsen:=floattostr(l);

razpod:='600'+'x'+inttostr(SpinEdit1.Value);

if CheckBox1.Checked=true then   l:=l+2.1;

z:=strtofloat(Form8.StringGrid2.Cells[6,1])+l;

Form8.StringGrid2.Cells[6,1]:=floattostr(z);

Form8.StringGrid2.Cells[2,1]:='да';   end;      Close

end; end else begin Exit; Showmessage('Ошибка чтения файла цены');   end;

CloseFile(f);   end;end;end;end.


unit Unit19;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Страницы: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13



2012 © Все права защищены
При использовании материалов активная ссылка на источник обязательна.