错误是报在这行的,提交dsb_YJD时候的错误
procedure TYJDSB.updateZTRefresh(aZT:integer);
begin
//更新审核状态
with dsb_YJD.dataset do
begin
edit;
fieldByName('SHZT').asInteger:=aZT;
//上报时间
// fieldByName('SBSJ').asDateTime:=business.Data.SysSrv.SysService.Time;
// fieldByName('SBR').asString:=SYSFUNCLIB.TFUNJustep.GetCurrentLoginUserID(context);
post;
applyUpdates(false);
end;
refreshMasterDs;
end;
因为之前
procedure TYJDSB.flbBeforeFlowOut(Sender: TObject; Command: TFlowOutCommand);
var lstatus:integer;
msg:string;
begin
Inherited;
msg:='';
if dsb_YJD.dataset.isEmpty then exit;
//若有修改,则提示先保存
with dsb_YJD.dataset do
begin
try
if (State in DB.dsEditModes) then
post;
except
on e:Exception do
begin
dialogs.showMessage(e.message);
sysutils.abort;
end;
end;
if updatesPending then
case jsDialogs.QuestionBox('数据已经修改,在流转之前要保存吗?!', '询问..', 1) of
6: //保存
ApplyUpdates(false);
7: //否
begin
CancelUpdates(false);
edit;
try
post;
except
on e:Exception do
begin
dialogs.showMessage(e.message);
sysutils.abort;
end;
end;
end;
2: //取消
begin
Command.accept:=false;
exit;
end;
end; //case
lStatus:=fieldByName('SHZT').asInteger;
case lStatus of
1,2,3,4: msg:=dsb_YJD.dataset.fieldByName('SHZT').displayText+' ,不能流转!';
end;
end; //with
if msg<>'' then
begin
dialogs.showMessage(msg);
command.accept:=false;
exit;
end;
//设置业务参数的值????
end;
已经提交了一次