serial UglyPickingCNTs Default %Library.TMFormClass 0 %TMButton %Library.TMForm %Library.String "(onbekend)" %TMButton %TMButton %TMButton %TMButton %TMButton %TMButton %TMButton %TMButton %TMButton %TMButton initvalue:%String cache 0 %Status document literal Args:%String cache 0 document literal cache 0 document literal Args:%String cache 0 document literal cache 0 document literal cache 0 %Library.Boolean document literal initvalue:%String cache 0 MApplication document literal initvalue:%String cache 0 %Library.Status document literal ",$LB("Ugly Picking SysOp "),"UGLY Picking: invalid program exit",Msg) . If $$$ISERR(SendStatus) Do .. Do MApplication.MessageBox($$ParseStatus^vhLib(SendStatus),..Form.Caption,$$$MBICONERROR) . ;Do pdaMsgBox^vhVisual(..Form.Caption,Msg,$$$MBICONINFORMATION) */ ; --- Dll met tools in geheugen laden --- Do MApplication.Tools.Load() New ProcessId Set ProcessId=MApplication.Tools.apiGetCurrentProcessId() New SessionId Set SessionId=MApplication.Tools.apiProcessIdToSessionId(ProcessId) ; Ophalen gebruikersnaam Set ..UserId=$S(MApplication.Tools.FToolsLoaded:MApplication.Tools.GetNTUserName(),1:"") If SessionId>0 Do . $$$WriteToLog("NEW Job: " _ $J _ ", ProcessId: " _ ProcessId _ ", SessionId: "_SessionId_", NTUser: " _ ..UserId) . Do MApplication.AddToAppLog("SessionId: "_SessionId) ; --- Eigen logon opstarten --- New lbNTUsersForValidation Set lbNTUsersForValidation=##class(BL.MB.UGLYPicking.General).GetNTUsersForValidation() If ($LF(lbNTUsersForValidation,$ZCVT(..UserId,"U"))) || (..UserId="") Do . ;Auto-restart(~)=Auto-logon . If ..DoAutoLogon() Do .. Set ..UserId=$P(UserLN,"~",2) .. $$$WriteToLog("Auto-logon") . Else Do .. New frmLogon .. Set frmLogon=##class(UI.MB.UGLYPicking.dlgLogon).%New($LB(%this.Form.Address,0)) .. If frmLogon.Form.ShowModal()=$$$mrCancel Do ... Set ..UserId="" .. Else Do ... Set ..UserId=frmLogon.UserId If ..UserId="" Do Quit $$$OK . Do ..Form.Close() ;Gebruiker zichtbaar maken in AppMonitor Do MApplication.AddToAppLog("UserId: "_..UserId) ;Opstart Logging $$$UIWriteToLog("=== UGLY Picking started ===") $$$WriteToLog("UserId: "_..UserId) Set ..Form.Caption="UGLY Picking - "_..UserId ;Aanduiden dat het proggy is opgestart, bij afsluiten weghalen ;Data: $LB(HStartTime,UserId,SessionId) Set ^UGLYOrderPick("ACTIVE",$J)=$LB($H,..UserId,SessionId) ;Deze var wordt bijgehouden om de applicatie automatisch af te sluiten na het ;picken van een bepaald aantal lijnen Set ^UGLYLinesPickedCnt($J)=0 Do:(..DoAutoLogon()) ..btnOrderPickingClick($LB(..btnOrderPicking)) q $$$OK ;------------------------------------------------------------------------------ AddLastLogLines(Dag,Job,varMsg) Quit:('$D(^UGLYPickingLog(Dag,Job))) New LogCnt Set LogCnt=^UGLYPickingLog(Dag,Job) Set Msg=Msg_$C(13,10,13,10)_"Last Loglines (logcnt="_LogCnt_"):"_$C(13,10) New BaseLoop If LogCnt'>10 Do . Set BaseLoop=1 Else Do . Set BaseLoop=LogCnt-10 . Set Msg=Msg_"..." New Loop For Loop=BaseLoop:1:LogCnt Do . Set Msg=Msg_$C(13,10)_$ZT($LG(^UGLYPickingLog(Dag,Job,Loop),1))_" "_$TR($LG(^UGLYPickingLog(Dag,Job,Loop),2),$C(13,10),", ") Quit ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal %Library.CacheSerialState list "%Library.TMFormClass" Address Form btnCancel btnOrderPicking Button1 Button2 Button3 Button4 Button5 btnCycleCount btnVerplaatsenPallet btnDbgPallets btnRecProd btnResetORDW UserId Button6 btnSectieIndeling btnProcessOrders tmrAutoExit btnLocSummary