function TCPPSXX.GetDocID :string;
begin
with DataSetCPZLSJJ do
if (not Active) or IsEmpty then
Result :=''
else
Result := FieldByName('cp_cpbh').AsString;
end;
然后我在功能中调用:
并且也作了类型转换,代码如下:
function TZCT.GetDocInfo: TCPPSXX;
begin
Result := InfoBroker.info as TCPPSXX;
end;
function TZCT.GetCanProcess(out WarningMsg:string) :Boolean;
begin
WarningMsg :='';
Result :=true;
if GetDocInfo.DocID = '' then
begin
Warning :='文档数据为空';
Result := True;
end
end;
在此处调用不到DocID这个属性。