var
bUrl:TBizUrl;
lFunc:TFunc;
lCCurrent:TContextCurrent;
begin
lCCurrent:=TContextCurrent.Create(self.Context);
try
bUrl:=TBizUrl.Create;
bUrl.URL :='Biz:\ECIS\FUNC_SYSHELP_EDT.FUNC';
lFunc:=lCCurrent.GetFunc(bUrl);
if lFunc.UpdatesPending then
begin
if JSDialogs.QuestionBox(lFunc.DisplayName +' 的数据已经修改,是否保存?','系统提示',1)=Windows.IDYES then
lFunc.ApplyUpdates
else
Canclose:=false;
end;
finally
lCCurrent.Free ;
end;
end;
var
lFunc:TFunc;
begin
lFunc := FuncBroker.Func;
if DataSetBroker1.dataset.UpdatesPending then
begin
if JSDialogs.QuestionBox(lFunc.DisplayName +' 的数据已经修改,是否保存?','系统提示',1)=Borland.Delphi.Windows.IDYES then
lFunc.ApplyUpdates
else
Canclose:=false;
end;
end;