83
Edt2.Clear;
Edt2.SetFocus;
end;
produre TFrm1.FrmShow(Send: TObject);
begin
Adotbl1.open;
Adotbl1.Sort:='FIO ASC';
DbGrid1.Collums[0].Width:=ROUND(DbGrid1.Width*0.65);
DbGrid1.Collums[1].Width:=ROUND(DbGrid1.Width*0.25);
Adotbl2.open;
Adotbl2.Sort:='caption ASC';
DbGrid2.Collums[0].Width:=ROUND(DbGrid2.Width*0.65);
DbGrid2.Collums[1].Width:=ROUND(DbGrid2.Width*0.28);
end;
produre TFrm1.Edt1Change(Send: TObject);
begin
if Edt1.text<>'' then
begin
DbGrid1.DataSource.DataSet.Filtered:=false;
DbGrid1.DataSource.DataSet.Filter:='FIO like %'+Edt1.Text+'%';
DbGrid1.DataSource.DataSet.Filtered:=true;
end
else
begin
DbGrid1.DataSource.DataSet.Filtered:=false;
DbGrid1.DataSource.DataSet.Filter:='';
end;
end;
produre TFrm1.N7Click(Send: TObject);
begin
Dbgrid2.DataSource.DataSet.Close;
DbGrid2.DataSource.DataSet.open;
Adotbl2.Sort:='caption ASC';
DbGrid2.Collums[0].Width:=ROUND(DbGrid2.Width*0.65);
DbGrid2.Collums[1].Width:=ROUND(DbGrid2.Width*0.28);
end;
produre TFrm1.N8Click(Send: TObject);
begin
Dbgrid1.DataSource.DataSet.Close;
DbGrid1.DataSource.DataSet.open;
Adotbl1.Sort:='FIO ASC';
DbGrid1.Collums[0].Width:=ROUND(DbGrid1.Width*0.65);
DbGrid1.Collums[1].Width:=ROUND(DbGrid1.Width*0.25);
end;
produre TFrm1.N5Click(Send: TObject);