|
我做完一张单子,保存成功后,点击审核按钮报错
procedure TREPORTLIST.btnCheck1Click(Sender: TObject);
var
lContextCurrent:TContextCurrent;
begin
if cbGoodsName.Text.Trim='' then
exit;
if GetBillCheckState('JYBGD','BGDH',dsbCCBGD.DataSet.FieldByName('BGDH').AsString,1)=1 then
exit;
if Forms.Application.messagebox('您确定要审核这张单据吗?','提示',MB_OKCANCEL+mb_iconquestion)<>Business.Forms.Controls.mrOK then
exit;
dsbCCBGD.DataSet.Edit;
try
lContextCurrent:=TContextCurrent.Create(Self.Context);
dsbCCBGD.DataSet.FieldByName('SHR').AsString:=lContextCurrent.Operator.DisplayName;
finally
lContextCurrent.Free;
end;
dsbCCBGD.DataSet.FieldByName('SH').AsInteger:=1;
dsbCCBGD.DataSet.FieldByName('State').AsString:='出厂检验报告已审核';
dsbCCBGD.DataSet.FieldByName('SHSJ').AsDateTime:=Business.Data.SysSrv.SysService.Time;
dsbCCBGD.DataSet.ApplyUpdates;
提示这个ApplyUpdates出错,但是只有一个用户在用,而且肯定是有这张单子的。
|
|