COMPILE FUNCTION Comm_Dialog_Date(Method, Parm1) /* Commuter module for Dialog_Date window. 09/21/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' 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: * * * * * * * Note = Parm1<1> DateLabel = Parm1<2> IF Note NE '' THEN Set_Property(@WINDOW:'.NOTE_TEXT','DEFPROP',Note) END IF DateLabel NE '' THEN Set_Property(@WINDOW:'.GENERIC_DT_LABEL','TEXT',DateLabel) END 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: * * * * * * * GenericDt= Get_Property(@WINDOW:'.GENERIC_DT','TEXT') End_Dialog( @WINDOW, GenericDt ) RETURN