Module cSigCJdbForm.pkg
1//==============================================================================
2// Project : SigCj - VDF Classes for Codejock
3// File : cSigCJdbForm.pkg
4// Description : VDF Class for Codejock control
5//
6// Revision : $Rev: 599 $
7// $Date: 2009-10-14 05:39:01 -0400 (Wed, 14 Oct 2009) $
8// $Author: pak $ Martin Pincott
9//
10// Requirements : Visual DataFlex 12.1+
11// Codejock SuitePro - Version 12.0.0+
12//
13// Copyright : (c) 2008 VDF SIG UK
14// Visual DataFlex Special Interest Group UK.
15// http://www.vdfsig.co.uk/
16// dev@vdfsig.co.uk
17//
18// This file is part of SigCj.
19//
20// SigCj is free software: you can redistribute it and/or modify
21// it under the terms of the GNU Lesser General Public License
22// as published by the Free Software Foundation, either version
23// 2.1 of the License, or (at your option) any later version.
24//
25// SigCj is distributed in the hope that it will be useful, but
26// WITHOUT ANY WARRANTY; without even the implied warranty of
27// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28// GNU Lesser General Public License for more details.
29//
30// If you have the complete SigCj workspace then a copy of the
31// GNU Lesser General Public License is in the Docs folder. If
32// not, see <http://www.gnu.org/licenses/>.
33//
34//==============================================================================
35
36Use DfAllEnt.pkg
37Use SigCJMonthCalendar.sl
38
39Class cSigCJdbForm is a dbForm
40
41 Procedure Construct_Object
42 Forward Send Construct_Object
43
44 Property Integer pidbDateField Public False
45
46 End_Procedure
47
48 Procedure mSet_Date_Forms
49 Integer iKey iFile# iField# iFormType iMain_File
50 String sKey
51
52 //If (Object_Shadow_State(Self) eq 1) Procedure_Return
53 If (Enabled_State(Self) eq 0) Procedure_Return
54 If (Server(Self)) eq 0 Procedure_Return
55
56 Get Data_File item 0 to iFile#
57 Get Data_Field item 0 to iField#
58 Get Main_File of (Server(Self)) to iMain_File
59 Get Form_Datatype item 0 to iFormType
60 If (iFormType = Mask_Date_Window) Move DF_DATE to iKey
61 Else If (iFile# > 0) Get_Attribute DF_FIELD_TYPE of iFile# iField# to iKey
62 If (iKey = DF_DATE) Begin
63 Set Form_Button 0 to Form_Button_Prompt
64 Set Form_Button_Bitmap 0 to "CalendarPrompt.Bmp"
65 Set Prompt_Object to (oSigCJMonthCalendar_Lookup(Self))
66 Set pidbDateField to True
67 Set Prompt_Button_Mode to PB_PromptOn
68 On_Key kPrompt Send Prompt
69 End
70 End_Procedure
71
72 Procedure Activating Returns Integer
73 Integer iRetval
74
75 Send mSet_Date_Forms
76
77 Forward Get msg_Activating to iRetval
78 Procedure_Return iRetVal
79 End_Procedure
80
81End_Class
82
83//==============================================================================
84//End of Package - cSigCJdbForm.pkg
85//==============================================================================
86