You've already forked lazarus-ccr
TvPlanIt: Fix FlexDatastore crashing in Access demo when birthdate of a contact is not specified.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8948 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -63,6 +63,8 @@ const
|
|||||||
|
|
||||||
NO_DATE = 9999999;
|
NO_DATE = 9999999;
|
||||||
FOREVER_DATE = 999999;
|
FOREVER_DATE = 999999;
|
||||||
|
NO_BIRTHDATE = 0;
|
||||||
|
NO_ANNIVERSARY = 0;
|
||||||
|
|
||||||
SecondsInDay = 86400; { Number of seconds in a day }
|
SecondsInDay = 86400; { Number of seconds in a day }
|
||||||
SecondsInHour = 3600; { Number of seconds in an hour }
|
SecondsInHour = 3600; { Number of seconds in an hour }
|
||||||
|
@ -9,19 +9,19 @@ object ContactEditForm: TContactEditForm
|
|||||||
Caption = 'ContactEdit'
|
Caption = 'ContactEdit'
|
||||||
ClientHeight = 610
|
ClientHeight = 610
|
||||||
ClientWidth = 506
|
ClientWidth = 506
|
||||||
|
Position = poScreenCenter
|
||||||
|
LCLVersion = '3.99.0.0'
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnKeyDown = FormKeyDown
|
OnKeyDown = FormKeyDown
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
Position = poScreenCenter
|
|
||||||
LCLVersion = '2.3.0.0'
|
|
||||||
object PageControl: TPageControl
|
object PageControl: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 577
|
Height = 577
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 506
|
Width = 506
|
||||||
ActivePage = tabAddresses
|
ActivePage = tabBaseData
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabIndex = 1
|
TabIndex = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
OnChange = PageControlChange
|
OnChange = PageControlChange
|
||||||
object tabBaseData: TTabSheet
|
object tabBaseData: TTabSheet
|
||||||
@ -57,8 +57,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblFirstName: TLabel
|
object lblFirstName: TLabel
|
||||||
AnchorSideTop.Control = edFirstName
|
AnchorSideTop.Control = edFirstName
|
||||||
@ -90,8 +90,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblTitle: TLabel
|
object lblTitle: TLabel
|
||||||
AnchorSideTop.Control = edTitle
|
AnchorSideTop.Control = edTitle
|
||||||
@ -119,8 +119,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
Width = 153
|
Width = 153
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 50
|
MaxLength = 50
|
||||||
OnChange = ItemChanged
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblCategory: TLabel
|
object lblCategory: TLabel
|
||||||
AnchorSideTop.Control = cbCategory
|
AnchorSideTop.Control = cbCategory
|
||||||
@ -179,13 +179,47 @@ object ContactEditForm: TContactEditForm
|
|||||||
DateOrder = doNone
|
DateOrder = doNone
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Bottom = 8
|
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
Text = 'edBirthdate'
|
Text = 'edBirthdate'
|
||||||
end
|
end
|
||||||
|
object lblAnniversary: TLabel
|
||||||
|
AnchorSideTop.Control = edAnniversary
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = edAnniversary
|
||||||
|
Left = 36
|
||||||
|
Height = 15
|
||||||
|
Top = 147
|
||||||
|
Width = 62
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Left = 8
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
Caption = 'Anniversary'
|
||||||
|
FocusControl = edAnniversary
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object edAnniversary: TDateEdit
|
||||||
|
AnchorSideLeft.Control = edLastName
|
||||||
|
AnchorSideTop.Control = edBirthdate
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 106
|
||||||
|
Height = 23
|
||||||
|
Top = 143
|
||||||
|
Width = 153
|
||||||
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
|
||||||
|
DateOrder = doNone
|
||||||
|
ButtonWidth = 23
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Bottom = 8
|
||||||
|
NumGlyphs = 1
|
||||||
|
MaxLength = 0
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 5
|
||||||
|
Text = 'edAnniversary'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object tabAddresses: TTabSheet
|
object tabAddresses: TTabSheet
|
||||||
Caption = 'tabAddresses'
|
Caption = 'tabAddresses'
|
||||||
@ -220,9 +254,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 50
|
MaxLength = 50
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblCompany: TLabel
|
object lblCompany: TLabel
|
||||||
AnchorSideTop.Control = edCompany
|
AnchorSideTop.Control = edCompany
|
||||||
@ -271,9 +305,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 50
|
MaxLength = 50
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblPosition: TLabel
|
object lblPosition: TLabel
|
||||||
AnchorSideTop.Control = edPosition
|
AnchorSideTop.Control = edPosition
|
||||||
@ -305,9 +339,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 50
|
MaxLength = 50
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblAddressW: TLabel
|
object lblAddressW: TLabel
|
||||||
AnchorSideTop.Control = edAddressW
|
AnchorSideTop.Control = edAddressW
|
||||||
@ -339,9 +373,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblCityW: TLabel
|
object lblCityW: TLabel
|
||||||
AnchorSideTop.Control = edCityW
|
AnchorSideTop.Control = edCityW
|
||||||
@ -373,9 +407,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 50
|
MaxLength = 50
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblStateW: TLabel
|
object lblStateW: TLabel
|
||||||
AnchorSideTop.Control = edStateW
|
AnchorSideTop.Control = edStateW
|
||||||
@ -407,9 +441,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 25
|
MaxLength = 25
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblStateComboW: TLabel
|
object lblStateComboW: TLabel
|
||||||
AnchorSideTop.Control = cbStateW
|
AnchorSideTop.Control = cbStateW
|
||||||
@ -476,9 +510,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 10
|
MaxLength = 10
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblCountryComboW: TLabel
|
object lblCountryComboW: TLabel
|
||||||
AnchorSideTop.Control = cbCountryW
|
AnchorSideTop.Control = cbCountryW
|
||||||
@ -513,10 +547,10 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
MaxLength = 65535
|
MaxLength = 65535
|
||||||
OnChange = cbCountryChange
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
Visible = False
|
Visible = False
|
||||||
|
OnChange = cbCountryChange
|
||||||
end
|
end
|
||||||
object lblCountryW: TLabel
|
object lblCountryW: TLabel
|
||||||
AnchorSideTop.Control = edCountryW
|
AnchorSideTop.Control = edCountryW
|
||||||
@ -597,9 +631,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblCityH: TLabel
|
object lblCityH: TLabel
|
||||||
AnchorSideTop.Control = edCityH
|
AnchorSideTop.Control = edCityH
|
||||||
@ -631,9 +665,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 50
|
MaxLength = 50
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblStateH: TLabel
|
object lblStateH: TLabel
|
||||||
AnchorSideTop.Control = edStateH
|
AnchorSideTop.Control = edStateH
|
||||||
@ -665,9 +699,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 25
|
MaxLength = 25
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblStateComboH: TLabel
|
object lblStateComboH: TLabel
|
||||||
AnchorSideTop.Control = cbStateH
|
AnchorSideTop.Control = cbStateH
|
||||||
@ -734,9 +768,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 10
|
MaxLength = 10
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object lblCountryComboH: TLabel
|
object lblCountryComboH: TLabel
|
||||||
AnchorSideTop.Control = cbCountryH
|
AnchorSideTop.Control = cbCountryH
|
||||||
@ -771,10 +805,10 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
MaxLength = 65535
|
MaxLength = 65535
|
||||||
OnChange = cbCountryChange
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
Visible = False
|
Visible = False
|
||||||
|
OnChange = cbCountryChange
|
||||||
end
|
end
|
||||||
object lblCountryH: TLabel
|
object lblCountryH: TLabel
|
||||||
AnchorSideTop.Control = edCountryH
|
AnchorSideTop.Control = edCountryH
|
||||||
@ -920,9 +954,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
MaxLength = 25
|
MaxLength = 25
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object edPhone3: TEdit
|
object edPhone3: TEdit
|
||||||
AnchorSideLeft.Control = cbPhone3
|
AnchorSideLeft.Control = cbPhone3
|
||||||
@ -938,9 +972,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
MaxLength = 25
|
MaxLength = 25
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object edPhone2: TEdit
|
object edPhone2: TEdit
|
||||||
AnchorSideLeft.Control = cbPhone2
|
AnchorSideLeft.Control = cbPhone2
|
||||||
@ -956,9 +990,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
MaxLength = 25
|
MaxLength = 25
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object edPhone1: TEdit
|
object edPhone1: TEdit
|
||||||
AnchorSideLeft.Control = cbPhone1
|
AnchorSideLeft.Control = cbPhone1
|
||||||
@ -975,9 +1009,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 25
|
MaxLength = 25
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object cbPhone5: TComboBox
|
object cbPhone5: TComboBox
|
||||||
AnchorSideLeft.Control = gbPhone
|
AnchorSideLeft.Control = gbPhone
|
||||||
@ -1014,9 +1048,9 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
MaxLength = 25
|
MaxLength = 25
|
||||||
OnChange = ItemChanged
|
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object gbEMail: TGroupBox
|
object gbEMail: TGroupBox
|
||||||
@ -1307,8 +1341,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object edCustom2: TEdit
|
object edCustom2: TEdit
|
||||||
AnchorSideLeft.Control = edCustom1
|
AnchorSideLeft.Control = edCustom1
|
||||||
@ -1323,8 +1357,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object edCustom3: TEdit
|
object edCustom3: TEdit
|
||||||
AnchorSideLeft.Control = edCustom1
|
AnchorSideLeft.Control = edCustom1
|
||||||
@ -1339,8 +1373,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
object edCustom4: TEdit
|
object edCustom4: TEdit
|
||||||
AnchorSideLeft.Control = edCustom1
|
AnchorSideLeft.Control = edCustom1
|
||||||
@ -1356,8 +1390,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
MaxLength = 100
|
MaxLength = 100
|
||||||
OnChange = ItemChanged
|
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnChange = ItemChanged
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tabNotes: TTabSheet
|
object tabNotes: TTabSheet
|
||||||
@ -1401,8 +1435,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Bottom = 4
|
BorderSpacing.Bottom = 4
|
||||||
Caption = 'OK'
|
Caption = 'OK'
|
||||||
Default = True
|
Default = True
|
||||||
OnClick = OKBtnClick
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
OnClick = OKBtnClick
|
||||||
end
|
end
|
||||||
object CancelBtn: TButton
|
object CancelBtn: TButton
|
||||||
Left = 436
|
Left = 436
|
||||||
@ -1416,8 +1450,8 @@ object ContactEditForm: TContactEditForm
|
|||||||
BorderSpacing.Bottom = 4
|
BorderSpacing.Bottom = 4
|
||||||
Cancel = True
|
Cancel = True
|
||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
OnClick = CancelBtnClick
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
OnClick = CancelBtnClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
{"hash":145482249,"name":"tcontacteditform.lblcategory.caption","sourcebytes":[67,97,116,101,103,111,114,121],"value":"Category"},
|
{"hash":145482249,"name":"tcontacteditform.lblcategory.caption","sourcebytes":[67,97,116,101,103,111,114,121],"value":"Category"},
|
||||||
{"hash":178403381,"name":"tcontacteditform.lblbirthdate.caption","sourcebytes":[66,105,114,116,104,32,100,97,116,101],"value":"Birth date"},
|
{"hash":178403381,"name":"tcontacteditform.lblbirthdate.caption","sourcebytes":[66,105,114,116,104,32,100,97,116,101],"value":"Birth date"},
|
||||||
{"hash":163914149,"name":"tcontacteditform.edbirthdate.text","sourcebytes":[101,100,66,105,114,116,104,100,97,116,101],"value":"edBirthdate"},
|
{"hash":163914149,"name":"tcontacteditform.edbirthdate.text","sourcebytes":[101,100,66,105,114,116,104,100,97,116,101],"value":"edBirthdate"},
|
||||||
|
{"hash":209833369,"name":"tcontacteditform.lblanniversary.caption","sourcebytes":[65,110,110,105,118,101,114,115,97,114,121],"value":"Anniversary"},
|
||||||
|
{"hash":121753081,"name":"tcontacteditform.edanniversary.text","sourcebytes":[101,100,65,110,110,105,118,101,114,115,97,114,121],"value":"edAnniversary"},
|
||||||
{"hash":204197475,"name":"tcontacteditform.tabaddresses.caption","sourcebytes":[116,97,98,65,100,100,114,101,115,115,101,115],"value":"tabAddresses"},
|
{"hash":204197475,"name":"tcontacteditform.tabaddresses.caption","sourcebytes":[116,97,98,65,100,100,114,101,115,115,101,115],"value":"tabAddresses"},
|
||||||
{"hash":181789747,"name":"tcontacteditform.gbworkaddress.caption","sourcebytes":[103,98,87,111,114,107,65,100,100,114,101,115,115],"value":"gbWorkAddress"},
|
{"hash":181789747,"name":"tcontacteditform.gbworkaddress.caption","sourcebytes":[103,98,87,111,114,107,65,100,100,114,101,115,115],"value":"gbWorkAddress"},
|
||||||
{"hash":174280537,"name":"tcontacteditform.lblcompany.caption","sourcebytes":[108,98,108,67,111,109,112,97,110,121],"value":"lblCompany"},
|
{"hash":174280537,"name":"tcontacteditform.lblcompany.caption","sourcebytes":[108,98,108,67,111,109,112,97,110,121],"value":"lblCompany"},
|
||||||
|
@ -60,6 +60,7 @@ type
|
|||||||
cbEMail3: TComboBox;
|
cbEMail3: TComboBox;
|
||||||
cbWebsite1: TComboBox;
|
cbWebsite1: TComboBox;
|
||||||
edAddressH: TEdit;
|
edAddressH: TEdit;
|
||||||
|
edAnniversary: TDateEdit;
|
||||||
edCityH: TEdit;
|
edCityH: TEdit;
|
||||||
edCompany: TEdit;
|
edCompany: TEdit;
|
||||||
edCountryH: TEdit;
|
edCountryH: TEdit;
|
||||||
@ -69,6 +70,7 @@ type
|
|||||||
gbWorkAddress: TGroupBox;
|
gbWorkAddress: TGroupBox;
|
||||||
gbHomeAddress: TGroupBox;
|
gbHomeAddress: TGroupBox;
|
||||||
lblAddressH: TLabel;
|
lblAddressH: TLabel;
|
||||||
|
lblAnniversary: TLabel;
|
||||||
lblCityH: TLabel;
|
lblCityH: TLabel;
|
||||||
lblCompany: TLabel;
|
lblCompany: TLabel;
|
||||||
lblCountryComboH: TLabel;
|
lblCountryComboH: TLabel;
|
||||||
@ -229,6 +231,7 @@ begin
|
|||||||
lblTitle.Caption := RSTitleLbl;
|
lblTitle.Caption := RSTitleLbl;
|
||||||
lblCategory.Caption := RSCategoryLbl;
|
lblCategory.Caption := RSCategoryLbl;
|
||||||
lblBirthdate.Caption := RSBirthDateLbl;
|
lblBirthdate.Caption := RSBirthDateLbl;
|
||||||
|
lblAnniversary.Caption := RSAnniversaryLbl;
|
||||||
|
|
||||||
lblCompany.Caption := RSCompanyLbl;
|
lblCompany.Caption := RSCompanyLbl;
|
||||||
lblDepartment.Caption := RSDepartmentLbl;
|
lblDepartment.Caption := RSDepartmentLbl;
|
||||||
@ -278,8 +281,17 @@ begin
|
|||||||
Contact.FirstName := edFirstName.Text;
|
Contact.FirstName := edFirstName.Text;
|
||||||
Contact.Title := edTitle.Text;
|
Contact.Title := edTitle.Text;
|
||||||
Contact.Category := cbCategory.ItemIndex;
|
Contact.Category := cbCategory.ItemIndex;
|
||||||
|
|
||||||
|
if edBirthDate.Text = '' then
|
||||||
|
Contact.Birthdate := NO_BIRTHDATE
|
||||||
|
else
|
||||||
Contact.Birthdate := edBirthdate.Date;
|
Contact.Birthdate := edBirthdate.Date;
|
||||||
|
|
||||||
|
if edAnniversary.Text = '' then
|
||||||
|
Contact.Anniversary := NO_ANNIVERSARY
|
||||||
|
else
|
||||||
|
Contact.Anniversary := edAnniversary.Date;
|
||||||
|
|
||||||
Contact.Company := edCompany.Text;
|
Contact.Company := edCompany.Text;
|
||||||
Contact.Department := edDepartment.Text;
|
Contact.Department := edDepartment.Text;
|
||||||
Contact.Job_Position := edPosition.Text;
|
Contact.Job_Position := edPosition.Text;
|
||||||
@ -352,20 +364,22 @@ begin
|
|||||||
edLastName.Text := Contact.LastName;
|
edLastName.Text := Contact.LastName;
|
||||||
edFirstName.Text := Contact.FirstName;
|
edFirstName.Text := Contact.FirstName;
|
||||||
edTitle.Text := Contact.Title;
|
edTitle.Text := Contact.Title;
|
||||||
if contact.Birthdate = 0.0 then
|
|
||||||
|
if contact.Birthdate = NO_BIRTHDATE then
|
||||||
edBirthdate.Clear
|
edBirthdate.Clear
|
||||||
else
|
else
|
||||||
edBirthdate.Date := Contact.Birthdate;
|
edBirthdate.Date := Contact.Birthdate;
|
||||||
|
|
||||||
|
if contact.Anniversary = NO_ANNIVERSARY then
|
||||||
|
edAnniversary.Clear
|
||||||
|
else
|
||||||
|
edAnniversary.Date := Contact.Anniversary;
|
||||||
|
|
||||||
cbCategory.Items.Clear;
|
cbCategory.Items.Clear;
|
||||||
for ct := Low(TVpCategoryType) to High(TVpCategoryType) do
|
for ct := Low(TVpCategoryType) to High(TVpCategoryType) do
|
||||||
cbCategory.Items.Add(CategoryLabel(ct));
|
cbCategory.Items.Add(CategoryLabel(ct));
|
||||||
cbCategory.ItemIndex := Contact.Category;
|
cbCategory.ItemIndex := Contact.Category;
|
||||||
|
|
||||||
if Contact.Birthdate = 0.0 then
|
|
||||||
edBirthdate.Clear else
|
|
||||||
edBirthdate.Date := Contact.Birthdate;
|
|
||||||
|
|
||||||
edCompany.Text := Contact.Company;
|
edCompany.Text := Contact.Company;
|
||||||
edDepartment.Text := Contact.Department;
|
edDepartment.Text := Contact.Department;
|
||||||
edPosition.Text := Contact.Job_Position;
|
edPosition.Text := Contact.Job_Position;
|
||||||
@ -528,6 +542,7 @@ begin
|
|||||||
hBorder := ScaleX(hBorder, DesignTimeDPI);
|
hBorder := ScaleX(hBorder, DesignTimeDPI);
|
||||||
vBorder := ScaleY(vBorder, DesignTimeDPI);
|
vBorder := ScaleY(vBorder, DesignTimeDPI);
|
||||||
edBirthdate.ButtonWidth := edBirthdate.Height;
|
edBirthdate.ButtonWidth := edBirthdate.Height;
|
||||||
|
edAnniversary.ButtonWidth := edAnniversary.Height;
|
||||||
comboArrowWidth := GetSystemMetrics(SM_CXVSCROLL) * 2;
|
comboArrowWidth := GetSystemMetrics(SM_CXVSCROLL) * 2;
|
||||||
|
|
||||||
for i := 0 to ComponentCount-1 do
|
for i := 0 to ComponentCount-1 do
|
||||||
@ -547,21 +562,24 @@ begin
|
|||||||
{----------------------------------------------------------------------------}
|
{----------------------------------------------------------------------------}
|
||||||
{ Page "Base data" }
|
{ Page "Base data" }
|
||||||
{----------------------------------------------------------------------------}
|
{----------------------------------------------------------------------------}
|
||||||
SetLength(labels, 5);
|
SetLength(labels, 6);
|
||||||
labels[0] := lblLastName;
|
labels[0] := lblLastName;
|
||||||
labels[1] := lblFirstName;
|
labels[1] := lblFirstName;
|
||||||
labels[2] := lblTitle;
|
labels[2] := lblTitle;
|
||||||
labels[3] := lblCategory;
|
labels[3] := lblCategory;
|
||||||
labels[4] := lblBirthdate;
|
labels[4] := lblBirthdate;
|
||||||
|
labels[5] := lblAnniversary;
|
||||||
largestLabelWidth := 0;
|
largestLabelWidth := 0;
|
||||||
for i:=0 to High(labels) do
|
for i:=0 to High(labels) do
|
||||||
largestLabelWidth := Max(largestLabelWidth, GetLabelWidth(labels[i]));
|
largestLabelWidth := Max(largestLabelWidth, GetLabelWidth(labels[i]));
|
||||||
edLastName.Left := largestLabelWidth + hlabelDist;
|
edLastName.Left := largestLabelWidth + hlabelDist;
|
||||||
|
|
||||||
edBirthdate.Width := edTitle.Width;
|
edBirthdate.Width := edTitle.Width;
|
||||||
|
edAnniversary.Width := edTitle.Width;
|
||||||
cbCategory.Width := edTitle.Width;
|
cbCategory.Width := edTitle.Width;
|
||||||
{$IFDEF NEW_ICONS}
|
{$IFDEF NEW_ICONS}
|
||||||
LoadGlyphFromRCDATA(edBirthDate.Button.Glyph, 'VpDateEdit', 16, 24, 32);
|
LoadGlyphFromRCDATA(edBirthDate.Button.Glyph, 'VpDateEdit', 16, 24, 32);
|
||||||
|
LoadGlyphFromRCDATA(edAnniversary.Button.Glyph, 'VpDateEdit', 16, 24, 32);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{----------------------------------------------------------------------------}
|
{----------------------------------------------------------------------------}
|
||||||
|
@ -2237,6 +2237,9 @@ begin
|
|||||||
|
|
||||||
FAddressType1 := ord(atWork);
|
FAddressType1 := ord(atWork);
|
||||||
FAddressType2 := ord(atHome);
|
FAddressType2 := ord(atHome);
|
||||||
|
|
||||||
|
FBirthDate := NO_BIRTHDATE;
|
||||||
|
FAnniversary := NO_ANNIVERSARY;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TVpContact.Destroy;
|
destructor TVpContact.Destroy;
|
||||||
|
@ -840,11 +840,11 @@ begin
|
|||||||
AContact.LastName := FieldByName(FN).AsString;
|
AContact.LastName := FieldByName(FN).AsString;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'BirthDate');
|
FN := GetFieldName(FContactMappings, 'BirthDate');
|
||||||
if FN <> '' then
|
if (FN <> '') and not FieldByName(FN).IsNull then
|
||||||
AContact.Birthdate := FieldByName(FN).AsDateTime;
|
AContact.Birthdate := FieldByName(FN).AsDateTime;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Anniversary');
|
FN := GetFieldName(FContactMappings, 'Anniversary');
|
||||||
if FN <> '' then
|
if (FN <> '') and not FieldByName(FN).IsNull then
|
||||||
AContact.Anniversary := FieldByName(FN).AsDateTime;
|
AContact.Anniversary := FieldByName(FN).AsDateTime;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Title');
|
FN := GetFieldName(FContactMappings, 'Title');
|
||||||
@ -1788,11 +1788,11 @@ begin
|
|||||||
ContactsTable.FieldByName(FN).AsString := Contact.LastName;
|
ContactsTable.FieldByName(FN).AsString := Contact.LastName;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Birthdate');
|
FN := GetFieldName(FContactMappings, 'Birthdate');
|
||||||
if FN <> '' then
|
if (FN <> '') and (Contact.BirthDate <> NO_BIRTHDATE) then
|
||||||
ContactsTable.FieldByName(FN).AsDateTime := Contact.Birthdate;
|
ContactsTable.FieldByName(FN).AsDateTime := Contact.Birthdate;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Anniversary');
|
FN := GetFieldName(FContactMappings, 'Anniversary');
|
||||||
if FN <> '' then
|
if (FN <> '') and (Contact.Anniversary <> NO_ANNIVERSARY) then
|
||||||
ContactsTable.FieldByName(FN).AsDateTime := Contact.Anniversary;
|
ContactsTable.FieldByName(FN).AsDateTime := Contact.Anniversary;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Title');
|
FN := GetFieldName(FContactMappings, 'Title');
|
||||||
|
Reference in New Issue
Block a user