新系统查询是否有信息修改记录
qry:=TADOQuery.Create(nil);
try
lblXxxg.Caption:='';
lblXxxgSfzh.Caption:='';
lblXxxg.visible:=false;
lblXxxgSfzh.Visible:=false;
qry.Connection:=connPrtvu;
qry.sql.text:='select sfzh,xm,nd,xqdm,ylsfzh,ylxm from xsxxgdb where xh='+''''+qryXJplus.fieldbyname('xh').asstring+'''';
qry.open;
if (qry.RecordCount>0) then
with qry do
begin
lblXxxg.visible:=true;
lblXxxg.Caption:=qry.fieldbyname('nd').AsString+'Äê'+ fieldbyname('xqdm').AsString+'ѧÆÚÓÐÐÞ¸Ä:';
lblXxxgSfzh.Visible:=True;
if (FieldValues['ylsfzh']<> null) and (FieldValues['sfzh']<> null) then
lblXxxgSfzh.caption:=Trim(fieldbyname('ylsfzh').AsString);
if (FieldValues['ylxm'] <>null) and (FieldValues['xm'] <>null) then
lblXxxgSfzh.caption:=lblXxxgSfzh.caption+Trim(fieldbyname('ylxm').AsString);
end;
finally
qry.Close;
qry.Free;
end;
try
lblXxxg.Caption:='';
lblXxxgSfzh.Caption:='';
lblXxxg.visible:=false;
lblXxxgSfzh.Visible:=false;
qry.Connection:=connPrtvu;
qry.sql.text:='select sfzh,xm,nd,xqdm,ylsfzh,ylxm from xsxxgdb where xh='+''''+qryXJplus.fieldbyname('xh').asstring+'''';
qry.open;
if (qry.RecordCount>0) then
with qry do
begin
lblXxxg.visible:=true;
lblXxxg.Caption:=qry.fieldbyname('nd').AsString+'Äê'+ fieldbyname('xqdm').AsString+'ѧÆÚÓÐÐÞ¸Ä:';
lblXxxgSfzh.Visible:=True;
if (FieldValues['ylsfzh']<> null) and (FieldValues['sfzh']<> null) then
lblXxxgSfzh.caption:=Trim(fieldbyname('ylsfzh').AsString);
if (FieldValues['ylxm'] <>null) and (FieldValues['xm'] <>null) then
lblXxxgSfzh.caption:=lblXxxgSfzh.caption+Trim(fieldbyname('ylxm').AsString);
end;
finally
qry.Close;
qry.Free;
end;