Ф-ОБ-001/033
76
if QryCost.Value > i then Exit;
for i:=0 to CheckTransp.Items.Count-1 do
begin
j:= integer(CheckTransp.Items.Objects[i]);
if (QryTranspId.Value = j) and not CheckTransp.Checked[i] then Exit;
end;
Accept:=true;
end;
// фильтрация панелін көрсету/жасыру
procedure TFrmmain.CheckFilterClick(Sender: TObject);
begin
CheckIn.Enabled :=CheckFilter.Checked;
qry.Filtered := CheckFilter.Checked;
Refresh;
end;
// фильтрация параметрлерін өзгерту
procedure TFrmmain.CheckInClick(Sender: TObject);
begin
Refresh;
end;
// көлік түрлерін жүктеу
procedure TFrmmain.LoadFiltres;
begin
with dm do
begin
with TblStarns do
begin
Open;
First;
ComboStran.Items.Clear;
ComboStran.Items.AddObject('<Все равно>', Pointer(-1));
while not eof do
begin
ComboStran.Items.AddObject(TblStarnsName.Value,
Pointer(TblStarnsId.Value));
Next;
end;
Close;
ComboStran.ItemIndex := 0;
end;
ComboStranChange(nil);
with TblTranspType do
begin
Ф-ОБ-001/033
77
Open;
First;
CheckTransp.Items.Clear;
while not eof do
begin
CheckTransp.Items.AddObject(TblTranspTypeName.Value,
Pointer(TblTranspTypeId.Value));
CheckTransp.Checked[CheckTransp.Items.Count-1] := True;
Next;
end;
Close;
end;
end;
Refresh;
end;
//фильтрацияда аудандармен комбобоксте өзгерту
procedure TFrmmain.ComboStranChange(Sender: TObject);
var i:integer;
begin
i:= ComboStran.ItemIndex;
ComboSity.Items.Clear;
ComboSity.Items.AddObject('<бәрібір>', Pointer(-1));
ComboSity.ItemIndex := 0;
if i<1 then Exit;
i:= integer(ComboStran.Items.Objects[i]);
with dm, TblSity do
begin
Open;
First;
while not eof do
begin
if TblSityCountryId.Value = i then
ComboSity.Items.AddObject(TblSityName.Value, Pointer(TblSityId.Value));
Next;
end;
Close;
end;
Refresh;
end;
1>
Достарыңызбен бөлісу: |