procedure TJXJLLRWIN.FlowBroker1BeforeFlowOut(Sender: TObject; Command: TFlowOutCommand);
begin
if DSBMain.DataSet.IsEmpty then
begin
Command.Accept := false;
JsDialogs.ShowMsg('请添加检修记录!','提示');
end;
end;
procedure TJXJLLRWIN.FlowBroker1AfterFlowOut(Sender: TObject; Command: TFlowOutCommand);
begin
DSBMain.DataSet.Edit;
//if DSBMain.DataSet.FieldByName('XZ').AsBoolean then
DSBMain.DataSet.FieldByName('SBJXJLZB_ZT').AsInteger := 1;
DSBMain.DataSet.ApplyUpdates(False);
//myGuid := Business.System.JSCommon.CreateGUIDStr;
DSBMain.DataSet.Filter:='SBJXJLZB_ZT is null or SBJXJLZB_ZT=0';
DSBMain.DataSet.Filtered:=true;
Command.FuncTerminate := False; //窗体不关闭
if Command.FlowControl.FlowStartuped then
Command.FlowControl.RegisterANewFlow;
end;