tvplanit: Add new fields (email1..3, website1..2, address1..2, pathtophoto) to contact records. Update some demos.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5164 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-09-15 11:40:14 +00:00
parent 9953b56cdf
commit f8435f112c
18 changed files with 1620 additions and 332 deletions

View File

@ -164,8 +164,12 @@ object Form1: TForm1
DrawingStyle = dsFlat
EventDayStyle = []
EventFont.Height = -12
HeadAttributes.Color = clBtnFace
LineColor = clGray
TimeFormat = tf12Hour
TodayAttributes.Color = clSilver
TodayAttributes.BorderPen.Color = clRed
TodayAttributes.BorderPen.Width = 3
OffDayColor = clSilver
SelectedDayColor = clRed
ShowEvents = True
@ -228,11 +232,11 @@ object Form1: TForm1
end
object TabSheet2: TTabSheet
Caption = 'Contacts'
ClientHeight = 594
ClientWidth = 928
ClientHeight = 624
ClientWidth = 972
object VpContactButtonBar1: TVpContactButtonBar
Left = 0
Height = 594
Height = 624
Top = 0
Width = 40
DrawingStyle = dsFlat
@ -241,9 +245,9 @@ object Form1: TForm1
end
object VpContactGrid1: TVpContactGrid
Left = 40
Height = 594
Height = 624
Top = 0
Width = 888
Width = 932
DataStore = VpBufDSDataStore1
ControlLink = VpControlLink1
Color = clWindow
@ -307,10 +311,13 @@ object Form1: TForm1
CategoryColorMap.Category8.Description = 'Category 8'
CategoryColorMap.Category9.Color = clMaroon
CategoryColorMap.Category9.Description = 'Category 9'
HiddenCategories.BackgroundColor = clSilver
HiddenCategories.Color = clGray
EnableEventTimer = True
PlayEventSounds = True
AutoConnect = True
AutoCreate = True
DayBuffer = 31
UseAutoIncFields = False
left = 136
top = 192

View File

@ -2,10 +2,10 @@ object Form1: TForm1
Left = 225
Height = 686
Top = 155
Width = 980
Width = 895
Caption = 'Form1'
ClientHeight = 686
ClientWidth = 980
ClientWidth = 895
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.7'
@ -13,11 +13,11 @@ object Form1: TForm1
Left = 0
Height = 34
Top = 0
Width = 980
Width = 895
Align = alTop
BevelOuter = bvNone
ClientHeight = 34
ClientWidth = 980
ClientWidth = 895
TabOrder = 0
object VpResourceCombo1: TVpResourceCombo
Left = 8
@ -50,7 +50,7 @@ object Form1: TForm1
Left = 0
Height = 652
Top = 34
Width = 980
Width = 895
ActivePage = TabSheet1
Align = alClient
TabIndex = 0
@ -58,12 +58,12 @@ object Form1: TForm1
object TabSheet1: TTabSheet
Caption = 'Events and tasks'
ClientHeight = 624
ClientWidth = 972
ClientWidth = 887
object VpDayView1: TVpDayView
Left = 0
Height = 624
Top = 0
Width = 301
Width = 283
DataStore = VpFirebirdDatastore1
ControlLink = VpControlLink1
Color = clWindow
@ -97,21 +97,21 @@ object Form1: TForm1
TimeFormat = tf12Hour
end
object Panel2: TPanel
Left = 306
Left = 288
Height = 624
Top = 0
Width = 386
Width = 339
Align = alLeft
BevelOuter = bvNone
Caption = 'Panel2'
ClientHeight = 624
ClientWidth = 386
ClientWidth = 339
TabOrder = 1
object VpWeekView1: TVpWeekView
Left = 0
Height = 378
Top = 0
Width = 386
Width = 339
DataStore = VpFirebirdDatastore1
ControlLink = VpControlLink1
Color = clWindow
@ -138,7 +138,7 @@ object Form1: TForm1
Left = 0
Height = 241
Top = 383
Width = 386
Width = 339
DataStore = VpFirebirdDatastore1
ControlLink = VpControlLink1
Color = clWindow
@ -170,16 +170,16 @@ object Form1: TForm1
Left = 0
Height = 5
Top = 378
Width = 386
Width = 339
Align = alBottom
ResizeAnchor = akBottom
end
end
object VpTaskList1: TVpTaskList
Left = 697
Left = 632
Height = 624
Top = 0
Width = 275
Width = 255
DataStore = VpFirebirdDatastore1
ControlLink = VpControlLink1
Color = clWindow
@ -204,13 +204,13 @@ object Form1: TForm1
ShowResourceName = True
end
object Splitter1: TSplitter
Left = 692
Left = 627
Height = 624
Top = 0
Width = 5
end
object Splitter3: TSplitter
Left = 301
Left = 283
Height = 624
Top = 0
Width = 5
@ -305,6 +305,8 @@ object Form1: TForm1
CategoryColorMap.Category8.Description = 'Category 8'
CategoryColorMap.Category9.Color = clMaroon
CategoryColorMap.Category9.Description = 'Category 9'
HiddenCategories.BackgroundColor = clSilver
HiddenCategories.Color = clGray
EnableEventTimer = True
PlayEventSounds = True
Connection = IBConnection1

View File

@ -176,12 +176,25 @@ begin
'Title VARCHAR(50) ,'+
'Company VARCHAR(50) ,'+
'Job_Position VARCHAR(30), '+
'Address VARCHAR(100), '+
'City VARCHAR(50), '+
'State VARCHAR(25), '+
'Zip VARCHAR(10), '+
'Country VARCHAR(25), '+
'AddressType1 INTEGER, '+
'Address1 VARCHAR(100), '+
'City1 VARCHAR(50), '+
'State1 VARCHAR(25), '+
'Zip1 VARCHAR(10), '+
'Country1 VARCHAR(25), '+
'AddressType2 INTEGER, '+
'Address2 VARCHAR(100), '+
'City2 VARCHAR(50), '+
'State2 VARCHAR(25), '+
'Zip2 VARCHAR(10), '+
'Country2 VARCHAR(25), '+
'Notes VARCHAR, '+
'EMail1 VARCHAR(100), '+
'EMail2 VARCHAR(100), '+
'EMail3 VARCHAR(100), '+
'EMailType1 INTEGER, '+
'EMailType2 INTEGER, '+
'EMailType3 INTEGER, '+
'Phone1 VARCHAR(25), '+
'Phone2 VARCHAR(25), '+
'Phone3 VARCHAR(25), '+
@ -192,8 +205,12 @@ begin
'PhoneType3 INTEGER, '+
'PhoneType4 INTEGER, '+
'PhoneType5 INTEGER, '+
'Website1 VARCHAR(100), '+
'Website2 VARCHAR(100), '+
'WebsiteType1 INTEGER, '+
'WebsiteType2 INTEGER, '+
'Category INTEGER, '+
'EMail VARCHAR(100), '+
'PathToPhoto VARCHAR(255), '+
'Custom1 VARCHAR(100), '+
'Custom2 VARCHAR(100),'+
'Custom3 VARCHAR(100), '+

View File

@ -51,9 +51,9 @@ object Form1: TForm1
Height = 652
Top = 34
Width = 980
ActivePage = TabSheet2
ActivePage = TabSheet1
Align = alClient
TabIndex = 1
TabIndex = 0
TabOrder = 1
OnChange = PageControl1Change
object TabSheet1: TTabSheet
@ -357,6 +357,8 @@ object Form1: TForm1
CategoryColorMap.Category8.Description = 'Category 8'
CategoryColorMap.Category9.Color = clMaroon
CategoryColorMap.Category9.Description = 'Category 9'
HiddenCategories.BackgroundColor = clSilver
HiddenCategories.Color = clGray
EnableEventTimer = True
PlayEventSounds = True
AutoConnect = False
@ -456,18 +458,40 @@ object Form1: TForm1
'Company'
'Job_Position'
'Job_Position'
'Address'
'Address'
'City'
'City'
'State'
'State'
'Zip'
'Zip'
'Country'
'Country'
'Address1'
'Address1'
'Address2'
'Address2'
'City1'
'City1'
'City2'
'City2'
'State1'
'State1'
'State2'
'State2'
'Zip1'
'Zip1'
'Zip2'
'Zip2'
'Country1'
'Country1'
'Country2'
'Country2'
'Notes'
'Notes'
'EMail1'
'EMail1'
'EMail2'
'EMail2'
'EMail3'
'EMail3'
'EMailType1'
'EMailType1'
'EMailType2'
'EMailType2'
'EMailType3'
'EMailType3'
'Phone1'
'Phone1'
'Phone2'
@ -488,10 +512,18 @@ object Form1: TForm1
'PhoneType4'
'PhoneType5'
'PhoneType5'
'Website1'
'Website1'
'Website2'
'Website2'
'WebsiteType1'
'WebsiteType1'
'WebsiteType2'
'WebsiteType2'
'Category'
'Category'
'EMail'
'EMail'
'PathToPhoto'
'PathToPhoto'
'Custom1'
'Custom1'
'Custom2'

View File

@ -2,10 +2,10 @@ object Form1: TForm1
Left = 344
Height = 686
Top = 169
Width = 980
Width = 910
Caption = 'Form1'
ClientHeight = 686
ClientWidth = 980
ClientWidth = 910
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.7'
@ -13,11 +13,11 @@ object Form1: TForm1
Left = 0
Height = 34
Top = 0
Width = 980
Width = 910
Align = alTop
BevelOuter = bvNone
ClientHeight = 34
ClientWidth = 980
ClientWidth = 910
TabOrder = 0
object VpResourceCombo1: TVpResourceCombo
Left = 8
@ -50,7 +50,7 @@ object Form1: TForm1
Left = 0
Height = 652
Top = 34
Width = 980
Width = 910
ActivePage = TabSheet1
Align = alClient
TabIndex = 0
@ -58,12 +58,12 @@ object Form1: TForm1
object TabSheet1: TTabSheet
Caption = 'Events and tasks'
ClientHeight = 624
ClientWidth = 972
ClientWidth = 902
object VpDayView1: TVpDayView
Left = 0
Height = 624
Top = 0
Width = 301
Width = 283
DataStore = VpFlexDataStore1
ControlLink = VpControlLink1
Color = clWindow
@ -97,21 +97,21 @@ object Form1: TForm1
TimeFormat = tf12Hour
end
object Panel2: TPanel
Left = 306
Left = 288
Height = 624
Top = 0
Width = 386
Width = 363
Align = alLeft
BevelOuter = bvNone
Caption = 'Panel2'
ClientHeight = 624
ClientWidth = 386
ClientWidth = 363
TabOrder = 1
object VpWeekView1: TVpWeekView
Left = 0
Height = 378
Top = 0
Width = 386
Width = 363
DataStore = VpFlexDataStore1
ControlLink = VpControlLink1
Color = clWindow
@ -138,7 +138,7 @@ object Form1: TForm1
Left = 0
Height = 241
Top = 383
Width = 386
Width = 363
DataStore = VpFlexDataStore1
ControlLink = VpControlLink1
Color = clWindow
@ -170,16 +170,16 @@ object Form1: TForm1
Left = 0
Height = 5
Top = 378
Width = 386
Width = 363
Align = alBottom
ResizeAnchor = akBottom
end
end
object VpTaskList1: TVpTaskList
Left = 697
Left = 656
Height = 624
Top = 0
Width = 275
Width = 246
DataStore = VpFlexDataStore1
ControlLink = VpControlLink1
Color = clWindow
@ -204,13 +204,13 @@ object Form1: TForm1
ShowResourceName = True
end
object Splitter1: TSplitter
Left = 692
Left = 651
Height = 624
Top = 0
Width = 5
end
object Splitter3: TSplitter
Left = 301
Left = 283
Height = 624
Top = 0
Width = 5
@ -297,6 +297,8 @@ object Form1: TForm1
CategoryColorMap.Category8.Description = 'Category 8'
CategoryColorMap.Category9.Color = clMaroon
CategoryColorMap.Category9.Description = 'Category 9'
HiddenCategories.BackgroundColor = clSilver
HiddenCategories.Color = clGray
EnableEventTimer = True
PlayEventSounds = True
AutoConnect = False
@ -396,16 +398,32 @@ object Form1: TForm1
'Company'
'Job_Position'
'Job_Position'
'Address'
'Address'
'City'
'City'
'State'
'State'
'Zip'
'Zip'
'Country'
'Country'
'AddressType1'
'AddressType1'
'AddressType2'
'AddressType2'
'Address1'
'Address1'
'Address2'
'Address2'
'City1'
'City1'
'City2'
'City2'
'State1'
'State1'
'State2'
'State2'
'Zip1'
'Zip1'
'Zip2'
'Zip2'
'Country1'
'Country1'
'Country2'
'Country2'
'PathToPhoto'
'PathToPhoto'
'Notes'
'Notes'
'Phone1'
@ -430,8 +448,26 @@ object Form1: TForm1
'PhoneType5'
'Category'
'Category'
'EMail'
'EMail'
'EMail1'
'EMail1'
'EMail2'
'EMail2'
'EMail3'
'EMail3'
'EMailType1'
'EMailType1'
'EMailType2'
'EMailType2'
'EMailType3'
'EMailType3'
'Website1'
'Website1'
'Website2'
'Website2'
'WebsiteType1'
'WebsiteType1'
'WebsiteType2'
'WebsiteType2'
'Custom1'
'Custom1'
'Custom2'
@ -489,7 +525,6 @@ object Form1: TForm1
FieldDefs = <
item
Name = 'ResourceID'
Attributes = [faReadonly]
DataType = ftAutoInc
Precision = -1
end
@ -503,7 +538,7 @@ object Form1: TForm1
Name = 'Notes'
DataType = ftString
Precision = -1
Size = 255
Size = 1024
end
item
Name = 'ImageIndex'
@ -514,66 +549,6 @@ object Form1: TForm1
Name = 'ResourceActive'
DataType = ftBoolean
Precision = -1
end
item
Name = 'UserField0'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField1'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField2'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField3'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField4'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField5'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField6'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField7'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField8'
DataType = ftString
Precision = -1
Size = 100
end
item
Name = 'UserField9'
DataType = ftString
Precision = -1
Size = 100
end>
Database = SQLite3Connection1
Transaction = SQLTransaction1
@ -596,7 +571,6 @@ object Form1: TForm1
FieldDefs = <
item
Name = 'RecordID'
Attributes = [faReadonly]
DataType = ftAutoInc
Precision = -1
end
@ -679,7 +653,7 @@ object Form1: TForm1
Name = 'Notes'
DataType = ftString
Precision = -1
Size = 255
Size = 1024
end
item
Name = 'Phone1'
@ -792,7 +766,6 @@ object Form1: TForm1
FieldDefs = <
item
Name = 'RecordID'
Attributes = [faReadonly]
DataType = ftAutoInc
Precision = -1
end
@ -827,7 +800,7 @@ object Form1: TForm1
Name = 'Notes'
DataType = ftString
Precision = -1
Size = 255
Size = 1024
end
item
Name = 'Category'
@ -901,7 +874,6 @@ object Form1: TForm1
FieldDefs = <
item
Name = 'RecordID'
Attributes = [faReadonly]
DataType = ftAutoInc
Precision = -1
end
@ -925,7 +897,7 @@ object Form1: TForm1
Name = 'Details'
DataType = ftString
Precision = -1
Size = 255
Size = 1024
end
item
Name = 'CreatedOn'
@ -978,7 +950,6 @@ object Form1: TForm1
object SQLite3Connection1: TSQLite3Connection
Connected = False
LoginPrompt = False
DatabaseName = 'data.db'
KeepConnection = False
Transaction = SQLTransaction1
Options = []

View File

@ -154,12 +154,21 @@ begin
'"Title" VARCHAR(50), '+
'"Company" VARCHAR(50), '+
'"Job_Position" VARCHAR(30), '+
'"Address" VARCHAR(100), '+
'"City" VARCHAR(50), '+
'"State" VARCHAR(25), '+
'"Zip" VARCHAR(10), '+
'"Country" VARCHAR(25), '+
'"AddressType1" INTEGER, '+
'"Address1" VARCHAR(100), '+
'"City1" VARCHAR(50), '+
'"State1" VARCHAR(25), '+
'"Zip1" VARCHAR(10), '+
'"Country1" VARCHAR(25), '+
'"AddressType2" INTEGER, '+
'"Address2" VARCHAR(100), '+
'"City2" VARCHAR(50), '+
'"State2" VARCHAR(25), '+
'"Zip2" VARCHAR(10), '+
'"Country2" VARCHAR(25), '+
'"Notes" VARCHAR(1024), '+
'"PathToPhoto" VARCHAR(255), '+
'"Category" INTEGER, '+
'"Phone1" VARCHAR(25), '+
'"Phone2" VARCHAR(25), '+
'"Phone3" VARCHAR(25), '+
@ -170,12 +179,20 @@ begin
'"PhoneType3" INTEGER, '+
'"PhoneType4" INTEGER, '+
'"PhoneType5" INTEGER, '+
'"Category" INTEGER, '+
'"EMail" VARCHAR (100), '+
'"Custom1" VARCHAR (100), '+
'"Custom2" VARCHAR (100), '+
'"Custom3" VARCHAR (100), '+
'"Custom4" VARCHAR (100)); '
'"EMail1" VARCHAR(100), '+
'"EMail2" VARCHAR(100), '+
'"EMail3" VARCHAR(100), '+
'"EMailType1" INTEGER, '+
'"EMailType2" INTEGER, '+
'"EMailType3" INTEGER, '+
'"Website1" VARCHAR(100), '+
'"Website2" VARCHAR(100), '+
'"WebsiteType1" INTEGER, '+
'"WebsiteType2" INTEGER, '+
'"Custom1" VARCHAR(100), '+
'"Custom2" VARCHAR(100), '+
'"Custom3" VARCHAR(100), '+
'"Custom4" VARCHAR(100)); '
);
SQLite3Connection1.ExecuteDirect(
'CREATE UNIQUE INDEX "Contacts_RecordID_idx" ON "Contacts" ("RecordID");'

View File

@ -119,6 +119,12 @@ msgstr "Web-Browser kann nicht gestartet werden. Bitte stellen Sie sicher, dass
msgid "Brush"
msgstr "Füllung"
#: vpsr.rsbusinesswebsitelabel
#, fuzzy
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr "Geschäftlich"
#: vpsr.rscalendarelement
msgid "Calendar"
msgstr "Kalender"
@ -165,6 +171,7 @@ msgid "Category %d"
msgstr "Kategorie %d"
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
msgstr "Geschäftlich"
@ -177,6 +184,7 @@ msgid "Family"
msgstr "Familie"
#: vpsr.rscategorylabel4
msgctxt "vpsr.rscategorylabel4"
msgid "Personal"
msgstr "Persönlich"
@ -463,6 +471,18 @@ msgstr "Von Ihrem Zeitplan?"
msgid "Height"
msgstr "Höhe"
#: vpsr.rshomeaddresslabel
#, fuzzy
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr "Zuhause"
#: vpsr.rshomeemaillabel
#, fuzzy
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr "Zuhause"
#: vpsr.rshours
msgid "Hours"
msgstr "Stunden"
@ -716,6 +736,12 @@ msgstr "OK"
msgid "&Open Item"
msgstr "Eintrag ö&ffnen"
#: vpsr.rsotheremaillabel
#, fuzzy
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr "Andere"
#: vpsr.rsoutofrange
msgid "Out of range"
msgstr "Außerhalb des zulässigen Bereichs"
@ -748,6 +774,12 @@ msgstr "Prozent"
msgid "This operation cannot be undone!"
msgstr "Diese Operation kann nicht rückgängig gemacht werden!"
#: vpsr.rspersonalwebsitelabel
#, fuzzy
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr "Persönlich"
#: vpsr.rsphonetypelabel1
msgid "Assistant"
msgstr "Assistent"
@ -777,6 +809,7 @@ msgid "TTY/TDD"
msgstr "TTY/TDD"
#: vpsr.rsphonetypelabel16
msgctxt "vpsr.rsphonetypelabel16"
msgid "Work"
msgstr "Arbeit"
@ -798,6 +831,7 @@ msgid "Company"
msgstr "Firma"
#: vpsr.rsphonetypelabel5
msgctxt "vpsr.rsphonetypelabel5"
msgid "Home"
msgstr "Zuhause"
@ -1174,6 +1208,18 @@ msgstr "Breite"
msgid "Width:"
msgstr "Breite:"
#: vpsr.rsworkaddresslabel
#, fuzzy
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr "Arbeit"
#: vpsr.rsworkemaillabel
#, fuzzy
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr "Arbeit"
#: vpsr.rsxdays
msgid "%d days"
msgstr "%d Tage"
@ -1498,3 +1544,4 @@ msgstr "Unbekannte Achsen-Spezifikation: %s"
#: vpsr.sxmldecnotatbeg
msgid "The XML declaration must appear before the first element"
msgstr "Die XML-Deklaration muss vor dem ersten Element erscheinen."

View File

@ -125,6 +125,12 @@ msgstr "Échec de démarrage de votre browser internet. Veuillez verifier que vo
msgid "Brush"
msgstr ""
#: vpsr.rsbusinesswebsitelabel
#, fuzzy
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr "Professionnel"
#: vpsr.rscalendarelement
msgid "Calendar"
msgstr ""
@ -171,6 +177,7 @@ msgid "Category %d"
msgstr "Catégorie %d"
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
msgstr "Professionnel"
@ -183,6 +190,7 @@ msgid "Family"
msgstr "Famille"
#: vpsr.rscategorylabel4
msgctxt "vpsr.rscategorylabel4"
msgid "Personal"
msgstr "Personnel"
@ -469,6 +477,18 @@ msgstr "de votre agenda?"
msgid "Height"
msgstr ""
#: vpsr.rshomeaddresslabel
#, fuzzy
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr "Maison"
#: vpsr.rshomeemaillabel
#, fuzzy
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr "Maison"
#: vpsr.rshours
msgid "Hours"
msgstr "Heures"
@ -722,6 +742,12 @@ msgstr "OK"
msgid "&Open Item"
msgstr "&Item ouvert"
#: vpsr.rsotheremaillabel
#, fuzzy
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr "Autre"
#: vpsr.rsoutofrange
msgid "Out of range"
msgstr "Hors de portée"
@ -754,6 +780,12 @@ msgstr ""
msgid "This operation cannot be undone!"
msgstr "Ce processus est irreversible!"
#: vpsr.rspersonalwebsitelabel
#, fuzzy
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr "Personnel"
#: vpsr.rsphonetypelabel1
msgid "Assistant"
msgstr "Assistante"
@ -783,6 +815,7 @@ msgid "TTY/TDD"
msgstr "ATS/ATM"
#: vpsr.rsphonetypelabel16
msgctxt "vpsr.rsphonetypelabel16"
msgid "Work"
msgstr "Travail"
@ -804,6 +837,7 @@ msgid "Company"
msgstr "Société"
#: vpsr.rsphonetypelabel5
msgctxt "vpsr.rsphonetypelabel5"
msgid "Home"
msgstr "Maison"
@ -1180,6 +1214,18 @@ msgstr ""
msgid "Width:"
msgstr ""
#: vpsr.rsworkaddresslabel
#, fuzzy
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr "Travail"
#: vpsr.rsworkemaillabel
#, fuzzy
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr "Travail"
#: vpsr.rsxdays
msgid "%d days"
msgstr "%d jours"

View File

@ -119,6 +119,12 @@ msgstr "Webbrowser kan niet gestart worden. Controleer uw systeeminstellingen."
msgid "Brush"
msgstr ""
#: vpsr.rsbusinesswebsitelabel
#, fuzzy
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr "Zakelijk"
#: vpsr.rscalendarelement
msgid "Calendar"
msgstr ""
@ -165,6 +171,7 @@ msgid "Category %d"
msgstr "Categorie %d"
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
msgstr "Zakelijk"
@ -177,6 +184,7 @@ msgid "Family"
msgstr "Familie"
#: vpsr.rscategorylabel4
msgctxt "vpsr.rscategorylabel4"
msgid "Personal"
msgstr "Persoonlijk"
@ -463,6 +471,18 @@ msgstr "van uw tijdschema?"
msgid "Height"
msgstr ""
#: vpsr.rshomeaddresslabel
#, fuzzy
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr "Thuis"
#: vpsr.rshomeemaillabel
#, fuzzy
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr "Thuis"
#: vpsr.rshours
msgid "Hours"
msgstr "Uren"
@ -716,6 +736,12 @@ msgstr "OK"
msgid "&Open Item"
msgstr "&Open Item"
#: vpsr.rsotheremaillabel
#, fuzzy
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr "Andere"
#: vpsr.rsoutofrange
msgid "Out of range"
msgstr "Buiten geldig bereik"
@ -748,6 +774,12 @@ msgstr ""
msgid "This operation cannot be undone!"
msgstr "Deze operatie kan niet ongedaan gemaakt worden!"
#: vpsr.rspersonalwebsitelabel
#, fuzzy
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr "Persoonlijk"
#: vpsr.rsphonetypelabel1
msgid "Assistant"
msgstr "Assistent"
@ -777,6 +809,7 @@ msgid "TTY/TDD"
msgstr "TTY/TDD"
#: vpsr.rsphonetypelabel16
msgctxt "vpsr.rsphonetypelabel16"
msgid "Work"
msgstr "Werk"
@ -798,6 +831,7 @@ msgid "Company"
msgstr "Firma"
#: vpsr.rsphonetypelabel5
msgctxt "vpsr.rsphonetypelabel5"
msgid "Home"
msgstr "Thuis"
@ -1174,6 +1208,18 @@ msgstr ""
msgid "Width:"
msgstr ""
#: vpsr.rsworkaddresslabel
#, fuzzy
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr "Werk"
#: vpsr.rsworkemaillabel
#, fuzzy
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr "Werk"
#: vpsr.rsxdays
msgid "%d days"
msgstr "%d dagen"

View File

@ -109,6 +109,11 @@ msgstr ""
msgid "Brush"
msgstr ""
#: vpsr.rsbusinesswebsitelabel
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr ""
#: vpsr.rscalendarelement
msgid "Calendar"
msgstr ""
@ -155,6 +160,7 @@ msgid "Category %d"
msgstr ""
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
msgstr ""
@ -167,6 +173,7 @@ msgid "Family"
msgstr ""
#: vpsr.rscategorylabel4
msgctxt "vpsr.rscategorylabel4"
msgid "Personal"
msgstr ""
@ -453,6 +460,16 @@ msgstr ""
msgid "Height"
msgstr ""
#: vpsr.rshomeaddresslabel
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr ""
#: vpsr.rshomeemaillabel
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr ""
#: vpsr.rshours
msgid "Hours"
msgstr ""
@ -706,6 +723,11 @@ msgstr ""
msgid "&Open Item"
msgstr ""
#: vpsr.rsotheremaillabel
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr ""
#: vpsr.rsoutofrange
msgid "Out of range"
msgstr ""
@ -738,6 +760,11 @@ msgstr ""
msgid "This operation cannot be undone!"
msgstr ""
#: vpsr.rspersonalwebsitelabel
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr ""
#: vpsr.rsphonetypelabel1
msgid "Assistant"
msgstr ""
@ -767,6 +794,7 @@ msgid "TTY/TDD"
msgstr ""
#: vpsr.rsphonetypelabel16
msgctxt "vpsr.rsphonetypelabel16"
msgid "Work"
msgstr ""
@ -788,6 +816,7 @@ msgid "Company"
msgstr ""
#: vpsr.rsphonetypelabel5
msgctxt "vpsr.rsphonetypelabel5"
msgid "Home"
msgstr ""
@ -1164,6 +1193,16 @@ msgstr ""
msgid "Width:"
msgstr ""
#: vpsr.rsworkaddresslabel
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr ""
#: vpsr.rsworkemaillabel
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr ""
#: vpsr.rsxdays
msgid "%d days"
msgstr ""

View File

@ -119,6 +119,12 @@ msgstr "Ошибка запуска браузер. Убедитесь в пра
msgid "Brush"
msgstr ""
#: vpsr.rsbusinesswebsitelabel
#, fuzzy
msgctxt "vpsr.rsbusinesswebsitelabel"
msgid "Business"
msgstr "Дела"
#: vpsr.rscalendarelement
msgid "Calendar"
msgstr "Календарь"
@ -165,6 +171,7 @@ msgid "Category %d"
msgstr "Категория %d"
#: vpsr.rscategorylabel1
msgctxt "vpsr.rscategorylabel1"
msgid "Business"
msgstr "Дела"
@ -177,6 +184,7 @@ msgid "Family"
msgstr "Семья"
#: vpsr.rscategorylabel4
msgctxt "vpsr.rscategorylabel4"
msgid "Personal"
msgstr "Персонал"
@ -463,6 +471,18 @@ msgstr "из вашего расписания?"
msgid "Height"
msgstr "Высота"
#: vpsr.rshomeaddresslabel
#, fuzzy
msgctxt "vpsr.rshomeaddresslabel"
msgid "Home"
msgstr "Домашний"
#: vpsr.rshomeemaillabel
#, fuzzy
msgctxt "vpsr.rshomeemaillabel"
msgid "Home"
msgstr "Домашний"
#: vpsr.rshours
msgid "Hours"
msgstr "Часы"
@ -716,6 +736,12 @@ msgstr ""
msgid "&Open Item"
msgstr "Открыть эелемент"
#: vpsr.rsotheremaillabel
#, fuzzy
msgctxt "vpsr.rsotheremaillabel"
msgid "Other"
msgstr "Другой"
#: vpsr.rsoutofrange
msgid "Out of range"
msgstr "За пределами диапазона"
@ -748,6 +774,12 @@ msgstr "Процент"
msgid "This operation cannot be undone!"
msgstr ""
#: vpsr.rspersonalwebsitelabel
#, fuzzy
msgctxt "vpsr.rspersonalwebsitelabel"
msgid "Personal"
msgstr "Персонал"
#: vpsr.rsphonetypelabel1
msgid "Assistant"
msgstr "Ассистент"
@ -777,6 +809,7 @@ msgid "TTY/TDD"
msgstr ""
#: vpsr.rsphonetypelabel16
msgctxt "vpsr.rsphonetypelabel16"
msgid "Work"
msgstr "Рабочий"
@ -798,6 +831,7 @@ msgid "Company"
msgstr "Компания"
#: vpsr.rsphonetypelabel5
msgctxt "vpsr.rsphonetypelabel5"
msgid "Home"
msgstr "Домашний"
@ -1174,6 +1208,18 @@ msgstr ""
msgid "Width:"
msgstr ""
#: vpsr.rsworkaddresslabel
#, fuzzy
msgctxt "vpsr.rsworkaddresslabel"
msgid "Work"
msgstr "Рабочий"
#: vpsr.rsworkemaillabel
#, fuzzy
msgctxt "vpsr.rsworkemaillabel"
msgid "Work"
msgstr "Рабочий"
#: vpsr.rsxdays
msgid "%d days"
msgstr "%d дней"

View File

@ -817,7 +817,6 @@ end;
procedure TVpCustomDatastore.UpdateGroupEvents;
var
i: Integer;
event: TVpEvent;
id: Integer;
res: TVpResource;
begin
@ -831,14 +830,14 @@ begin
for i:=0 to Resource.Group.Count-1 do begin
// current resource of group
res := Resource.Group[i];
if res <> nil then begin
id := res.ResourceID;
// Ignore active resource in group
if id = ResourceID then
Continue;
// Load events of the current resource of the group
LoadEventsOfResource(id);
end;
if res = nil then
Continue;
id := res.ResourceID;
// Ignore active resource in resource group (it shouldn't be there anyway)
if id = ResourceID then
Continue;
// load events of current group
LoadEventsOfResource(id);
end;
NotifyDependents;

View File

@ -502,7 +502,12 @@ type
FAnniversary: TDateTime;
FTitle: string;
FCompany: string;
FEmail: string;
FEMail1: string;
FEMail2: String;
FEMail3: String;
FEMailType1: integer;
FEMailType2: integer;
FEMailType3: integer;
FPhone1: string;
FPhone2: string;
FPhone3: string;
@ -513,13 +518,25 @@ type
FPhoneType3: integer;
FPhoneType4: integer;
FPhoneType5: integer;
FAddress: string;
FCity: string;
FState: string;
FZip: string;
FCountry: string;
FWebsite1: String;
FWebsite2: String;
FWebsiteType1: Integer;
FWebsiteType2: Integer;
FAddressType1: Integer;
FAddressType2: Integer;
FAddress1: string;
FAddress2: String;
FCity1: string;
FCity2: String;
FState1: string;
FState2: String;
FZip1: string;
FZip2: String;
FCountry1: string;
FCountry2: String;
FNotes: string;
FPrivateRec: boolean;
FPathToPhoto: String;
FCategory: integer;
FCustom1: string;
FCustom2: string;
@ -536,23 +553,34 @@ type
FUserField7: string;
FUserField8: string;
FUserField9: string;
procedure SetAddress(const Value: string);
procedure SetAddress1(const Value: string);
procedure SetAddress2(const Value: String);
procedure SetAddressType1(Value: Integer);
procedure SetAddressType2(Value: Integer);
procedure SetBirthDate(Value: TDateTime);
procedure SetAnniversary(Value: TDateTime);
procedure SetCategory(Value: integer);
procedure SetChanged(Value: Boolean);
procedure SetCity(const Value: string);
procedure SetCity1(const Value: string);
procedure SetCity2(const Value: String);
procedure SetCompany(const Value: string);
procedure SetCountry(const Value: string);
procedure SetCountry1(const Value: string);
procedure SetCountry2(const Value: string);
procedure SetCustom1(const Value: string);
procedure SetCustom2(const Value: string);
procedure SetCustom3(const Value: string);
procedure SetCustom4(const Value: string);
procedure SetDeleted(Value: Boolean);
procedure SetEMail(const Value: string);
procedure SetEMail1(const Value: string);
procedure SetEMail2(const Value: string);
procedure SetEMail3(const Value: string);
procedure SetEMailType1(const Value: Integer);
procedure SetEMailType2(const Value: Integer);
procedure SetEMailType3(const Value: Integer);
procedure SetFirstName(const Value: string);
procedure SetLastName(const Value: string);
procedure SetNotes(const Value: string);
procedure SetPathToPhoto(const Value: String);
procedure SetPhone1(const Value: string);
procedure SetPhone2(const Value: string);
procedure SetPhone3(const Value: string);
@ -565,9 +593,15 @@ type
procedure SetPhoneType5(Value: integer);
procedure SetPosition(const Value: string);
procedure SetRecordID(Value: Integer);
procedure SetState(const Value: string);
procedure SetState1(const Value: string);
procedure SetState2(const Value: string);
procedure SetTitle(const Value: string);
procedure SetZip(const Value: string);
procedure SetWebsite1(Value: String);
procedure SetWebsite2(Value: String);
procedure SetWebsiteType1(Value: integer);
procedure SetWebsiteType2(Value: integer);
procedure SetZip1(const Value: string);
procedure SetZip2(const Value: string);
public
constructor Create(Owner: TVpContacts);
destructor Destroy; override;
@ -590,7 +624,13 @@ type
property Anniversary: TDateTime read FAnniversary write SetAnniversary;
property Title: string read FTitle write SetTitle;
property Company: string read FCompany write SetCompany;
property EMail: string read FEmail write SetEMail;
property EMail: string read FEmail1 write SetEMail1; deprecated 'Use "EMail1" instead';
property EMail1: String read FEmail1 write SetEMail1;
property EMail2: String read FEmail2 write SetEmail2;
property EMail3: String read FEmail3 write SetEmail3;
property EMailType1: integer read FEMailType1 write SetEMailType1;
property EMailType2: integer read FEMailType2 write SetEMailType2;
property EMailType3: integer read FEMailType3 write SetEMailType3;
property Phone1: string read FPhone1 write SetPhone1;
property Phone2: string read FPhone2 write SetPhone2;
property Phone3: string read FPhone3 write SetPhone3;
@ -601,13 +641,30 @@ type
property PhoneType3: integer read FPhoneType3 write SetPhoneType3;
property PhoneType4: integer read FPhoneType4 write SetPhoneType4;
property PhoneType5: integer read FPhoneType5 write SetPhoneType5;
property Address: string read FAddress write SetAddress;
property City: string read FCity write SetCity;
property State: string read FState write SetState;
property Zip: string read FZip write SetZip;
property Country: string read FCountry write SetCountry;
property Website1: string read FWebsite1 write SetWebsite1;
property Website2: string read FWebsite2 write SetWebsite2;
property WebsiteType1: integer read FWebsiteType1 write SetWebsiteType1;
property WebsiteType2: integer read FWebsiteType2 write SetWebsiteType2;
property Address: string read FAddress1 write SetAddress1; deprecated 'Use "Address1" instead';
property Address1: string read FAddress1 write SetAddress1;
property Address2: string read FAddress2 write SetAddress2;
property City: string read FCity1 write SetCity1; deprecated 'Use "City1" instead';
property City1: string read FCity1 write SetCity1;
property City2: string read FCity2 write SetCity2;
property State: string read FState1 write SetState1; deprecated 'Use "State1" instead';
property State1: string read FState1 write SetState1;
property State2: string read FState2 write SetState2;
property Zip: string read FZip1 write SetZip1; deprecated 'Use "Zip1" instead';
property Zip1: string read FZip1 write SetZip1;
property Zip2: string read FZip2 write SetZip2;
property Country: string read FCountry1 write SetCountry1; deprecated 'Use "Country1" instead';
property Country1: string read FCountry1 write SetCountry1;
property Country2: string read FCountry2 write SetCountry2;
property AddressType1: integer read FAddressType1 write SetAddressType1;
property AddressType2: integer read FAddressType2 write SetAddressType2;
property Note: string read FNotes write SetNotes; deprecated 'Use "Notes" instead';
property Notes: string read FNotes write SetNotes;
property PathToPhoto: String read FPathToPhoto write SetPathToPhoto;
property Category: integer read FCategory write SetCategory;
property Custom1: string read FCustom1 write SetCustom1;
property Custom2: string read FCustom2 write SetCustom2;
@ -1800,10 +1857,34 @@ begin
end;
end;
procedure TVpContact.SetAddress(const Value: string);
procedure TVpContact.SetAddress1(const Value: string);
begin
if Value <> FAddress then begin
FAddress := Value;
if Value <> FAddress1 then begin
FAddress1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetAddress2(const Value: string);
begin
if Value <> FAddress2 then begin
FAddress2 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetAddressType1(Value: integer);
begin
if Value <> FAddressType1 then begin
FAddressType1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetAddressType2(Value: integer);
begin
if Value <> FAddressType2 then begin
FAddressType2 := Value;
Changed := true;
end;
end;
@ -1827,10 +1908,18 @@ begin
end;
end;
procedure TVpContact.SetCity(const Value: string);
procedure TVpContact.SetCity1(const Value: string);
begin
if Value <> FCity then begin
FCity := Value;
if Value <> FCity1 then begin
FCity1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetCity2(const Value: string);
begin
if Value <> FCity2 then begin
FCity2 := Value;
Changed := true;
end;
end;
@ -1843,10 +1932,18 @@ begin
end;
end;
procedure TVpContact.SetCountry(const Value: string);
procedure TVpContact.SetCountry1(const Value: string);
begin
if Value <> FCountry then begin
FCountry := Value;
if Value <> FCountry1 then begin
FCountry1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetCountry2(const Value: string);
begin
if Value <> FCountry2 then begin
FCountry2 := Value;
Changed := true;
end;
end;
@ -1891,10 +1988,50 @@ begin
end;
end;
procedure TVpContact.SetEMail(const Value: string);
procedure TVpContact.SetEMail1(const Value: string);
begin
if Value <> FEmail then begin
FEMail := Value;
if Value <> FEMail1 then begin
FEMail1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetEMail2(const Value: string);
begin
if Value <> FEMail2 then begin
FEMail2 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetEMail3(const Value: string);
begin
if Value <> FEMail3 then begin
FEMail3 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetEMailType1(const Value: Integer);
begin
if Value <> FEMailType1 then begin
FEMailType1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetEMailType2(const Value: Integer);
begin
if Value <> FEMailType2 then begin
FEMailType2 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetEMailType3(const Value: Integer);
begin
if Value <> FEMailType3 then begin
FEMailType3 := Value;
Changed := true;
end;
end;
@ -1923,6 +2060,14 @@ begin
end;
end;
procedure TVpContact.SetPathToPhoto(const Value: string);
begin
if Value <> FPathToPhoto then begin
FPathToPhoto := Value;
Changed := true;
end;
end;
procedure TVpContact.SetPhone1(const Value: string);
begin
if Value <> FPhone1 then begin
@ -2019,10 +2164,18 @@ begin
end;
end;
procedure TVpContact.SetState(const Value: string);
procedure TVpContact.SetState1(const Value: string);
begin
if Value <> FState then begin
FState := Value;
if Value <> FState1 then begin
FState1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetState2(const Value: string);
begin
if Value <> FState2 then begin
FState2 := Value;
Changed := true;
end;
end;
@ -2035,10 +2188,50 @@ begin
end;
end;
procedure TVpContact.SetZip(const Value: string);
procedure TVpContact.SetWebsite1(Value: String);
begin
if Value <> FZip then begin
FZip := Value;
if Value <> FWebsite1 then begin
FWebsite1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetWebsite2(Value: String);
begin
if Value <> FWebsite1 then begin
FWebsite2 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetWebsiteType1(Value: Integer);
begin
if Value <> FWebsiteType1 then begin
FWebsiteType1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetWebsiteType2(Value: Integer);
begin
if Value <> FWebsiteType2 then begin
FWebsiteType1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetZip1(const Value: string);
begin
if Value <> FZip1 then begin
FZip1 := Value;
Changed := true;
end;
end;
procedure TVpContact.SetZip2(const Value: string);
begin
if Value <> FZip2 then begin
FZip2 := Value;
Changed := true;
end;
end;

View File

@ -58,8 +58,10 @@ type
{ property setters }
procedure SetReadOnly(const Value: boolean);
procedure SetFilterCriteria(aTable: TDataset; aUseDateTime: Boolean;
aResourceID: Integer; aStartDateTime, aEndDateTime: TDateTime); virtual;
{ internal methods }
procedure LoadContact(AContact: TVpContact); virtual;
procedure SetFilterCriteria(ATable: TDataset; AUseDateTime: Boolean;
AResourceID: Integer; AStartDateTime, AEndDateTime: TDateTime); virtual;
protected {properties that may be surfaced later}
property ReadOnly : boolean
@ -484,37 +486,84 @@ begin
Size := 30;
Required := false;
end;
{ Address }
{ AddressType1 }
with AddFieldDef do begin
Name := 'Address';
Name := 'AddressType1';
DataType := ftInteger;
Required := false;
end;
{ Address1 }
with AddFieldDef do begin
Name := 'Address1';
DataType := ftString;
Size := 100;
Required := false;
end;
{ City }
{ City1 }
with AddFieldDef do begin
Name := 'City';
Name := 'City1';
DataType := ftString;
Size := 50;
Required := false;
end;
{ State }
{ State1 }
with AddFieldDef do begin
Name := 'State';
Name := 'State1';
DataType := ftString;
Size := 25;
Required := false;
end;
{ Zip }
{ Zip1 }
with AddFieldDef do begin
Name := 'Zip';
Name := 'Zip1';
DataType := ftString;
Size := 10;
Required := false;
end;
{ Country }
{ Country1 }
with AddFieldDef do begin
Name := 'Country';
Name := 'Country1';
DataType := ftString;
Size := 25;
Required := false;
end;
{ AddressType2 }
with AddFieldDef do begin
Name := 'AddressType2';
DataType := ftInteger;
Required := false;
end;
{ Address2 }
with AddFieldDef do begin
Name := 'Address2';
DataType := ftString;
Size := 100;
Required := false;
end;
{ City2 }
with AddFieldDef do begin
Name := 'City2';
DataType := ftString;
Size := 50;
Required := false;
end;
{ State2 }
with AddFieldDef do begin
Name := 'State2';
DataType := ftString;
Size := 25;
Required := false;
end;
{ Zip2 }
with AddFieldDef do begin
Name := 'Zip2';
DataType := ftString;
Size := 10;
Required := false;
end;
{ Country2 }
with AddFieldDef do begin
Name := 'Country2';
DataType := ftString;
Size := 25;
Required := false;
@ -561,47 +610,112 @@ begin
Size := 25;
Required := false;
end;
{ Phone1 }
{ PhoneType1 }
with AddFieldDef do begin
Name := 'PhoneType1';
DataType := ftInteger;
Required := false;
end;
{ Phone2 }
{ PhoneType2 }
with AddFieldDef do begin
Name := 'PhoneType2';
DataType := ftInteger;
Required := false;
end;
{ Phone3 }
{ PhoneType3 }
with AddFieldDef do begin
Name := 'PhoneType3';
DataType := ftInteger;
Required := false;
end;
{ Phone4 }
{ PhoneType4 }
with AddFieldDef do begin
Name := 'PhoneType4';
DataType := ftInteger;
Required := false;
end;
{ Phone5 }
{ PhoneType5 }
with AddFieldDef do begin
Name := 'PhoneType5';
DataType := ftInteger;
Required := false;
end;
{ EMail1 }
with AddFieldDef do begin
Name := 'EMail1';
DataType := ftString;
Size := 100;
Required := false;
end;
{ EMail2 }
with AddFieldDef do begin
Name := 'EMail2';
DataType := ftString;
Size := 100;
Required := false;
end;
{ EMail3 }
with AddFieldDef do begin
Name := 'EMail3';
DataType := ftString;
Size := 100;
Required := false;
end;
{ EMailType1 }
with AddFieldDef do begin
Name := 'EMailType1';
DataType := ftInteger;
Required := false;
end;
{ EMailType2 }
with AddFieldDef do begin
Name := 'EMailType2';
DataType := ftInteger;
Required := false;
end;
{ EMailType3 }
with AddFieldDef do begin
Name := 'EMailType3';
DataType := ftInteger;
Required := false;
end;
{ Website1 }
with AddFieldDef do begin
Name := 'Website1';
DataType := ftString;
Size := 100;
Required := false;
end;
{ Website2 }
with AddFieldDef do begin
Name := 'Website2';
DataType := ftString;
Size := 100;
Required := false;
end;
{ WebsiteType1 }
with AddFieldDef do begin
Name := 'WebsiteType1';
DataType := ftInteger;
Required := false;
end;
{ WebsiteType2 }
with AddFieldDef do begin
Name := 'WebsiteType2';
DataType := ftInteger;
Required := false;
end;
{ Category }
with AddFieldDef do begin
Name := 'Category';
DataType := ftInteger;
Required := false;
end;
{ EMail }
{ PathToPhoto }
with AddFieldDef do begin
Name := 'EMail';
Name := 'PathToPhoto';
DataType := ftString;
Size := 100;
Size := 255;
Required := false;
end;
{ Custom1 }
@ -1089,11 +1203,142 @@ begin
end; {with EventsTable}
end;
{=====}
{ Loads the contact from the current cursor position of the contacts table }
procedure TVpCustomDBDataStore.LoadContact(AContact: TVpContact);
var
F: TField;
begin
with ContactsTable do
begin
AContact.RecordID := FieldByName('RecordID').AsInteger;
AContact.FirstName := FieldByName('FirstName').AsString;
AContact.LastName := FieldByName('LastName').AsString;
AContact.Birthdate := FieldByName('BirthDate').AsDateTime;
AContact.Anniversary := FieldByName('Anniversary').AsDateTime;
AContact.Title := FieldByName('Title').AsString;
AContact.Company := FieldByName('Company').AsString;
AContact.Job_Position := FieldByName('Job_Position').AsString;
AContact.Category := FieldByName('Category').AsInteger;
F := FindField('Notes');
if F = nil then F := FindField('Note'); // deprecated
if F <> nil then AContact.Notes := F.AsString;
// photo file name - new in 1.05
F := FindField('PathToPhoto');
if F <> nil then AContact.PathToPhoto := F.AsString;
// two address types - new in 1.05
F := FindField('AddressType1');
if F <> nil then AContact.AddressType1 := F.AsInteger;
F := FindField('AddressType2');
if F <> nil then AContact.AddressType2 := F.AsInteger;
F := FindField('Address1');
if F = nil then F := FindField('Address');
if F <> nil then AContact.Address1 := F.AsString;
F := FindField('Address2');
if F <> nil then AContact.Address2 := F.AsString;
F := FindField('City1');
if F = nil then F := FindField('City');
if F <> nil then AContact.City1 := F.AsString;
F := FindField('City2');
if F <> nil then AContact.City2 := F.AsString;
F := FindField('State1');
if F = nil then F := FindField('State');
if F <> nil then AContact.State1 := F.AsString;
F := FindField('State2');
if F <> nil then AContact.State2 := F.AsString;
F := FindField('Zip1');
if F = nil then F := FindField('Zip');
if F <> nil then AContact.Zip1 := F.AsString;
F := FindField('Zip2');
if F <> nil then AContact.Zip2 := F.AsString;
F := FindField('Country1');
if F = nil then F := FindField('Country');
if F <> nil then AContact.Country1 := F.AsString;
F := FindField('Country2');
if F <> nil then AContact.Country2 := F.AsString;
{
Contact.Address := FieldByName('Address').AsString;
Contact.City := FieldByName('City').AsString;
Contact.State := FieldByName('State').AsString;
Contact.Zip := FieldByName('Zip').AsString;
Contact.Country := FieldByName('Country').AsString;
}
AContact.Phone1 := FieldByName('Phone1').AsString;
AContact.Phone2 := FieldByName('Phone2').AsString;
AContact.Phone3 := FieldByName('Phone3').AsString;
AContact.Phone4 := FieldByName('Phone4').AsString;
AContact.Phone5 := FieldByName('Phone5').AsString;
AContact.PhoneType1 := FieldByName('PhoneType1').AsInteger;
AContact.PhoneType2 := FieldByName('PhoneType2').AsInteger;
AContact.PhoneType3 := FieldByName('PhoneType3').AsInteger;
AContact.PhoneType4 := FieldByName('PhoneType4').AsInteger;
AContact.PhoneType5 := FieldByName('PhoneType5').AsInteger;
// EMail fields - new in 1.05
F := FindField('EMail1');
if F = nil then F := FindField('EMail');
if F <> nil then AContact.EMail1 := F.AsString;
F := FindField('EMail2');
if F <> nil then AContact.EMail2 := F.AsString;
F := FindField('EMail3');
if F <> nil then AContact.EMail := F.AsString;
F := FindField('EMailType1');
if F <> nil then AContact.EMailType1 := F.AsInteger;
F := FindField('EMailType2');
if F <> nil then AContact.EMailType2 := F.AsInteger;
F := FindField('EMailType3');
if F <> nil then AContact.EMailType3 := F.AsInteger;
// Website fields - new in 1.05
F := FindField('Website1');
if F <> nil then AContact.Website1 := F.AsString;
F := FindField('Website2');
if F <> nil then AContact.Website2 := F.AsString;
F := FindField('WebsiteType1');
if F <> nil then AContact.WebsiteType1 := F.AsInteger;
F := FindField('WebsiteType2');
if F <> nil then AContact.WebsiteType2 := F.AsInteger;
// Custom fields
F := FindField('Custom1');
if F <> nil then AContact.Custom1 := F.AsString;
F := FindField('Custom2');
if F <> nil then AContact.Custom2 := F.AsString;
F := FindField('Custom3');
if F <> nil then AContact.Custom3 := F.AsString;
F := FindField('Custom4');
if F <> nil then AContact.Custom4 := F.AsString;
// User-defined fields
F := FindField('UserField0');
if F <> nil then AContact.UserField0 := F.AsString;
F := FindField('UserField1');
if F <> nil then AContact.UserField1 := F.AsString;
F := FindField('UserField2');
if F <> nil then AContact.UserField2 := F.AsString;
F := FindField('UserField3');
if F <> nil then AContact.UserField3 := F.AsString;
F := FindField('UserField4');
if F <> nil then AContact.UserField4 := F.AsString;
F := FindField('UserField5');
if F <> nil then AContact.UserField5 := F.AsString;
F := FindField('UserField6');
if F <> nil then AContact.UserField6 := F.AsString;
F := FindField('UserField7');
if F <> nil then AContact.UserField7 := F.AsString;
F := FindField('UserField8');
if F <> nil then AContact.UserField8 := F.AsString;
F := FindField('UserField9');
if F <> nil then AContact.UserField9 := F.AsString;
end;
end;
procedure TVpCustomDBDataStore.LoadContacts;
var
Contact: TVpContact;
F: TField;
contact: TVpContact;
begin
if (Resource <> nil) then
with ContactsTable do begin
@ -1103,66 +1348,14 @@ begin
);
First;
while not EOF do begin
Contact := Resource.Contacts.AddContact(GetNextID(ContactsTableName));
Contact.Loading := true;
Contact.RecordID := FieldByName('RecordID').AsInteger;
Contact.FirstName := FieldByName('FirstName').AsString;
Contact.LastName := FieldByName('LastName').AsString;
Contact.Birthdate := FieldByName('BirthDate').AsDateTime;
Contact.Anniversary := FieldByName('Anniversary').AsDateTime;
Contact.Title := FieldByName('Title').AsString;
Contact.Company := FieldByName('Company').AsString;
Contact.Job_Position := FieldByName('Job_Position').AsString;
Contact.EMail := FieldByName('EMail').AsString;
Contact.Address := FieldByName('Address').AsString;
Contact.City := FieldByName('City').AsString;
Contact.State := FieldByName('State').AsString;
Contact.Zip := FieldByName('Zip').AsString;
Contact.Country := FieldByName('Country').AsString;
F := FieldByName('Notes');
if F = nil then F := FieldByName('Note'); // deprecated
if F <> nil then Contact.Notes := F.AsString;
Contact.Phone1 := FieldByName('Phone1').AsString;
Contact.Phone2 := FieldByName('Phone2').AsString;
Contact.Phone3 := FieldByName('Phone3').AsString;
Contact.Phone4 := FieldByName('Phone4').AsString;
Contact.Phone5 := FieldByName('Phone5').AsString;
Contact.PhoneType1 := FieldByName('PhoneType1').AsInteger;
Contact.PhoneType2 := FieldByName('PhoneType2').AsInteger;
Contact.PhoneType3 := FieldByName('PhoneType3').AsInteger;
Contact.PhoneType4 := FieldByName('PhoneType4').AsInteger;
Contact.PhoneType5 := FieldByName('PhoneType5').AsInteger;
Contact.Category := FieldByName('Category').AsInteger;
Contact.Custom1 := FieldByName('Custom1').AsString;
Contact.Custom2 := FieldByName('Custom2').AsString;
Contact.Custom3 := FieldByName('Custom3').AsString;
Contact.Custom4 := FieldByName('Custom4').AsString;
F := FindField('UserField0');
if F <> nil then Contact.UserField0 := F.AsString;
F := FindField('UserField1');
if F <> nil then Contact.UserField1 := F.AsString;
F := FindField('UserField2');
if F <> nil then Contact.UserField2 := F.AsString;
F := FindField('UserField3');
if F <> nil then Contact.UserField3 := F.AsString;
F := FindField('UserField4');
if F <> nil then Contact.UserField4 := F.AsString;
F := FindField('UserField5');
if F <> nil then Contact.UserField5 := F.AsString;
F := FindField('UserField6');
if F <> nil then Contact.UserField6 := F.AsString;
F := FindField('UserField7');
if F <> nil then Contact.UserField7 := F.AsString;
F := FindField('UserField8');
if F <> nil then Contact.UserField8 := F.AsString;
F := FindField('UserField9');
if F <> nil then Contact.UserField9 := F.AsString;
Contact.Loading := false;
contact := Resource.Contacts.AddContact(GetNextID(ContactsTableName));
contact.Loading := true;
LoadContact(contact);
contact.Loading := false;
Next;
end; {while}
end; {with ContactsTable}
end;
end;
end;
{=====}
procedure TVpCustomDBDataStore.LoadTasks;
var
@ -1215,6 +1408,200 @@ begin
end;
{=====}
procedure TVpCustomDBDataStore.PostContacts;
var
I: Integer;
Contact: TVpContact;
F: TField;
begin
if (Resource <> nil) and Resource.ContactsDirty then begin
{ Dump this resource's dirty contacts to the DB }
if ResourceTable.Locate('ResourceID', Resource.ResourceID, []) then begin
SetFilterCriteria(ContactsTable, False, Resource.ResourceID, 0, 0);
for I := pred(Resource.Contacts.Count) downto 0 do begin
Contact := Resource.Contacts.GetContact(I);
{ if the delete flag is set then delete the record }
{ and free the event instance }
if Contact.Deleted then begin
if ContactsTable.Locate('RecordID', Contact.RecordID, [])
then ContactsTable.Delete;
Contact.Free;
Continue;
end;
if Contact.Changed then begin
if ContactsTable.Locate('RecordID', Contact.RecordID, []) then
{ this event already exists in the database so update it }
ContactsTable.Edit
else begin
{ this record doesn't exist in the database, so it's a new event }
ContactsTable.Append;
end;
try
{ DataStore descendants that can use an autoincrement RecordID }
{ field set the RecordID to -1 by default. If the RecordID is }
{ -1 then this is a new record and we shouldn't overwrite }
{ RecordID with a bogus value }
if Contact.RecordID > -1 then
ContactsTable.FieldByName('RecordID').AsInteger := Contact.RecordID;
ContactsTable.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
ContactsTable.FieldByName('FirstName').AsString := Contact.FirstName;
ContactsTable.FieldByName('LastName').AsString := Contact.LastName;
ContactsTable.FieldByName('Birthdate').AsDateTime := Contact.Birthdate;
ContactsTable.FieldByName('Anniversary').AsDateTime := Contact.Anniversary;
ContactsTable.FieldByName('Title').AsString := Contact.Title;
ContactsTable.FieldByName('Company').AsString := Contact.Company;
ContactsTable.FieldByName('Job_Position').AsString := Contact.Job_Position;
ContactsTable.FieldByName('Category').AsInteger := Contact.Category;
F := ContactsTable.FindField('Notes');
if F = nil then F := ContactsTable.FindField('Note');
if F <> nil then F.AsString := Contact.Notes;
// File name of picture -- new in 1.05
F := ContactsTable.FindField('PathToPhoto');
if F <> nil then F.AsString := Contact.PathToPhoto;
// two address types -- new in 1.05
F := ContactsTable.FindField('AddressType1');
if F <> nil then F.AsInteger := Contact.AddressType1;
F := ContactsTable.FindField('AddressType2');
if F <> nil then F.AsInteger := Contact.AddressType2;
F := ContactsTable.FindField('Address1');
if F = nil then F := ContactsTable.FindField('Address');
if F <> nil then F.AsString := Contact.Address1;
F := ContactsTable.FindField('Address2');
if F <> nil then F.AsString := Contact.Address2;
F := ContactsTable.FindField('City1');
if F = nil then F := ContactsTable.FindField('City');
if F <> nil then F.AsString := Contact.City1;
F := ContactsTable.FindField('City2');
if F <> nil then F.AsString := Contact.City2;
F := ContactsTable.FindField('State1');
if F = nil then F := ContactsTable.FindField('State');
if F <> nil then F.AsString := Contact.State1;
F := ContactsTable.FindField('State2');
if F <> nil then F.AsString := Contact.State2;
F := ContactsTable.FindField('Zip1');
if F = nil then F := ContactsTable.FindField('Zip');
if F <> nil then F.AsString := Contact.Zip1;
F := ContactsTable.FindField('Zip2');
if F <> nil then F.AsString := Contact.Zip2;
F := ContactsTable.FindField('Country1');
if F = nil then F := ContactsTable.FindField('Country');
if F <> nil then F.AsString := Contact.Country1;
F := ContactsTable.FindField('Country2');
if F <> nil then F.AsString := Contact.Country2;
{
ContactsTable.FieldByName('Address').AsString := Contact.Address;
ContactsTable.FieldByName('City').AsString := Contact.City;
ContactsTable.FieldByName('State').AsString := Contact.State;
ContactsTable.FieldByName('Zip').AsString := Contact.Zip;
ContactsTable.FieldByName('Country').AsString := Contact.Country;
}
// Telephones
ContactsTable.FieldByName('Phone1').AsString := Contact.Phone1;
ContactsTable.FieldByName('Phone2').AsString := Contact.Phone2;
ContactsTable.FieldByName('Phone3').AsString := Contact.Phone3;
ContactsTable.FieldByName('Phone4').AsString := Contact.Phone4;
ContactsTable.FieldByName('Phone5').AsString := Contact.Phone5;
ContactsTable.FieldByName('PhoneType1').AsInteger := Contact.PhoneType1;
ContactsTable.FieldByName('PhoneType2').AsInteger := Contact.PhoneType2;
ContactsTable.FieldByName('PhoneType3').AsInteger := Contact.PhoneType3;
ContactsTable.FieldByName('PhoneType4').AsInteger := Contact.PhoneType4;
ContactsTable.FieldByName('PhoneType5').AsInteger := Contact.PhoneType5;
// Three e-mail types -- new in 1.05
F := ContactsTable.FindField('EMail1');
if F = nil then F := ContactsTable.FindField('EMail');
if F <> nil then F.AsString := Contact.EMail1;
F := ContactsTable.FindField('EMail2');
if F <> nil then F.AsString := Contact.EMail2;
F := ContactsTable.FindField('EMail3');
if F <> nil then F.AsString := Contact.EMail3;
F := ContactsTable.FindField('EMailType1');
if F <> nil then F.AsInteger := Contact.EMailType1;
F := ContactsTable.FindField('EMailType2');
if F <> nil then F.AsInteger := Contact.EMailType2;
F := ContactsTable.FindField('EMailType3');
if F <> nil then F.AsInteger := Contact.EMailType3;
//ContactsTable.FieldByName('EMail').AsString := Contact.EMail;
// two websites -- new in 1.05
F := ContactsTable.FindField('Website1');
if F <> nil then F.AsString := Contact.Website1;
F := ContactsTable.FindField('Website2');
if F <> nil then F.AsString := Contact.Website2;
F := ContactsTable.FindField('WebsiteType1');
if F <> nil then F.AsInteger := Contact.WebsiteType1;
F := ContactsTable.FindField('WebsiteType2');
if F <> nil then F.AsInteger := Contact.WebsiteType2;
// Custom fields
F := ContactsTable.FindField('Custom1');
if F <> nil then F.AsString := Contact.Custom1;
F := ContactsTable.FindField('Custom2');
if F <> nil then F.AsString := Contact.Custom2;
F := ContactsTable.FindField('Custom3');
if F <> nil then F.AsString := Contact.Custom3;
F := ContactsTable.FindField('Custom4');
if F <> nil then F.AsString := Contact.Custom4;
// User-defined fields
F := ContactsTable.FindField('UserField0');
if F <> nil then F.AsString := Contact.UserField0;
F := ContactsTable.FindField('UserField1');
if F <> nil then F.AsString := Contact.UserField1;
F := ContactsTable.FindField('UserField2');
if F <> nil then F.AsString := Contact.UserField2;
F := ContactsTable.FindField('UserField3');
if F <> nil then F.AsString := Contact.UserField3;
F := ContactsTable.FindField('UserField4');
if F <> nil then F.AsString := Contact.UserField4;
F := ContactsTable.FindField('UserField5');
if F <> nil then F.AsString := Contact.UserField5;
F := ContactsTable.FindField('UserField6');
if F <> nil then F.AsString := Contact.UserField6;
F := ContactsTable.FindField('UserField7');
if F <> nil then F.AsString := Contact.UserField7;
F := ContactsTable.FindField('UserField8');
if F <> nil then F.AsString := Contact.UserField8;
F := ContactsTable.FindField('UserField9');
if F <> nil then F.AsString := Contact.UserField9;
ContactsTable.Post;
except
ContactsTable.Cancel;
raise EDBPostError.Create;
end;
{ DataStore descendants that can use an autoincrement RecordID }
{ field set the RecordID to -1 by default. If the RecordID is }
{ -1 then this is a new record and we need to assign the real }
{ record ID value from the dataset. }
if Contact.RecordID = -1 then
Contact.RecordID := ContactsTable.FieldByName('RecordID').AsInteger;
Contact.Changed := false;
end;
end;
end;
Resource.ContactsDirty := false;
if not Loading then
NotifyDependents;
if Assigned(AfterPostContacts) then
FAfterPostContacts(self);
end;
end;
{=====}
(*
procedure TVpCustomDBDataStore.PostContacts;
var
I: Integer;
@ -1331,6 +1718,7 @@ begin
end;
end;
{=====}
*)
procedure TVpCustomDBDataStore.PostEvents;
var
@ -1669,10 +2057,23 @@ end;
{=====}
procedure TVpCustomDBDataStore.RefreshContacts;
var
contact: TVpContact;
begin
if Resource <> nil then begin
Resource.Contacts.ClearContacts;
LoadContacts;
with ContactsTable do begin
SetFilterCriteria(ContactsTable, False, Resource.ResourceID, 0, 0);
First;
while not EOF do begin
contact := Resource.Contacts.AddContact(FieldByName('RecordID').AsInteger);
contact.Loading := true;
LoadContact(contact);
contact.Loading := false;
Next;
end;
end;
// LoadContacts;
end;
inherited;
end;
@ -1775,33 +2176,33 @@ end;
Format(' ... (DTOS(StartTime) >= %s) ...', [
FormatDateTime('yyyymmdd') ...])
}
procedure TVpCustomDBDataStore.SetFilterCriteria(aTable: TDataset;
aUseDateTime: Boolean; aResourceID: Integer; aStartDateTime, aEndDateTime: TDateTime);
procedure TVpCustomDBDataStore.SetFilterCriteria(ATable: TDataset;
AUseDateTime: Boolean; AResourceID: Integer; AStartDateTime, AEndDateTime: TDateTime);
var
filter: String;
begin
if aUseDateTime then
if AUseDateTime then
{$IFDEF DELPHI}
filter := Format('ResourceID = %d '
+ 'and ( ( (StartTime >= %s) and (EndTime <= %s) ) '
+ ' or ( (RepeatCode > 0) and (%s <= RepeatRangeEnd) ) )',
[aResourceID,
QuotedStr(FormatDateTime('c', aStartDateTime)),
QuotedStr(FormatDateTime('c', aEndDateTime)),
QuotedStr(FormatDateTime('c', aStartDateTime))])
[AResourceID,
QuotedStr(FormatDateTime('c', AStartDateTime)),
QuotedStr(FormatDateTime('c', AEndDateTime)),
QuotedStr(FormatDateTime('c', AStartDateTime))])
{$ELSE}
filter := Format('ResourceID = %d '
+ 'and ( ( (DTOS(StartTime) >= %s) and (DTOS(EndTime) <= %s) ) '
+ ' or ( (RepeatCode > 0) and (%s <= DTOS(RepeatRangeEnd)) ) )',
[aResourceID,
QuotedStr(FormatDateTime('yyyymmdd', aStartDateTime)),
QuotedStr(FormatDateTime('yyyymmdd', aEndDateTime)),
QuotedStr(FormatDateTime('yyyymmdd', aStartDateTime))])
[AResourceID,
QuotedStr(FormatDateTime('yyyymmdd', AStartDateTime)),
QuotedStr(FormatDateTime('yyyymmdd', AEndDateTime)),
QuotedStr(FormatDateTime('yyyymmdd', AStartDateTime))])
{$ENDIF}
else
filter := Format('ResourceID = %d', [aResourceID]);
aTable.Filter := filter;
aTable.Filtered := true;
filter := Format('ResourceID = %d', [AResourceID]);
ATable.Filter := filter;
ATable.Filtered := true;
end;
{=====}

View File

@ -177,14 +177,21 @@ begin
'Birthdate DATE, '+
'Anniversary DATE, '+
'Title VARCHAR(50), '+
'Category INTEGER, '+
'Company VARCHAR(50), '+
'Job_Position VARCHAR(30), '+
'Address VARCHAR(100), '+
'City VARCHAR(50), '+
'State VARCHAR(25), '+
'Zip VARCHAR(10), '+
'Country VARCHAR(25), '+
'Notes VARCHAR(1024), '+
'AddressType1 INTEGER, '+
'Address1 VARCHAR(100), '+
'City1 VARCHAR(50), '+
'State1 VARCHAR(25), '+
'Zip1 VARCHAR(10), '+
'Country1 VARCHAR(25), '+
'AddressType2 INTEGER, '+
'Address2 VARCHAR(100), '+
'City2 VARCHAR(50), '+
'State2 VARCHAR(25), '+
'Zip2 VARCHAR(10), '+
'Country2 VARCHAR(25), '+
'Phone1 VARCHAR(25), '+
'Phone2 VARCHAR(25), '+
'Phone3 VARCHAR(25), '+
@ -195,8 +202,18 @@ begin
'PhoneType3 INTEGER, '+
'PhoneType4 INTEGER, '+
'PhoneType5 INTEGER, '+
'Category INTEGER, '+
'EMail VARCHAR (100), '+
'EMail1 VARCHAR (100), '+
'EMail2 VARCHAR (100), '+
'EMail3 VARCHAR (100), '+
'EMailType1 INTEGER, '+
'EMailType2 INTEGER, '+
'EMailType3 INTEGER, '+
'WebSite1 VARCHAR (100), '+
'WebSite2 VARCHAR (100), '+
'WebSiteType1 INTEGER, '+
'WebSiteType2 INTEGER, '+
'PathToPhoto VARCHAR (255), '+
'Notes VARCHAR(1024), '+
'Custom1 VARCHAR (100), '+
'Custom2 VARCHAR (100), '+
'Custom3 VARCHAR (100), '+

View File

@ -133,19 +133,17 @@ type
procedure LoadTaskMapping(Reader: TReader);
procedure StoreTaskMapping(Writer: TWriter);
{ Internal Methods }
procedure LoadContact(AContact: TVpContact); override;
procedure Loaded; override;
procedure SetFilterCriteria(aTable : TDataset;
aUseDateTime : Boolean;
aResourceID : Integer;
aStartDateTime : TDateTime;
aEndDateTime : TDateTime); override;
procedure SetFilterCriteria(ATable: TDataset; AUseDateTime: Boolean;
AResourceID: Integer; AStartDateTime, AEndDateTime: TDateTime); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Load; override;
procedure LoadEventsOfResource(AResID: Integer); override;
procedure LoadContacts; override;
// procedure LoadContacts; override;
procedure LoadTasks; override;
// procedure RefreshEvents; override;
// procedure RefreshContacts; override;
@ -419,9 +417,8 @@ begin
Load;
end
// Load;
else begin
else
begin
if FResourceDataSrc <> nil then
FResourceDataSrc.DataSet.Close;
if FEventsDataSrc <> nil then
@ -829,6 +826,293 @@ begin
end;*)
{=====}
{ Loads the contact from the current cursor position of the contacts table }
procedure TVpFlexDatastore.LoadContact(AContact: TVpContact);
var
F: TField;
FN: String;
begin
with ContactsTable do
begin
FN := GetFieldName(FContactMappings, 'RecordID');
if FN <> '' then
AContact.RecordID := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'FirstName');
if FN <> '' then
AContact.FirstName := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'LastName');
if FN <> '' then
AContact.LastName := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'BirthDate');
if FN <> '' then
AContact.Birthdate := FieldByName(FN).AsDateTime;
FN := GetFieldName(FContactMappings, 'Anniversary');
if FN <> '' then
AContact.Anniversary := FieldByName(FN).AsDateTime;
FN := GetFieldName(FContactMappings, 'Title');
if FN <> '' then
AContact.Title := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Company');
if FN <> '' then
AContact.Company := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Job_Position');
if FN <> '' then
AContact.Job_Position := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Category');
if FN <> '' then
AContact.Category := FieldByName(FN).AsInteger;
// Photo file name, new in 1.05
FN := GetFieldName(FContactMappings, 'PathToPhoto');
if FN <> '' then
AContact.PathToPhoto := FieldByName(FN).AsString;
// "Notes" instead of "Note" - new in 1.04
FN := GetFieldName(FContactMappings, 'Notes');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Note'); // "Note" is deprecated
if FN <> '' then
AContact.Notes := FieldByName(FN).AsString;
// two address types - new in 1.05
FN := GetFieldName(FContactMappings, 'AddressType1');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.AddressType1 := F.AsInteger;
end;
FN := GetFieldName(FContactMappings, 'AddressType2');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.AddressType2 := F.AsInteger;
end;
FN := GetFieldName(FContactMappings, 'Address1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Address');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.Address1 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'Address2');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.Address2 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'City1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'City');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.City1 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'City2');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.City2 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'State1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'State');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.State1 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'State2');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.State2 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'Zip1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Zip');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.Zip1 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'Zip2');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.Zip2 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'Country1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Country');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.Country1 := F.AsString;
end;
FN := GetFieldName(FContactMappings, 'Country2');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Country');
if FN <> '' then begin
F := FindField(FN);
if F <> nil then AContact.Country2 := F.AsString;
end;
// Telephone numbers
FN := GetFieldName(FContactMappings, 'Phone1');
if FN <> '' then
AContact.Phone1 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Phone2');
if FN <> '' then
AContact.Phone2 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Phone3');
if FN <> '' then
AContact.Phone3 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Phone4');
if FN <> '' then
AContact.Phone4 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Phone5');
if FN <> '' then
AContact.Phone5 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'PhoneType1');
if FN <> '' then
AContact.PhoneType1 := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'PhoneType2');
if FN <> '' then
AContact.PhoneType2 := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'PhoneType3');
if FN <> '' then
AContact.PhoneType3 := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'PhoneType4');
if FN <> '' then
AContact.PhoneType4 := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'PhoneType5');
if FN <> '' then
AContact.PhoneType5 := FieldByName(FN).AsInteger;
// EMail fields - new in 1.05
FN := GetFieldName(FContactMappings, 'EMail1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'EMail');
if FN <> '' then
AContact.EMail1 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'EMail2');
if FN <> '' then
AContact.EMail2 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'EMail3');
if FN <> '' then
AContact.EMail3 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'EMailType1');
if FN <> '' then
AContact.EMailType1 := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'EMailType2');
if FN <> '' then
AContact.EMailType2 := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'EMailType3');
if FN <> '' then
AContact.EMailType3 := FieldByName(FN).AsInteger;
// Website fields - new in 1.05
FN := GetFieldName(FContactMappings, 'WebSite1');
if FN <> '' then
AContact.Website1 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'WebSite2');
if FN <> '' then
AContact.Website2 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'WebsiteType1');
if FN <> '' then
AContact.WebsiteType1 := FieldByName(FN).AsInteger;
FN := GetFieldName(FContactMappings, 'WebsiteType2');
if FN <> '' then
AContact.WebsiteType2 := FieldByName(FN).AsInteger;
// Custom fields
FN := GetFieldName(FContactMappings, 'Custom1');
if FN <> '' then
AContact.Custom1 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Custom2');
if FN <> '' then
AContact.Custom2 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Custom3');
if FN <> '' then
AContact.Custom3 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'Custom4');
if FN <> '' then
AContact.Custom4 := FieldByName(FN).AsString;
// User-defined fields
FN := GetFieldName(FContactMappings, 'UserField0');
if FN <> '' then
AContact.UserField0 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField1');
if FN <> '' then
AContact.UserField1 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField2');
if FN <> '' then
AContact.UserField2 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField3');
if FN <> '' then
AContact.UserField3 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField4');
if FN <> '' then
AContact.UserField4 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField5');
if FN <> '' then
AContact.UserField5 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField6');
if FN <> '' then
AContact.UserField6 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField7');
if FN <> '' then
AContact.UserField7 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField8');
if FN <> '' then
AContact.UserField8 := FieldByName(FN).AsString;
FN := GetFieldName(FContactMappings, 'UserField9');
if FN <> '' then
AContact.UserField9 := FieldByName(FN).AsString;
end;
end;
(*
procedure TVpFlexDataStore.LoadContacts;
var
Contact: TVpContact;
@ -1019,7 +1303,7 @@ begin
end; {if Resource <> nil}
end;
{=====}
*)
procedure TVpFlexDataStore.LoadTasks;
var
Task: TVpTask;
@ -1534,29 +1818,63 @@ begin
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Job_Position;
FN := GetFieldName(FContactMappings, 'EMail');
FN := GetFieldName(FContactMappings, 'AddressType1');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.EMail;
ContactsTable.FieldByName(FN).AsInteger := Contact.AddressType1;
FN := GetFieldName(FContactMappings, 'Address');
FN := GetFieldName(FContactMappings, 'Address1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Address');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Address;
ContactsTable.FieldByName(FN).AsString := Contact.Address1;
FN := GetFieldName(FContactMappings, 'City');
FN := GetFieldName(FContactMappings, 'City1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'City');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.City;
ContactsTable.FieldByName(FN).AsString := Contact.City1;
FN := GetFieldName(FContactMappings, 'State');
FN := GetFieldName(FContactMappings, 'State1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'State');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.State;
ContactsTable.FieldByName(FN).AsString := Contact.State1;
FN := GetFieldName(FContactMappings, 'Zip');
FN := GetFieldName(FContactMappings, 'Zip1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Zip');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Zip;
ContactsTable.FieldByName(FN).AsString := Contact.Zip1;
FN := GetFieldName(FContactMappings, 'Country');
FN := GetFieldName(FContactMappings, 'Country1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'Country');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Country;
ContactsTable.FieldByName(FN).AsString := Contact.Country1;
FN := GetFieldName(FContactMappings, 'AddressType2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.AddressType2;
FN := GetFieldName(FContactMappings, 'Address2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Address2;
FN := GetFieldName(FContactMappings, 'City2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.City2;
FN := GetFieldName(FContactMappings, 'State2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.State2;
FN := GetFieldName(FContactMappings, 'Zip2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Zip2;
FN := GetFieldName(FContactMappings, 'Country2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Country2;
FN := GetFieldName(FContactMappings, 'Notes');
if FN = '' then
@ -1564,6 +1882,32 @@ begin
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Notes;
FN := GetFieldName(FContactMappings, 'EMail1');
if FN = '' then
FN := GetFieldName(FContactMappings, 'EMail');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.EMail1;
FN := GetFieldName(FContactMappings, 'EMail2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.EMail2;
FN := GetFieldName(FContactMappings, 'EMail3');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.EMail3;
FN := GetFieldName(FContactMappings, 'EMailType1');
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.EMailType1;
FN := GetFieldName(FContactMappings, 'EMailType2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.EMailType2;
FN := GetFieldName(FContactMappings, 'EMailType3');
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.EMailType3;
FN := GetFieldName(FContactMappings, 'Phone1');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Phone1;
@ -1604,10 +1948,30 @@ begin
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.PhoneType5;
FN := GetFieldName(FContactMappings, 'Website1');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.WebSite1;
FN := GetFieldName(FContactMappings, 'Website2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.WebSite2;
FN := GetFieldName(FContactMappings, 'WebSiteType1');
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.WebSiteType1;
FN := GetFieldName(FContactMappings, 'WebSiteType2');
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.WebSiteType2;
FN := GetFieldName(FContactMappings, 'Category');
if FN <> '' then
ContactsTable.FieldByName(FN).AsInteger := Contact.Category;
FN := GetFieldName(FContactMappings, 'PathToPhoto');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.PathToPhoto;
FN := GetFieldName(FContactMappings, 'Custom1');
if FN <> '' then
ContactsTable.FieldByName(FN).AsString := Contact.Custom1;
@ -2292,13 +2656,12 @@ begin
end;
{=====}
procedure TVpFlexDataStore.SetFilterCriteria(aTable: TDataset;
aUseDateTime: Boolean; aResourceID: Integer; aStartDateTime,
aEndDateTime: TDateTime);
procedure TVpFlexDataStore.SetFilterCriteria(ATable: TDataset; AUseDateTime: Boolean;
AResourceID: Integer; AStartDateTime, aEndDateTime: TDateTime);
begin
if Assigned(OnSetFilterCriteria) then
OnSetFilterCriteria(aTable, aUseDateTime, aResourceID,
aStartDateTime, aEndDateTime)
OnSetFilterCriteria(ATable, AUseDateTime, AResourceID,
AStartDateTime, AEndDateTime)
else
inherited;
end;

View File

@ -82,6 +82,16 @@ resourcestring
RSPhoneTypeLabel16 = 'Work';
RSPhoneTypeLabel17 = 'Work fax';
RSHomeAddressLabel = 'Home';
RSWorkAddressLabel = 'Work';
RSHomeEmailLabel = 'Home';
RSWorkEMailLabel = 'Work';
RSOtherEMaillabel = 'Other';
RSPersonalWebSiteLabel = 'Personal';
RSBusinessWebSiteLabel = 'Business';
RSCategoryLabel1 = 'Business';
RSCategoryLabel2 = 'Clients';
RSCategoryLabel3 = 'Family';

View File

@ -38,20 +38,46 @@ interface
{$I vpsr.inc}
type
{ For acquiring the labels that go with each telephone field }
{ ie. Home, work, fax etc... }
// For acquiring the labels that go with each telephone field, i.e. Home, work, fax etc... }
TVpPhoneType = (ptAssistant, ptCallback, ptCar, ptCompany, ptHome, ptHomeFax,
ptISDN, ptMobile, ptOther, ptOtherFax, ptPager, ptPrimary,
ptRadio, ptTelex, ptTTYTDD, ptWork, ptWorkFax);
TVpEMailType = (mtHome, mtOther, mtWork);
TVpWebSiteType = (wtBusiness, wtPersonal);
TVpAddressType = (atHome, atWork);
TVpCategoryType = (ctBusiness, ctClients, ctFamily, ctOther, ctPersonal);
function PhoneLabel (PhoneType : TVpPhoneType) : string;
function CategoryLabel (CategoryType : TVpCategoryType) : string;
function AddressLabel(AddressType: TVpAddressType): String;
function EMailLabel(EMailType: TVpEMailType): string;
function PhoneLabel(PhoneType: TVpPhoneType): string;
function WebSiteLabel(WebSiteType: TVpWebSiteType): String;
function CategoryLabel(CategoryType: TVpCategoryType): string;
implementation
function AddressLabel(AddressType: TVpAddressType): String;
begin
Result := '';
case AddressType of
atWork : Result := RSWorkAddressLabel;
atHome : Result := RSHomeAddressLabel;
end;
end;
function EMailLabel(EmailType: TVpEmaiLType): String;
begin
Result := '';
case EMailType of
mtHome : Result := RSHomeEMailLabel;
mtOther : Result := RSOtherEMailLabel;
mtWork : Result := RSWorkEMailLabel;
end;
end;
function PhoneLabel(PhoneType: TVpPhoneType): string;
begin
Result := '';
@ -76,7 +102,16 @@ begin
end;
end;
function CategoryLabel (CategoryType : TVpCategoryType) : string;
function WebSiteLabel(WebsiteType: TVpWebsiteType): String;
begin
Result := '';
case WebsiteType of
wtBusiness : Result := RSBusinessWebSiteLabel;
wtPersonal : Result := RSPersonalWebsiteLabel;
end;
end;
function CategoryLabel(CategoryType: TVpCategoryType): string;
begin
Result := '';
case CategoryType of