COMPILE FUNCTION Batch_WO_Purge(EntID,Event,Parm1,Parm2,Parm3,Parm4,Parm5) /* Commuter module for BATCH_WO_PURGE window (Purge groups of Work Orders and all affiliated data from the system) 02/16/2016 - John C. Henry, J.C. Henry & Co., Inc. */ DECLARE SUBROUTINE Set_Property, End_Dialog, Set_Status,Print_React_Read_Worksheet DECLARE SUBROUTINE ErrMsg, Send_Message, Set_Property, Send_Event, obj_AppWindow, DECLARE SUBROUTINE End_Window,obj_React_Reads DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.Ixvals DECLARE FUNCTION Send_Message, Msg, Security_Check, obj_WO_Log, WO_Purge, Set_Property $INSERT MSG_EQUATES $INSERT APPCOLORS $INSERT LSL_USERS_EQU $INSERT SECURITY_RIGHTS_EQU $INSERT POPUP_EQUATES EQU CRLF$ TO \0D0A\ EQU TAB$ TO \09\ EQU COL$WO_NO TO 1 EQU COL$CASS_CNT TO 2 EQU COL$START TO 3 EQU COL$STOP TO 4 EQU COL$PER_BOX TO 5 ErrTitle = 'Error in Batch_WO_Purge commuter module' ErrorMsg = '' Result = '' BEGIN CASE CASE EntID = @WINDOW BEGIN CASE CASE Event = 'CREATE' ; GOSUB Create CASE Event = 'CLOSE' ; GOSUB Close END CASE CASE EntID = @WINDOW:'.LU_WO' AND Event = 'CLICK' ; GOSUB LUWONo CASE EntID = @WINDOW:'.START_PURGE' AND Event = 'CLICK' ; GOSUB StartPurge CASE EntID = @WINDOW:'.DONE' AND Event = 'CLICK' ; GOSUB Close CASE EntID = @WINDOW:'.CLEAR' AND Event = 'CLICK' ; GOSUB Clear CASE EntID = @WINDOW:'.WO_NO' AND Event = 'POSCHANGED' ; GOSUB WONoPC CASE EntID = @WINDOW:'.WO_NO' AND Event = 'CLICK' ; GOSUB WOClick CASE EntID = @WINDOW:'.WO_NO' AND Event = 'INSERTROW' ; GOSUB InsertRow CASE EntID = @WINDOW:'.WO_NO' AND Event = 'DELETEROW' ; GOSUB DeleteRow CASE 1 ErrorMsg = 'Unknown Parameters ':EntID:' - ':Event:' passed to commuter' ErrMsg(ErrorMsg) END CASE IF ErrorMsg NE '' THEN ErrMsg(ErrTitle:@SVM:ErrorMsg) END RETURN Result * * * * * * * Create: * * * * * * * obj_Appwindow('Create',@WINDOW) GOSUB Refresh RETURN * * * * * * * Close: * * * * * * * End_Dialog(@WINDOW,'') RETURN * * * * * * * Refresh: * * * * * * * RETURN * * * * * * * Clear: * * * * * * * EmptyCol = STR(@VM,90) Array = '' Array