|

楼主 |
发表于 2009-2-9 16:21:47
|
显示全部楼层
这段代码一加上去就报如上错误,不加编译正常
procedure TSWF.ToolButton10Click(Sender: TObject);
begin
showYJ();
end;
procedure TSWF.showYJ();
var
showBJCLYJ : XYPSYY.TMainForm ;
bFind: Boolean;
begin
strLCTaskGUID := FlowBroker1.flowcontrol.CurrentTask.GUID;
strLCNodeDisplayName := FlowBroker1.FlowControl.CurrentProcUnit.DisplayName;
showBJCLYJ := XYPSYY.TMainForm.Create(Self.Context);
try
bFind := dsbSWYJ.DataSet.Locate('FWYJGUID', IFHaveYJ, []);
if bFind then
begin
showBJCLYJ.RichEdit1.Text := dsbSWYJ.DataSet.FieldByName('YJ').AsString;
end;
showBJCLYJ.ShowModal;
if showBJCLYJ.ModalResult = Business.Forms.Controls.mrOk then
begin
if bFind then
dsbSWYJ.DataSet.edit
else
dsbSWYJ.DataSet.Append;
dsbSWYJ.DataSet.FieldByName('YJ').AsString := showBJCLYJ.RichEdit1.Text;
dsbSWYJ.DataSet.FieldByName('LCHJID').AsString := strLCTaskGUID;
dsbSWYJ.DataSet.FieldByName('LCHJMC').AsString := strLCNodeDisplayName;
dsbSWYJ.DataSet.ApplyUpdates(false);
DocView1.Doc.Close;
DocView1.OpenView(TDocMode.dmEdit);
end;
finally
showBJCLYJ.Free;
dsbSWYJ.DataSet.Filter :='';
dsbSWYJ.DataSet.Filtered := true ;
end;
end; |
|