COMPILE FUNCTION Comm_Dialog_Date_Range(Method, Parm1) /* Commuter module for Dialog_Date_Range window. 08/07/2005 - John C. Henry, J.C. Henry & Co., Inc. */ DECLARE SUBROUTINE Set_Property, End_Dialog, Set_Status, ErrMsg DECLARE SUBROUTINE obj_Appwindow, Start_Window, Msg, DECLARE FUNCTION Get_Property, Get_Status, Dialog_Box, Popup, Utility, Msg, Send_Message EQU CRLF$ TO \0D0A\ $INSERT POPUP_EQUATES $INSERT MSG_EQUATES $INSERT RDS_EQU $INSERT APPCOLORS ErrTitle = 'Error in Comm_Dialog_Date_Range' ErrorMsg = '' Result = '' BEGIN CASE CASE Method = 'Create' ; GOSUB Create CASE Method = 'OK' ; GOSUB OK CASE Method = 'Cancel' ; GOSUB Cancel CASE Method = 'PickDt' ; GOSUB PickDt CASE 1 ErrMsg(ErrTitle:@SVM:'Unknown method ':QUOTE(Method):' passed to routine.') END CASE RETURN Result * * * * * * * Create: * * * * * * * obj_AppWindow('Create') RETURN * * * * * * * Cancel: * * * * * * * End_Dialog(@WINDOW,'Cancel') RETURN * * * * * * * PickDt: * * * * * * * ReturnCtrl = Parm1 IF ReturnCtrl = '' THEN ReturnCtrl = Get_Property(@WINDOW,'@FOCUS') END ELSE IF INDEX(ReturnCtrl,'.',1) ELSE ReturnCtrl = @WINDOW:'.':ReturnCtrl END END ReturnVal = OCONV(Dialog_Box("POPUP_MONTH",@WINDOW),'D4/') obj_Appwindow('LUValReturn',ReturnVal:@RM:ReturnCtrl:@RM:'') RETURN * * * * * * * OK: * * * * * * * StartDt = Get_Property(@WINDOW:'.START_DT','TEXT') EndDt = Get_Property(@WINDOW:'.END_DT','TEXT') End_Dialog( @WINDOW, StartDt:@FM:EndDt ) RETURN