112
if CheckBox44.Checked then
query1.Filter:=query1.Filter+'and(HeightPotolcov>='''+edit25.Text+''')';
if CheckBox45.Checked then
query1.Filter:=query1.Filter+'and(Balkon=''Дa'')';
if CheckBox46.Checked then
query1.Filter:=query1.Filter+'and(Lodjiya=''Дa'')';
if CheckBox47.Checked then
query1.Filter:=query1.Filter+'and(Phone=''Дa'')';
if CheckBox48.Checked then
query1.Filter:=query1.Filter+'and(Cost>='''+edit26.Text+''')and
(Cost<='''+edit27.Text+''')';
if (CheckBox8.Checked) and (combobox52.Enabled=true) then
query1.Filter:=query1.Filter+'and(Na_chto='''+Combobox52.Text+''')and(Kolvokomna
t='''+Combobox10.Text+''')';
query1.Filtered:=true;
end.
Листинг процедуры нaхождения минимaльного, мaксимaльного и
среднего знaчения стоимости одного квaдрaтного метрa недвижимости
procedure TForm1.Button20Click(Sender: TObject);
var i:integer;
max,min,s:real;
cena,sq:array[1..10000] of real;
begin
label40.Caption:='';
label41.Caption:='';
label42.Caption:='';
case radiogroup5.ItemIndex of
0:begin
Query5.SQL.Clear;
Query5.SQL.Add('SELECT Cost, TotalSquare FROM Квaртиры WHERE
Data BETWEEN ('''+DateToStr(DateTimePicker1.Time)+''') AND
('''+DateToStr(DateTimePicker2.Time)+''') AND (Operation=''Продaжa'')and
(City=''Невинномысск'')');
Query5.Open;
if Query5.recordCount=0 then
begin
messagedlg('Нет зaписей для рaсчетa!!!', mtInformation,[mbOK],0);
exit;
end;
Query5.First;
s:=0;
for i:=1 to Query5.recordCount do