procedure TMAINFORM.DataSetBroker4DataChange(Sender: TObject; Field: TDataField);
var
bz:integer;
begin
if (Field <> nil) and (Field.FieldName = 'BXBM') then
begin
if not ( DataSetBroker4.DataSet.FieldByName('BXBM').IsNull )and ( DataSetBroker4.DataSet.FieldByName('BXBM').AsString <>'' ) then
begin
Query2.Close;
Query2.CommandText := 'select SFYWBM from BMDYB_BX where OABMMC = :a ';
Query2.Params.ParamByName('a').AsString := DataSetBroker4.DataSet.FieldByName('BXBM').AsString;
Query2.Open;
bz:= Query2.FieldByName('SFYWBM').AsInteger;
if bz =1 then
begin