Код: Выделить всё
#AT (%WindowManagerMethodCodeSection,'Next', '(),BYTE'),Priority(1000),WHERE(%ReportDataSource='Queue')
%ProcessObjectName.RecordsProcessed+=1
GET(%ReportDataSourceQueueName,%ProcessObjectName.RecordsProcessed)
IF ERRORCODE() THEN
ReturnValue = Level:Notify
ELSE
ReturnValue = Level:Benign
END
IF ReturnValue = Level:Notify
IF %ProcessObjectName.RecordsProcessed>RECORDS(%ReportDataSourceQueueName)
SELF.Response = RequestCompleted
POST(EVENT:CloseWindow)
RETURN Level:Notify
ELSE
SELF.Response = RequestCancelled
POST(EVENT:CloseWindow)
RETURN Level:Fatal
END
#IF(%ThermometerUseVariable)
ELSE
Progress = %ProcessObjectName.RecordsProcessed / %ProcessObjectName.RecordsToProcess*100
IF Progress > 100 THEN Progress = 100.
IF Progress <> Progress:Thermometer
%ThermometerUseVariable = Progress
DISPLAY()
%ProcessObjectName.UpdateDisplay() ! *** KreatoR ***
END
#ENDIF
END
RETURN Level:Benign
#ENDAT