You've already forked lazarus-ccr
tvplanit: Add new event field "Location". Rename some fields for more consistency. Undo some of the changes in previous commit inspired by CodeTyphoon version.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4717 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -571,6 +571,10 @@ msgstr "F"
|
|||||||
msgid "M"
|
msgid "M"
|
||||||
msgstr "M"
|
msgstr "M"
|
||||||
|
|
||||||
|
#: vpsr.rslocationlbl
|
||||||
|
msgid "Location:"
|
||||||
|
msgstr "Ort:"
|
||||||
|
|
||||||
#: vpsr.rslsaturday
|
#: vpsr.rslsaturday
|
||||||
msgctxt "vpsr.rslsaturday"
|
msgctxt "vpsr.rslsaturday"
|
||||||
msgid "S"
|
msgid "S"
|
||||||
|
@ -561,6 +561,10 @@ msgstr ""
|
|||||||
msgid "M"
|
msgid "M"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: vpsr.rslocationlbl
|
||||||
|
msgid "Location:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: vpsr.rslsaturday
|
#: vpsr.rslsaturday
|
||||||
msgctxt "vpsr.rslsaturday"
|
msgctxt "vpsr.rslsaturday"
|
||||||
msgid "S"
|
msgid "S"
|
||||||
|
@ -542,6 +542,8 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
Event: TVpEvent;
|
Event: TVpEvent;
|
||||||
Qry: TAdsQuery;
|
Qry: TAdsQuery;
|
||||||
|
F: TField;
|
||||||
|
FixedLoc, FixedLocP: String;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.EventsDirty then begin
|
if (Resource <> nil) and Resource.EventsDirty then begin
|
||||||
Qry := TAdsQuery.Create(self);
|
Qry := TAdsQuery.Create(self);
|
||||||
@ -566,6 +568,14 @@ begin
|
|||||||
Qry.ParamByName('ID').AsInteger := Event.RecordID;
|
Qry.ParamByName('ID').AsInteger := Event.RecordID;
|
||||||
Qry.Open;
|
Qry.Open;
|
||||||
|
|
||||||
|
if Qry.FieldByName('Location') <> nil then begin
|
||||||
|
FixedLoc := 'Location, ';
|
||||||
|
FixedLocP := ':Loc, ';
|
||||||
|
end else begin
|
||||||
|
FixedLoc := '';
|
||||||
|
FixedLocP := '';
|
||||||
|
end;
|
||||||
|
|
||||||
if Qry.Locate('RecordID', Event.RecordID, [])
|
if Qry.Locate('RecordID', Event.RecordID, [])
|
||||||
then begin
|
then begin
|
||||||
{ existing record found }
|
{ existing record found }
|
||||||
@ -576,9 +586,11 @@ begin
|
|||||||
Qry.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
Qry.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
||||||
Qry.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
Qry.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
||||||
Qry.FieldByName('Description').AsString := Event.Description;
|
Qry.FieldByName('Description').AsString := Event.Description;
|
||||||
Qry.FieldByName('Notes').AsString := Event.Note;
|
F := Qry.FieldByName('Location'); // new
|
||||||
|
if F <> nil then F.AsString := Event.Location;
|
||||||
|
Qry.FieldByName('Notes') := Event.Notes;
|
||||||
Qry.FieldByName('Category').AsInteger := Event.Category;
|
Qry.FieldByName('Category').AsInteger := Event.Category;
|
||||||
Qry.FieldByName('DingPath').AsString := Event.AlarmWavPath;
|
Qry.FieldByName('DingPath').AsString := Event.DingPath;
|
||||||
Qry.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
Qry.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
||||||
Qry.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
Qry.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
||||||
Qry.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
Qry.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
||||||
@ -605,15 +617,15 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
Qry.Close;
|
Qry.Close;
|
||||||
Qry.SQL.Text := 'INSERT INTO Events '
|
Qry.SQL.Text := 'INSERT INTO Events '
|
||||||
+ '(RecordID, StartTime, EndTime, ResourceID, Description, Notes, '
|
+ '(RecordID, StartTime, EndTime, ResourceID, Description, ' + FixedLoc +
|
||||||
+ 'SnoozeTime, Category, DingPath, AllDayEvent, AlarmSet, '
|
+ 'Notes, SnoozeTime, Category, DingPath, AllDayEvent, AlarmSet, '
|
||||||
+ 'AlarmAdvance, AlarmAdvanceType, RepeatCode, '
|
+ 'AlarmAdvance, AlarmAdvanceType, RepeatCode, '
|
||||||
+ 'RepeatRangeEnd, CustomInterval, '
|
+ 'RepeatRangeEnd, CustomInterval, '
|
||||||
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
||||||
+ 'UserField5, UserField6, UserField7, UserField8, UserField9) '
|
+ 'UserField5, UserField6, UserField7, UserField8, UserField9) '
|
||||||
+ 'VALUES(:RecID, :STime, :ETime, :ResID, :Desc, :Notes, :SnTime, '
|
+ 'VALUES(:RecID, :STime, :ETime, :ResID, :Desc, ' + FixedLocP
|
||||||
+ ':Cat, :DPath, :ADEvent, :ASet, :AAdvance, :AAdvanceType, '
|
+ ':Notes, :SnTime, :Cat, :DPath, :ADEvent, :ASet, :AAdvance, '
|
||||||
+ ':RCode, :RRangeEnd, :CInterval, :UserField0, '
|
+ ':AAdvanceType, :RCode, :RRangeEnd, :CInterval, :UserField0, '
|
||||||
+ ':UserField1, :UserField2, :UserField3, :UserField4, '
|
+ ':UserField1, :UserField2, :UserField3, :UserField4, '
|
||||||
+ ':UserField5, :UserField6, :UserField7, :UserField8, '
|
+ ':UserField5, :UserField6, :UserField7, :UserField8, '
|
||||||
+ ':UserField9)';
|
+ ':UserField9)';
|
||||||
@ -623,7 +635,9 @@ begin
|
|||||||
Qry.ParamByName('ETime').AsDateTime := Event.EndTime;
|
Qry.ParamByName('ETime').AsDateTime := Event.EndTime;
|
||||||
Qry.ParamByName('ResID').AsInteger := Resource.ResourceID;
|
Qry.ParamByName('ResID').AsInteger := Resource.ResourceID;
|
||||||
Qry.ParamByName('Desc').AsString := Event.Description;
|
Qry.ParamByName('Desc').AsString := Event.Description;
|
||||||
Qry.ParamByName('Notes').AsString := Event.Note;
|
if FixedLocP <> '' then
|
||||||
|
Qry.ParamByName('Loc').AsString := Event.Location;
|
||||||
|
Qry.ParamByName('Notes').AsString := Event.Notes;
|
||||||
Qry.ParamByName('SnTime').AsDateTime := Event.SnoozeTime;
|
Qry.ParamByName('SnTime').AsDateTime := Event.SnoozeTime;
|
||||||
Qry.ParamByName('Cat').AsInteger := Event.Category;
|
Qry.ParamByName('Cat').AsInteger := Event.Category;
|
||||||
Qry.ParamByName('DPath').AsString := Event.AlarmWavPath;
|
Qry.ParamByName('DPath').AsString := Event.AlarmWavPath;
|
||||||
@ -666,6 +680,8 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
Contact: TVpContact;
|
Contact: TVpContact;
|
||||||
Qry: TAdsQuery;
|
Qry: TAdsQuery;
|
||||||
|
F: TField;
|
||||||
|
FixedNote, FixedNoteP: Boolean;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.ContactsDirty then begin
|
if (Resource <> nil) and Resource.ContactsDirty then begin
|
||||||
{ Dump this resource's dirty contacts to the DB }
|
{ Dump this resource's dirty contacts to the DB }
|
||||||
@ -692,6 +708,14 @@ begin
|
|||||||
Qry.ParamByName('ID').AsInteger := Contact.RecordID;
|
Qry.ParamByName('ID').AsInteger := Contact.RecordID;
|
||||||
Qry.Open;
|
Qry.Open;
|
||||||
|
|
||||||
|
if Qry.FieldByName('Note') <> nil then
|
||||||
|
FixedNote := 'Note, '
|
||||||
|
else if Qry.FieldByName('Notes') <> nil then
|
||||||
|
FixedNote := 'Notes, '
|
||||||
|
else
|
||||||
|
FixedNote := '';
|
||||||
|
if FixedNote <> '' then FixedNoteP := ':Notes, ' else FixedNoteP := '';
|
||||||
|
|
||||||
if Qry.Locate('RecordID', Contact.RecordID, [])
|
if Qry.Locate('RecordID', Contact.RecordID, [])
|
||||||
then begin
|
then begin
|
||||||
{ existing record found }
|
{ existing record found }
|
||||||
@ -714,7 +738,9 @@ begin
|
|||||||
Qry.FieldByName('State').AsString := Contact.State;
|
Qry.FieldByName('State').AsString := Contact.State;
|
||||||
Qry.FieldByName('Zip').AsString := Contact.Zip;
|
Qry.FieldByName('Zip').AsString := Contact.Zip;
|
||||||
Qry.FieldByName('Country').AsString := Contact.Country;
|
Qry.FieldByName('Country').AsString := Contact.Country;
|
||||||
Qry.FieldByName('Note').AsString := Contact.Note;
|
F := Qry.FieldByName('Notes');
|
||||||
|
if F = nil then F := Qry.FieldByName('Note'); // deprecated
|
||||||
|
if F <> nil then F.AsString := Contact.Notes;
|
||||||
Qry.FieldByName('Phone1').AsString := Contact.Phone1;
|
Qry.FieldByName('Phone1').AsString := Contact.Phone1;
|
||||||
Qry.FieldByName('Phone2').AsString := Contact.Phone2;
|
Qry.FieldByName('Phone2').AsString := Contact.Phone2;
|
||||||
Qry.FieldByName('Phone3').AsString := Contact.Phone3;
|
Qry.FieldByName('Phone3').AsString := Contact.Phone3;
|
||||||
@ -753,7 +779,7 @@ begin
|
|||||||
Qry.SQL.Text := 'INSERT INTO Contacts '
|
Qry.SQL.Text := 'INSERT INTO Contacts '
|
||||||
+ '(ResourceID, RecordID, FirstName, LastName, Birthdate, '
|
+ '(ResourceID, RecordID, FirstName, LastName, Birthdate, '
|
||||||
+ 'Anniversary, Title, Company, Job_Position, EMail, Address, '
|
+ 'Anniversary, Title, Company, Job_Position, EMail, Address, '
|
||||||
+ 'City, State, Zip, Country, Note, Phone1, Phone2, Phone3, '
|
+ 'City, State, Zip, Country, ' + FixedNote +'Phone1, Phone2, Phone3, '
|
||||||
+ 'Phone4, Phone5, PhoneType1, PhoneType2, PhoneType3, PhoneType4, '
|
+ 'Phone4, Phone5, PhoneType1, PhoneType2, PhoneType3, PhoneType4, '
|
||||||
+ 'PhoneType5, Category, Custom1, Custom2, Custom3, Custom4, '
|
+ 'PhoneType5, Category, Custom1, Custom2, Custom3, Custom4, '
|
||||||
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
||||||
@ -761,7 +787,7 @@ begin
|
|||||||
|
|
||||||
+ 'VALUES(:ResourceID, :RecordID, :FirstName, :LastName, '
|
+ 'VALUES(:ResourceID, :RecordID, :FirstName, :LastName, '
|
||||||
+ ':Birthdate, :Anniversary, :Title, :Company, :Job_Position, '
|
+ ':Birthdate, :Anniversary, :Title, :Company, :Job_Position, '
|
||||||
+ ':EMail, :Address, :City, :State, :Zip, :Country, :Note, '
|
+ ':EMail, :Address, :City, :State, :Zip, :Country, ' + FixedNoteP
|
||||||
+ ':Phone1, :Phone2, :Phone3, :Phone4, :Phone5, :PhoneType1, '
|
+ ':Phone1, :Phone2, :Phone3, :Phone4, :Phone5, :PhoneType1, '
|
||||||
+ ':PhoneType2, :PhoneType3, :PhoneType4, :PhoneType5, :Category, '
|
+ ':PhoneType2, :PhoneType3, :PhoneType4, :PhoneType5, :Category, '
|
||||||
+ ':Custom1, :Custom2, :Custom3, :Custom4, :UserField0, '
|
+ ':Custom1, :Custom2, :Custom3, :Custom4, :UserField0, '
|
||||||
@ -785,7 +811,8 @@ begin
|
|||||||
Qry.ParamByName('State').AsString := Contact.State;
|
Qry.ParamByName('State').AsString := Contact.State;
|
||||||
Qry.ParamByName('Zip').AsString := Contact.Zip;
|
Qry.ParamByName('Zip').AsString := Contact.Zip;
|
||||||
Qry.ParamByName('Country').AsString := Contact.Country;
|
Qry.ParamByName('Country').AsString := Contact.Country;
|
||||||
Qry.ParamByName('Note').AsString := Contact.Note;
|
if FixedNoteP <> '' then
|
||||||
|
Qry.ParamByName('Notes').AsString := Contact.Notes;
|
||||||
Qry.ParamByName('Phone1').AsString := Contact.Phone1;
|
Qry.ParamByName('Phone1').AsString := Contact.Phone1;
|
||||||
Qry.ParamByName('Phone2').AsString := Contact.Phone2;
|
Qry.ParamByName('Phone2').AsString := Contact.Phone2;
|
||||||
Qry.ParamByName('Phone3').AsString := Contact.Phone3;
|
Qry.ParamByName('Phone3').AsString := Contact.Phone3;
|
||||||
|
@ -129,7 +129,7 @@ object AlarmNotifyForm: TAlarmNotifyForm
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object EventDialog: TVpEventEditDialog
|
object EventDialog: TVpEventEditDialog
|
||||||
Version = 'v1.03'
|
Version = 'v1.04'
|
||||||
TimeFormat = tf24Hour
|
TimeFormat = tf24Hour
|
||||||
Options = []
|
Options = []
|
||||||
Placement.Position = mpCenterTop
|
Placement.Position = mpCenterTop
|
||||||
|
@ -103,7 +103,8 @@ implementation
|
|||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
uses VpSR;
|
uses
|
||||||
|
StrUtils, VpSR;
|
||||||
|
|
||||||
{ TVpNotificationDialog }
|
{ TVpNotificationDialog }
|
||||||
|
|
||||||
@ -147,26 +148,29 @@ end;
|
|||||||
{ TAlarmNotifyForm }
|
{ TAlarmNotifyForm }
|
||||||
|
|
||||||
procedure TAlarmNotifyForm.PopulateSelf;
|
procedure TAlarmNotifyForm.PopulateSelf;
|
||||||
|
var
|
||||||
|
fmt: String;
|
||||||
begin
|
begin
|
||||||
if Event <> nil then begin
|
if Event <> nil then begin
|
||||||
Caption := RSReminder;
|
|
||||||
// SubjectCaption.Caption := RSSubjectCaption;
|
// SubjectCaption.Caption := RSSubjectCaption;
|
||||||
// NotesCaption.Caption := RSNotesCaption;
|
// NotesCaption.Caption := RSNotesCaption;
|
||||||
SnoozeCaption.Caption := RSSnoozeCaption;
|
SnoozeCaption.Caption := RSSnoozeCaption;
|
||||||
DismissBtn.Caption := RSDismissBtn;
|
DismissBtn.Caption := RSDismissBtn;
|
||||||
SnoozeBtn.Caption := RSSnoozeBtn;
|
SnoozeBtn.Caption := RSSnoozeBtn;
|
||||||
OpenItemBtn.Caption := RSOpenItemBtn;
|
OpenItemBtn.Caption := RSOpenItemBtn;
|
||||||
lNotes.Caption := Event.Note;
|
lNotes.Caption := Event.Notes;
|
||||||
lSubject.Caption := Event.Description;
|
lSubject.Caption := Event.Description;
|
||||||
lTime.caption := dateTimeToStr(Event.StartTime)+' - '+dateTimeToStr(Event.EndTime);
|
|
||||||
|
|
||||||
if Now > Event.StartTime then
|
fmt := IfThen(trunc(Event.StartTime) = Date(), 't', 'ddddd t');
|
||||||
Self.Caption := RSOverdue + ' : '
|
lTime.Caption := Format('%s - %s', [
|
||||||
else
|
FormatDateTime(fmt, Event.StartTime),
|
||||||
Self.Caption := RSReminder + ' : ';
|
FormatDateTime(fmt, Event.EndTime)] );
|
||||||
|
if Event.Location <> '' then
|
||||||
|
lTime.Caption := lTime.Caption + ' (' + Event.Location + ')';
|
||||||
|
|
||||||
Self.Caption := Self.Caption + FormatDateTime(ShortDateFormat + ' '
|
Caption := Format('%s : %s', [
|
||||||
+ ShortTimeFormat, Event.StartTime);
|
IfThen(Now > Event.StartTime, RSOverdue, RSReminder),
|
||||||
|
FormatDateTime(fmt, Event.StartTime) ]);
|
||||||
|
|
||||||
SnoozeCombo.Items.Clear;
|
SnoozeCombo.Items.Clear;
|
||||||
SnoozeCombo.Items.Add(RS1Minute);
|
SnoozeCombo.Items.Add(RS1Minute);
|
||||||
@ -175,13 +179,6 @@ begin
|
|||||||
SnoozeCombo.Items.Add(Format(RSXMinutes, [15]));
|
SnoozeCombo.Items.Add(Format(RSXMinutes, [15]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXMinutes, [30]));
|
SnoozeCombo.Items.Add(Format(RSXMinutes, [30]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXMinutes, [45]));
|
SnoozeCombo.Items.Add(Format(RSXMinutes, [45]));
|
||||||
{
|
|
||||||
SnoozeCombo.Items.Add(RS5Minutes);
|
|
||||||
SnoozeCombo.Items.Add(RS10Minutes);
|
|
||||||
SnoozeCombo.Items.Add(RS15Minutes);
|
|
||||||
SnoozeCombo.Items.Add(RS30Minutes);
|
|
||||||
SnoozeCombo.Items.Add(RS45Minutes);
|
|
||||||
}
|
|
||||||
SnoozeCombo.Items.Add(RS1Hour);
|
SnoozeCombo.Items.Add(RS1Hour);
|
||||||
SnoozeCombo.Items.Add(Format(RSXHours, [2]));
|
SnoozeCombo.Items.Add(Format(RSXHours, [2]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXHours, [3]));
|
SnoozeCombo.Items.Add(Format(RSXHours, [3]));
|
||||||
@ -190,28 +187,12 @@ begin
|
|||||||
SnoozeCombo.Items.Add(Format(RSXHours, [6]));
|
SnoozeCombo.Items.Add(Format(RSXHours, [6]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXHours, [7]));
|
SnoozeCombo.Items.Add(Format(RSXHours, [7]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXHours, [8]));
|
SnoozeCombo.Items.Add(Format(RSXHours, [8]));
|
||||||
{
|
|
||||||
SnoozeCombo.Items.Add(RS2Hours);
|
|
||||||
SnoozeCombo.Items.Add(RS3Hours);
|
|
||||||
SnoozeCombo.Items.Add(RS4Hours);
|
|
||||||
SnoozeCombo.Items.Add(RS5Hours);
|
|
||||||
SnoozeCombo.Items.Add(RS6Hours);
|
|
||||||
SnoozeCombo.Items.Add(RS7Hours);
|
|
||||||
SnoozeCombo.Items.Add(RS8Hours);
|
|
||||||
}
|
|
||||||
SnoozeCombo.Items.Add(RS1Day);
|
SnoozeCombo.Items.Add(RS1Day);
|
||||||
SnoozeCombo.Items.Add(Format(RSXDays, [2]));
|
SnoozeCombo.Items.Add(Format(RSXDays, [2]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXDays, [3]));
|
SnoozeCombo.Items.Add(Format(RSXDays, [3]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXDays, [4]));
|
SnoozeCombo.Items.Add(Format(RSXDays, [4]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXDays, [5]));
|
SnoozeCombo.Items.Add(Format(RSXDays, [5]));
|
||||||
SnoozeCombo.Items.Add(Format(RSXDays, [6]));
|
SnoozeCombo.Items.Add(Format(RSXDays, [6]));
|
||||||
{
|
|
||||||
SnoozeCombo.Items.Add(RS2Days);
|
|
||||||
SnoozeCombo.Items.Add(RS3Days);
|
|
||||||
SnoozeCombo.Items.Add(RS4Days);
|
|
||||||
SnoozeCombo.Items.Add(RS5Days);
|
|
||||||
SnoozeCombo.Items.Add(RS6Days);
|
|
||||||
}
|
|
||||||
SnoozeCombo.Items.Add(RS1Week);
|
SnoozeCombo.Items.Add(RS1Week);
|
||||||
SnoozeCombo.ItemIndex := 0;
|
SnoozeCombo.ItemIndex := 0;
|
||||||
SnoozeDelay := 5 / MinutesInDay;
|
SnoozeDelay := 5 / MinutesInDay;
|
||||||
|
@ -586,6 +586,8 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
Event: TVpEvent;
|
Event: TVpEvent;
|
||||||
Qry: TQuery;
|
Qry: TQuery;
|
||||||
|
F: TField;
|
||||||
|
FixedLoc, FixedLocP: String;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.EventsDirty then begin
|
if (Resource <> nil) and Resource.EventsDirty then begin
|
||||||
Qry := TQuery.Create(self);
|
Qry := TQuery.Create(self);
|
||||||
@ -610,6 +612,14 @@ begin
|
|||||||
Qry.ParamByName('ID').AsInteger := Event.RecordID;
|
Qry.ParamByName('ID').AsInteger := Event.RecordID;
|
||||||
Qry.Open;
|
Qry.Open;
|
||||||
|
|
||||||
|
if Qry.FieldByName('Location') = nil then begin
|
||||||
|
FixedLoc := '';
|
||||||
|
FixedLocP := '';
|
||||||
|
end else begin
|
||||||
|
FixedLoc := 'Location, ';
|
||||||
|
FixedLocP := ':Loc, ';
|
||||||
|
end;
|
||||||
|
|
||||||
if Qry.Locate('RecordID', Event.RecordID, [])
|
if Qry.Locate('RecordID', Event.RecordID, [])
|
||||||
then begin
|
then begin
|
||||||
{ existing record found }
|
{ existing record found }
|
||||||
@ -620,9 +630,11 @@ begin
|
|||||||
Qry.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
Qry.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
||||||
Qry.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
Qry.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
||||||
Qry.FieldByName('Description').AsString := Event.Description;
|
Qry.FieldByName('Description').AsString := Event.Description;
|
||||||
Qry.FieldByName('Notes').AsString := Event.Note;
|
F := Qry.FieldByName('Location'); // newe
|
||||||
|
if F <> nil then F.AsString := Event.Location;
|
||||||
|
Qry.FieldByName('Notes').AsString := Event.Notes;
|
||||||
Qry.FieldByName('Category').AsInteger := Event.Category;
|
Qry.FieldByName('Category').AsInteger := Event.Category;
|
||||||
Qry.FieldByName('DingPath').AsString := Event.AlarmWavPath;
|
Qry.FieldByName('DingPath').AsString := Event.DingPath;
|
||||||
Qry.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
Qry.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
||||||
Qry.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
Qry.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
||||||
Qry.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
Qry.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
||||||
@ -649,15 +661,15 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
Qry.Close;
|
Qry.Close;
|
||||||
Qry.SQL.Text := 'INSERT INTO Events '
|
Qry.SQL.Text := 'INSERT INTO Events '
|
||||||
+ '(RecordID, StartTime, EndTime, ResourceID, Description, Notes, '
|
+ '(RecordID, StartTime, EndTime, ResourceID, Description, ' + FixedLocation
|
||||||
+ 'SnoozeTime, Category, DingPath, AllDayEvent, AlarmSet, '
|
+ 'Notes, SnoozeTime, Category, DingPath, AllDayEvent, AlarmSet, '
|
||||||
+ 'AlarmAdvance, AlarmAdvanceType, RepeatCode, '
|
+ 'AlarmAdvance, AlarmAdvanceType, RepeatCode, '
|
||||||
+ 'RepeatRangeEnd, CustomInterval, '
|
+ 'RepeatRangeEnd, CustomInterval, '
|
||||||
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
||||||
+ 'UserField5, UserField6, UserField7, UserField8, UserField9) '
|
+ 'UserField5, UserField6, UserField7, UserField8, UserField9) '
|
||||||
+ 'VALUES(:RecID, :STime, :ETime, :ResID, :Desc, :Notes, :SnTime, '
|
+ 'VALUES(:RecID, :STime, :ETime, :ResID, :Desc, ' + FixedLoc
|
||||||
+ ':Cat, :DPath, :ADEvent, :ASet, :AAdvance, :AAdvanceType, '
|
+ ':Notes, :SnTime, :Cat, :DPath, :ADEvent, :ASet, :AAdvance, '
|
||||||
+ ':RCode, :RRangeEnd, :CInterval, :UserField0, '
|
+ ':AAdvanceType, :RCode, :RRangeEnd, :CInterval, :UserField0, '
|
||||||
+ ':UserField1, :UserField2, :UserField3, :UserField4, '
|
+ ':UserField1, :UserField2, :UserField3, :UserField4, '
|
||||||
+ ':UserField5, :UserField6, :UserField7, :UserField8, '
|
+ ':UserField5, :UserField6, :UserField7, :UserField8, '
|
||||||
+ ':UserField9)';
|
+ ':UserField9)';
|
||||||
@ -667,10 +679,11 @@ begin
|
|||||||
Qry.ParamByName('ETime').AsDateTime := Event.EndTime;
|
Qry.ParamByName('ETime').AsDateTime := Event.EndTime;
|
||||||
Qry.ParamByName('ResID').AsInteger := Resource.ResourceID;
|
Qry.ParamByName('ResID').AsInteger := Resource.ResourceID;
|
||||||
Qry.ParamByName('Desc').AsString := Event.Description;
|
Qry.ParamByName('Desc').AsString := Event.Description;
|
||||||
Qry.ParamByName('Notes').AsString := Event.Note;
|
if FixedLocP <> '' then Qry.ParamByName('Loc').AsString := Event.Location;
|
||||||
|
Qry.ParamByName('Notes').AsString := Event.Notes;
|
||||||
Qry.ParamByName('SnTime').AsDateTime := Event.SnoozeTime;
|
Qry.ParamByName('SnTime').AsDateTime := Event.SnoozeTime;
|
||||||
Qry.ParamByName('Cat').AsInteger := Event.Category;
|
Qry.ParamByName('Cat').AsInteger := Event.Category;
|
||||||
Qry.ParamByName('DPath').AsString := Event.AlarmWavPath;
|
Qry.ParamByName('DPath').AsString := Event.DingPath;
|
||||||
Qry.ParamByName('ADEvent').AsBoolean := Event.AllDayEvent;
|
Qry.ParamByName('ADEvent').AsBoolean := Event.AllDayEvent;
|
||||||
Qry.ParamByName('ASet').AsBoolean := Event.AlarmSet;
|
Qry.ParamByName('ASet').AsBoolean := Event.AlarmSet;
|
||||||
Qry.ParamByName('AAdvance').AsInteger := Event.AlarmAdv;
|
Qry.ParamByName('AAdvance').AsInteger := Event.AlarmAdv;
|
||||||
@ -710,6 +723,8 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
Contact: TVpContact;
|
Contact: TVpContact;
|
||||||
Qry: TQuery;
|
Qry: TQuery;
|
||||||
|
F: TField;
|
||||||
|
FixedNote, FixedNoteP: String;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.ContactsDirty then begin
|
if (Resource <> nil) and Resource.ContactsDirty then begin
|
||||||
{ Dump this resource's dirty contacts to the DB }
|
{ Dump this resource's dirty contacts to the DB }
|
||||||
@ -736,6 +751,12 @@ begin
|
|||||||
Qry.ParamByName('ID').AsInteger := Contact.RecordID;
|
Qry.ParamByName('ID').AsInteger := Contact.RecordID;
|
||||||
Qry.Open;
|
Qry.Open;
|
||||||
|
|
||||||
|
// Fix name change of "Note" field
|
||||||
|
if Qry.FieldByName('Notes') <> nil then FixedNote := 'Notes, ' else
|
||||||
|
if Qry.FieldByName('Note') <> nil then FixedNote := 'Note, '
|
||||||
|
else FixedNote := '';
|
||||||
|
if FixedNote <> '' then FixedNoteP := ':Notes, ' else FixeNoteP := '';
|
||||||
|
|
||||||
if Qry.Locate('RecordID', Contact.RecordID, [])
|
if Qry.Locate('RecordID', Contact.RecordID, [])
|
||||||
then begin
|
then begin
|
||||||
{ existing record found }
|
{ existing record found }
|
||||||
@ -758,7 +779,9 @@ begin
|
|||||||
Qry.FieldByName('State').AsString := Contact.State;
|
Qry.FieldByName('State').AsString := Contact.State;
|
||||||
Qry.FieldByName('Zip').AsString := Contact.Zip;
|
Qry.FieldByName('Zip').AsString := Contact.Zip;
|
||||||
Qry.FieldByName('Country').AsString := Contact.Country;
|
Qry.FieldByName('Country').AsString := Contact.Country;
|
||||||
Qry.FieldByName('Note').AsString := Contact.Note;
|
F := Qry.FieldByName('Notes');
|
||||||
|
if F = nil then F := Qry.FieldByName('Note'); // deprecated
|
||||||
|
if F <> nil then F.AsString := Contact.Notes;
|
||||||
Qry.FieldByName('Phone1').AsString := Contact.Phone1;
|
Qry.FieldByName('Phone1').AsString := Contact.Phone1;
|
||||||
Qry.FieldByName('Phone2').AsString := Contact.Phone2;
|
Qry.FieldByName('Phone2').AsString := Contact.Phone2;
|
||||||
Qry.FieldByName('Phone3').AsString := Contact.Phone3;
|
Qry.FieldByName('Phone3').AsString := Contact.Phone3;
|
||||||
@ -797,7 +820,7 @@ begin
|
|||||||
Qry.SQL.Text := 'INSERT INTO Contacts '
|
Qry.SQL.Text := 'INSERT INTO Contacts '
|
||||||
+ '(ResourceID, RecordID, FirstName, LastName, Birthdate, '
|
+ '(ResourceID, RecordID, FirstName, LastName, Birthdate, '
|
||||||
+ 'Anniversary, Title, Company, Job_Position, EMail, Address, '
|
+ 'Anniversary, Title, Company, Job_Position, EMail, Address, '
|
||||||
+ 'City, State, Zip, Country, Note, Phone1, Phone2, Phone3, '
|
+ 'City, State, Zip, Country, ' + FixedNote + 'Phone1, Phone2, Phone3, '
|
||||||
+ 'Phone4, Phone5, PhoneType1, PhoneType2, PhoneType3, PhoneType4, '
|
+ 'Phone4, Phone5, PhoneType1, PhoneType2, PhoneType3, PhoneType4, '
|
||||||
+ 'PhoneType5, Category, Custom1, Custom2, Custom3, Custom4, '
|
+ 'PhoneType5, Category, Custom1, Custom2, Custom3, Custom4, '
|
||||||
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
||||||
@ -805,7 +828,7 @@ begin
|
|||||||
|
|
||||||
+ 'VALUES(:ResourceID, :RecordID, :FirstName, :LastName, '
|
+ 'VALUES(:ResourceID, :RecordID, :FirstName, :LastName, '
|
||||||
+ ':Birthdate, :Anniversary, :Title, :Company, :Job_Position, '
|
+ ':Birthdate, :Anniversary, :Title, :Company, :Job_Position, '
|
||||||
+ ':EMail, :Address, :City, :State, :Zip, :Country, :Note, '
|
+ ':EMail, :Address, :City, :State, :Zip, :Country, ' + FixedNoteP
|
||||||
+ ':Phone1, :Phone2, :Phone3, :Phone4, :Phone5, :PhoneType1, '
|
+ ':Phone1, :Phone2, :Phone3, :Phone4, :Phone5, :PhoneType1, '
|
||||||
+ ':PhoneType2, :PhoneType3, :PhoneType4, :PhoneType5, :Category, '
|
+ ':PhoneType2, :PhoneType3, :PhoneType4, :PhoneType5, :Category, '
|
||||||
+ ':Custom1, :Custom2, :Custom3, :Custom4, :UserField0, '
|
+ ':Custom1, :Custom2, :Custom3, :Custom4, :UserField0, '
|
||||||
@ -829,7 +852,7 @@ begin
|
|||||||
Qry.ParamByName('State').AsString := Contact.State;
|
Qry.ParamByName('State').AsString := Contact.State;
|
||||||
Qry.ParamByName('Zip').AsString := Contact.Zip;
|
Qry.ParamByName('Zip').AsString := Contact.Zip;
|
||||||
Qry.ParamByName('Country').AsString := Contact.Country;
|
Qry.ParamByName('Country').AsString := Contact.Country;
|
||||||
Qry.ParamByName('Note').AsString := Contact.Note;
|
if FixedNote <> '' then Qry.ParamByName('Notes').AsString := Contact.Notes;
|
||||||
Qry.ParamByName('Phone1').AsString := Contact.Phone1;
|
Qry.ParamByName('Phone1').AsString := Contact.Phone1;
|
||||||
Qry.ParamByName('Phone2').AsString := Contact.Phone2;
|
Qry.ParamByName('Phone2').AsString := Contact.Phone2;
|
||||||
Qry.ParamByName('Phone3').AsString := Contact.Phone3;
|
Qry.ParamByName('Phone3').AsString := Contact.Phone3;
|
||||||
|
@ -188,8 +188,6 @@ type
|
|||||||
{ TVpEvent }
|
{ TVpEvent }
|
||||||
|
|
||||||
TVpEvent = class
|
TVpEvent = class
|
||||||
private
|
|
||||||
FLocation: string;
|
|
||||||
protected{private}
|
protected{private}
|
||||||
FOwner: TVpSchedule;
|
FOwner: TVpSchedule;
|
||||||
FItemIndex: Integer;
|
FItemIndex: Integer;
|
||||||
@ -205,7 +203,8 @@ type
|
|||||||
FAlertDisplayed: Boolean;
|
FAlertDisplayed: Boolean;
|
||||||
FAlarmAdvType: TVpAlarmAdvType;
|
FAlarmAdvType: TVpAlarmAdvType;
|
||||||
FRecordID: Int64;
|
FRecordID: Int64;
|
||||||
FNote: string;
|
FLocation: string;
|
||||||
|
FNotes: string;
|
||||||
FDescription: string;
|
FDescription: string;
|
||||||
FStartTime: TDateTime;
|
FStartTime: TDateTime;
|
||||||
FEndTime: TDateTime;
|
FEndTime: TDateTime;
|
||||||
@ -236,7 +235,8 @@ type
|
|||||||
procedure SetCategory(Value: Integer);
|
procedure SetCategory(Value: Integer);
|
||||||
procedure SetDescription(const Value: string);
|
procedure SetDescription(const Value: string);
|
||||||
procedure SetEndTime(Value: TDateTime);
|
procedure SetEndTime(Value: TDateTime);
|
||||||
procedure SetNote(const Value: string);
|
procedure SetLocation(const Value: String);
|
||||||
|
procedure SetNotes(const Value: string);
|
||||||
procedure SetRecordID(Value: Int64);
|
procedure SetRecordID(Value: Int64);
|
||||||
procedure SetStartTime(Value: TDateTime);
|
procedure SetStartTime(Value: TDateTime);
|
||||||
procedure SetCustInterval(Value: Integer);
|
procedure SetCustInterval(Value: Integer);
|
||||||
@ -245,7 +245,8 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(Owner: TVpSchedule);
|
constructor Create(Owner: TVpSchedule);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
property AlarmWavPath: string read FDingPath write SetDingPath;
|
property DingPath: string read FDingPath write SetDingPath;
|
||||||
|
property AlarmWavPath: string read FDingPath write SetDingPath; deprecated 'Use "DingPath" instead';
|
||||||
property AlertDisplayed: Boolean read FAlertDisplayed write FAlertDisplayed;
|
property AlertDisplayed: Boolean read FAlertDisplayed write FAlertDisplayed;
|
||||||
property AllDayEvent: Boolean read FAllDayEvent write SetAllDayEvent;
|
property AllDayEvent: Boolean read FAllDayEvent write SetAllDayEvent;
|
||||||
property Changed: Boolean read FChanged write SetChanged;
|
property Changed: Boolean read FChanged write SetChanged;
|
||||||
@ -255,11 +256,12 @@ type
|
|||||||
property StartTime : TDateTime read FStartTime write SetStartTime;
|
property StartTime : TDateTime read FStartTime write SetStartTime;
|
||||||
property EndTime : TDateTime read FEndTime write SetEndTime;
|
property EndTime : TDateTime read FEndTime write SetEndTime;
|
||||||
property Description : string read FDescription write SetDescription;
|
property Description : string read FDescription write SetDescription;
|
||||||
property Note : string read FNote write SetNote;
|
property Notes : string read FNotes write SetNotes;
|
||||||
|
property Note: String read FNotes write SetNotes; deprecated 'Use "Notes" instead';
|
||||||
property Category : Integer read FCategory write SetCategory;
|
property Category : Integer read FCategory write SetCategory;
|
||||||
property AlarmSet : Boolean read FAlarmSet write SetAlarmSet;
|
property AlarmSet : Boolean read FAlarmSet write SetAlarmSet;
|
||||||
property AlarmAdv : Integer read FAlarmAdv write SetAlarmAdv;
|
property AlarmAdv : Integer read FAlarmAdv write SetAlarmAdv;
|
||||||
property Location: string read FLocation write FLocation;
|
property Location: string read FLocation write SetLocation;
|
||||||
property Loading : Boolean read FLoading write FLoading;
|
property Loading : Boolean read FLoading write FLoading;
|
||||||
{ 0=Minutes, 1=Hours, 2=Days }
|
{ 0=Minutes, 1=Hours, 2=Days }
|
||||||
property AlarmAdvType : TVpAlarmAdvType read FAlarmAdvType write SetAlarmAdvType;
|
property AlarmAdvType : TVpAlarmAdvType read FAlarmAdvType write SetAlarmAdvType;
|
||||||
@ -445,7 +447,7 @@ type
|
|||||||
FState : string;
|
FState : string;
|
||||||
FZip : string;
|
FZip : string;
|
||||||
FCountry : string;
|
FCountry : string;
|
||||||
FNote : string;
|
FNotes : string;
|
||||||
FPrivateRec : boolean;
|
FPrivateRec : boolean;
|
||||||
FCategory : integer;
|
FCategory : integer;
|
||||||
FCustom1 : string;
|
FCustom1 : string;
|
||||||
@ -480,7 +482,7 @@ type
|
|||||||
procedure SetEMail(const Value: string);
|
procedure SetEMail(const Value: string);
|
||||||
procedure SetFirstName(const Value: string);
|
procedure SetFirstName(const Value: string);
|
||||||
procedure SetLastName(const Value: string);
|
procedure SetLastName(const Value: string);
|
||||||
procedure SetNote(const Value: string);
|
procedure SetNotes(const Value: string);
|
||||||
procedure SetPhone1(const Value: string);
|
procedure SetPhone1(const Value: string);
|
||||||
procedure SetPhone2(const Value: string);
|
procedure SetPhone2(const Value: string);
|
||||||
procedure SetPhone3(const Value: string);
|
procedure SetPhone3(const Value: string);
|
||||||
@ -528,7 +530,8 @@ type
|
|||||||
property State : string read FState write SetState;
|
property State : string read FState write SetState;
|
||||||
property Zip : string read FZip write SetZip;
|
property Zip : string read FZip write SetZip;
|
||||||
property Country : string read FCountry write SetCountry;
|
property Country : string read FCountry write SetCountry;
|
||||||
property Note : string read FNote write SetNote;
|
property Note : string read FNotes write SetNotes; deprecated 'Use "Notes" instead';
|
||||||
|
property Notes : string read FNotes write SetNotes;
|
||||||
property Category : integer read FCategory write SetCategory;
|
property Category : integer read FCategory write SetCategory;
|
||||||
property Custom1 : string read FCustom1 write SetCustom1;
|
property Custom1 : string read FCustom1 write SetCustom1;
|
||||||
property Custom2 : string read FCustom2 write SetCustom2;
|
property Custom2 : string read FCustom2 write SetCustom2;
|
||||||
@ -954,10 +957,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
procedure TVpEvent.SetNote(const Value: string);
|
procedure TVpEvent.SetLocation(const Value: String);
|
||||||
begin
|
begin
|
||||||
if Value <> FNote then begin
|
if Value <> FLocation then begin
|
||||||
FNote := Value;
|
FLocation := Value;
|
||||||
|
Changed := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
{=====}
|
||||||
|
|
||||||
|
procedure TVpEvent.SetNotes(const Value: string);
|
||||||
|
begin
|
||||||
|
if Value <> FNotes then begin
|
||||||
|
FNotes := Value;
|
||||||
Changed := true;
|
Changed := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -1604,10 +1616,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
procedure TVpContact.SetNote(const Value: string);
|
procedure TVpContact.SetNotes(const Value: string);
|
||||||
begin
|
begin
|
||||||
if Value <> FNote then begin
|
if Value <> FNotes then begin
|
||||||
FNote := Value;
|
FNotes := Value;
|
||||||
Changed := true;
|
Changed := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -143,7 +143,7 @@ begin
|
|||||||
{ Resource ID }
|
{ Resource ID }
|
||||||
with AddFieldDef do begin
|
with AddFieldDef do begin
|
||||||
Name := 'ResourceID';
|
Name := 'ResourceID';
|
||||||
DataType := ftAutoInc; //ftInteger;
|
DataType := ftInteger;
|
||||||
Required := true;
|
Required := true;
|
||||||
end;
|
end;
|
||||||
{ Description }
|
{ Description }
|
||||||
@ -249,7 +249,7 @@ begin
|
|||||||
{ Record ID }
|
{ Record ID }
|
||||||
with AddFieldDef do begin
|
with AddFieldDef do begin
|
||||||
Name := 'RecordID';
|
Name := 'RecordID';
|
||||||
DataType := ftAutoInc; //ftInteger;
|
DataType := ftInteger;
|
||||||
Required := true;
|
Required := true;
|
||||||
end;
|
end;
|
||||||
{ StartTime }
|
{ StartTime }
|
||||||
@ -277,6 +277,13 @@ begin
|
|||||||
Size := 255;
|
Size := 255;
|
||||||
Required := false;
|
Required := false;
|
||||||
end;
|
end;
|
||||||
|
{ Locataion } // new
|
||||||
|
with AddFieldDef do begin
|
||||||
|
Name := 'Location';
|
||||||
|
DataType := ftString;
|
||||||
|
Size := 255;
|
||||||
|
Required := false;
|
||||||
|
end;
|
||||||
{ Note }
|
{ Note }
|
||||||
with AddFieldDef do begin
|
with AddFieldDef do begin
|
||||||
Name := 'Notes';
|
Name := 'Notes';
|
||||||
@ -422,7 +429,7 @@ begin
|
|||||||
{ Record ID }
|
{ Record ID }
|
||||||
with AddFieldDef do begin
|
with AddFieldDef do begin
|
||||||
Name := 'RecordID';
|
Name := 'RecordID';
|
||||||
DataType := ftAutoInc; //ftInteger;
|
DataType := ftInteger;
|
||||||
Required := true;
|
Required := true;
|
||||||
end;
|
end;
|
||||||
{ Resource ID }
|
{ Resource ID }
|
||||||
@ -515,7 +522,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
{ Note }
|
{ Note }
|
||||||
with AddFieldDef do begin
|
with AddFieldDef do begin
|
||||||
Name := 'Note';
|
Name := 'Notes'; // was: "Note" in old version
|
||||||
DataType := ftString;
|
DataType := ftString;
|
||||||
Size := 1024;
|
Size := 1024;
|
||||||
Required := false;
|
Required := false;
|
||||||
@ -703,7 +710,7 @@ begin
|
|||||||
{ Record ID }
|
{ Record ID }
|
||||||
with AddFieldDef do begin
|
with AddFieldDef do begin
|
||||||
Name := 'RecordID';
|
Name := 'RecordID';
|
||||||
DataType := ftAutoInc; //ftInteger;
|
DataType := ftInteger;
|
||||||
Required := true;
|
Required := true;
|
||||||
end;
|
end;
|
||||||
{ Resource ID }
|
{ Resource ID }
|
||||||
@ -1014,33 +1021,37 @@ end;
|
|||||||
procedure TVpCustomDBDataStore.LoadEvents;
|
procedure TVpCustomDBDataStore.LoadEvents;
|
||||||
var
|
var
|
||||||
Event: TVpEvent;
|
Event: TVpEvent;
|
||||||
|
F: TField;
|
||||||
begin
|
begin
|
||||||
if Resource <> nil then
|
if Resource <> nil then
|
||||||
{ Load this resource's events into memory }
|
{ Load this resource's events into memory }
|
||||||
with EventsTable do begin
|
with EventsTable do begin
|
||||||
|
SetFilterCriteria(
|
||||||
SetFilterCriteria(EventsTable,
|
EventsTable,
|
||||||
True,
|
True,
|
||||||
ResourceTable.FieldByName('ResourceID').AsInteger,
|
ResourceTable.FieldByName('ResourceID').AsInteger,
|
||||||
TimeRange.StartTime,
|
TimeRange.StartTime,
|
||||||
TimeRange.EndTime);
|
TimeRange.EndTime
|
||||||
|
);
|
||||||
First;
|
First;
|
||||||
|
|
||||||
while not EventsTable.EOF do begin
|
while not EventsTable.EOF do begin
|
||||||
Event := Resource.Schedule.AddEvent(FieldByName('RecordID').AsInteger,
|
Event := Resource.Schedule.AddEvent(
|
||||||
|
FieldByName('RecordID').AsInteger,
|
||||||
FieldByName('StartTime').AsDateTime,
|
FieldByName('StartTime').AsDateTime,
|
||||||
FieldByName('EndTime').AsDateTime);
|
FieldByName('EndTime').AsDateTime
|
||||||
|
);
|
||||||
if Event <> nil then begin
|
if Event <> nil then begin
|
||||||
Event.Loading := true;
|
Event.Loading := true;
|
||||||
Event.Description := FieldByName('Description').AsString;
|
Event.Description := FieldByName('Description').AsString;
|
||||||
Event.Note := FieldByName('Notes').AsString;
|
F := FieldByName('Location'); // new
|
||||||
|
if F <> nil then Event.Location := F.AsString;
|
||||||
|
Event.Notes := FieldByName('Notes').AsString;
|
||||||
Event.Category := FieldByName('Category').AsInteger;
|
Event.Category := FieldByName('Category').AsInteger;
|
||||||
Event.AlarmWavPath := FieldByName('DingPath').AsString;
|
Event.AlarmWavPath := FieldByName('DingPath').AsString;
|
||||||
Event.AllDayEvent := FieldByName('AllDayEvent').AsBoolean;
|
Event.AllDayEvent := FieldByName('AllDayEvent').AsBoolean;
|
||||||
Event.AlarmSet := FieldByName('AlarmSet').AsBoolean;
|
Event.AlarmSet := FieldByName('AlarmSet').AsBoolean;
|
||||||
Event.AlarmAdv := FieldByName('AlarmAdvance').AsInteger;
|
Event.AlarmAdv := FieldByName('AlarmAdvance').AsInteger;
|
||||||
Event.AlarmAdvType := TVpAlarmAdvType(
|
Event.AlarmAdvType := TVpAlarmAdvType(FieldByName('AlarmAdvanceType').AsInteger);
|
||||||
FieldByName('AlarmAdvanceType').AsInteger);
|
|
||||||
Event.SnoozeTime := FieldByName('SnoozeTime').AsDateTime;
|
Event.SnoozeTime := FieldByName('SnoozeTime').AsDateTime;
|
||||||
Event.RepeatCode := TVpRepeatType(FieldByName('RepeatCode').AsInteger);
|
Event.RepeatCode := TVpRepeatType(FieldByName('RepeatCode').AsInteger);
|
||||||
Event.RepeatRangeEnd := FieldByName('RepeatRangeEnd').AsDateTime;
|
Event.RepeatRangeEnd := FieldByName('RepeatRangeEnd').AsDateTime;
|
||||||
@ -1068,6 +1079,7 @@ end;
|
|||||||
procedure TVpCustomDBDataStore.LoadContacts;
|
procedure TVpCustomDBDataStore.LoadContacts;
|
||||||
var
|
var
|
||||||
Contact: TVpContact;
|
Contact: TVpContact;
|
||||||
|
F: TField;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) then
|
if (Resource <> nil) then
|
||||||
with ContactsTable do begin
|
with ContactsTable do begin
|
||||||
@ -1092,7 +1104,9 @@ begin
|
|||||||
Contact.State := FieldByName('State').AsString;
|
Contact.State := FieldByName('State').AsString;
|
||||||
Contact.Zip := FieldByName('Zip').AsString;
|
Contact.Zip := FieldByName('Zip').AsString;
|
||||||
Contact.Country := FieldByName('Country').AsString;
|
Contact.Country := FieldByName('Country').AsString;
|
||||||
Contact.Note := FieldByName('Note').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.Phone1 := FieldByName('Phone1').AsString;
|
||||||
Contact.Phone2 := FieldByName('Phone2').AsString;
|
Contact.Phone2 := FieldByName('Phone2').AsString;
|
||||||
Contact.Phone3 := FieldByName('Phone3').AsString;
|
Contact.Phone3 := FieldByName('Phone3').AsString;
|
||||||
@ -1168,6 +1182,7 @@ procedure TVpCustomDBDataStore.PostContacts;
|
|||||||
var
|
var
|
||||||
I: Integer;
|
I: Integer;
|
||||||
Contact: TVpContact;
|
Contact: TVpContact;
|
||||||
|
F: TField;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.ContactsDirty then begin
|
if (Resource <> nil) and Resource.ContactsDirty then begin
|
||||||
{ Dump this resource's dirty contacts to the DB }
|
{ Dump this resource's dirty contacts to the DB }
|
||||||
@ -1216,7 +1231,9 @@ begin
|
|||||||
ContactsTable.FieldByName('State').AsString := Contact.State;
|
ContactsTable.FieldByName('State').AsString := Contact.State;
|
||||||
ContactsTable.FieldByName('Zip').AsString := Contact.Zip;
|
ContactsTable.FieldByName('Zip').AsString := Contact.Zip;
|
||||||
ContactsTable.FieldByName('Country').AsString := Contact.Country;
|
ContactsTable.FieldByName('Country').AsString := Contact.Country;
|
||||||
ContactsTable.FieldByName('Note').AsString := Contact.Note;
|
F := ContactsTable.FieldByName('Notes');
|
||||||
|
if F = nil then F := ContactsTable.FieldByName('Note');
|
||||||
|
if F <> nil then F.AsString := Contact.Notes;
|
||||||
ContactsTable.FieldByName('Phone1').AsString := Contact.Phone1;
|
ContactsTable.FieldByName('Phone1').AsString := Contact.Phone1;
|
||||||
ContactsTable.FieldByName('Phone2').AsString := Contact.Phone2;
|
ContactsTable.FieldByName('Phone2').AsString := Contact.Phone2;
|
||||||
ContactsTable.FieldByName('Phone3').AsString := Contact.Phone3;
|
ContactsTable.FieldByName('Phone3').AsString := Contact.Phone3;
|
||||||
@ -1273,6 +1290,7 @@ procedure TVpCustomDBDataStore.PostEvents;
|
|||||||
var
|
var
|
||||||
J: Integer;
|
J: Integer;
|
||||||
Event: TVpEvent;
|
Event: TVpEvent;
|
||||||
|
F: TField;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.EventsDirty then begin
|
if (Resource <> nil) and Resource.EventsDirty then begin
|
||||||
{ Dump this resource's dirty events to the DB }
|
{ Dump this resource's dirty events to the DB }
|
||||||
@ -1310,9 +1328,11 @@ begin
|
|||||||
EventsTable.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
EventsTable.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
||||||
EventsTable.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
EventsTable.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
||||||
EventsTable.FieldByName('Description').AsString := Event.Description;
|
EventsTable.FieldByName('Description').AsString := Event.Description;
|
||||||
EventsTable.FieldByName('Notes').AsString := Event.Note;
|
F := EventsTable.FieldByName('Location'); // new
|
||||||
|
if F <> nil then F.AsString := Event.Location;
|
||||||
|
EventsTable.FieldByName('Notes').AsString := Event.Notes;
|
||||||
EventsTable.FieldByName('Category').AsInteger := Event.Category;
|
EventsTable.FieldByName('Category').AsInteger := Event.Category;
|
||||||
EventsTable.FieldByName('DingPath').AsString := Event.AlarmWavPath;
|
EventsTable.FieldByName('DingPath').AsString := Event.DingPath;
|
||||||
EventsTable.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
EventsTable.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
||||||
EventsTable.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
EventsTable.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
||||||
EventsTable.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
EventsTable.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
||||||
@ -1573,6 +1593,7 @@ end;
|
|||||||
procedure TVpCustomDBDataStore.RefreshContacts;
|
procedure TVpCustomDBDataStore.RefreshContacts;
|
||||||
var
|
var
|
||||||
Contact: TVpContact;
|
Contact: TVpContact;
|
||||||
|
F: TField;
|
||||||
begin
|
begin
|
||||||
if Resource <> nil then begin
|
if Resource <> nil then begin
|
||||||
{ Clear the Contacts }
|
{ Clear the Contacts }
|
||||||
@ -1599,7 +1620,9 @@ begin
|
|||||||
Contact.State := FieldByName('State').AsString;
|
Contact.State := FieldByName('State').AsString;
|
||||||
Contact.Zip := FieldByName('Zip').AsString;
|
Contact.Zip := FieldByName('Zip').AsString;
|
||||||
Contact.Country := FieldByName('Country').AsString;
|
Contact.Country := FieldByName('Country').AsString;
|
||||||
Contact.Note := FieldByName('Note').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.Phone1 := FieldByName('Phone1').AsString;
|
||||||
Contact.Phone2 := FieldByName('Phone2').AsString;
|
Contact.Phone2 := FieldByName('Phone2').AsString;
|
||||||
Contact.Phone3 := FieldByName('Phone3').AsString;
|
Contact.Phone3 := FieldByName('Phone3').AsString;
|
||||||
@ -1637,6 +1660,7 @@ end;
|
|||||||
procedure TVpCustomDBDataStore.RefreshEvents;
|
procedure TVpCustomDBDataStore.RefreshEvents;
|
||||||
var
|
var
|
||||||
Event: TVpEvent;
|
Event: TVpEvent;
|
||||||
|
F: TField;
|
||||||
begin
|
begin
|
||||||
if Resource <> nil then begin
|
if Resource <> nil then begin
|
||||||
{ Clear the Events }
|
{ Clear the Events }
|
||||||
@ -1659,9 +1683,11 @@ begin
|
|||||||
Event.Loading := true; {prevents the events changed flag from being set}
|
Event.Loading := true; {prevents the events changed flag from being set}
|
||||||
// Event.RecordID := FieldByName('RecordID').AsInteger;
|
// Event.RecordID := FieldByName('RecordID').AsInteger;
|
||||||
Event.Description := FieldByName('Description').AsString;
|
Event.Description := FieldByName('Description').AsString;
|
||||||
Event.Note := FieldByName('Notes').AsString;
|
F := FieldByName('Location'); // new
|
||||||
|
if F <> nil then Event.Location := F.AsString;
|
||||||
|
Event.Notes := FieldByName('Notes').AsString;
|
||||||
Event.Category := FieldByName('Category').AsInteger;
|
Event.Category := FieldByName('Category').AsInteger;
|
||||||
Event.AlarmWavPath := FieldByName('DingPath').AsString;
|
Event.DingPath := FieldByName('DingPath').AsString;
|
||||||
Event.AllDayEvent := FieldByName('AllDayEvent').AsBoolean;
|
Event.AllDayEvent := FieldByName('AllDayEvent').AsBoolean;
|
||||||
Event.AlarmSet := FieldByName('AlarmSet').AsBoolean;
|
Event.AlarmSet := FieldByName('AlarmSet').AsBoolean;
|
||||||
Event.AlarmAdv := FieldByName('AlarmAdvance').AsInteger;
|
Event.AlarmAdv := FieldByName('AlarmAdvance').AsInteger;
|
||||||
|
@ -78,10 +78,8 @@ type
|
|||||||
function GetNextID(TableName: string): Int64; override;
|
function GetNextID(TableName: string): Int64; override;
|
||||||
procedure Load; override;
|
procedure Load; override;
|
||||||
procedure CreateTable(TableName: string);
|
procedure CreateTable(TableName: string);
|
||||||
procedure CreateIndexDefs(const TableName : string;
|
procedure CreateIndexDefs(const TableName : string; IndexDefs : TIndexDefs); override;
|
||||||
IndexDefs : TIndexDefs); override;
|
procedure CreateFieldDefs(const TableName : string; FieldDefs : TFieldDefs); override;
|
||||||
procedure CreateFieldDefs(const TableName : string; FieldDefs : TFieldDefs);
|
|
||||||
override;
|
|
||||||
|
|
||||||
procedure PostResources; override;
|
procedure PostResources; override;
|
||||||
procedure PostEvents; override;
|
procedure PostEvents; override;
|
||||||
@ -574,6 +572,8 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
Event: TVpEvent;
|
Event: TVpEvent;
|
||||||
Qry: TDBISAMQuery;
|
Qry: TDBISAMQuery;
|
||||||
|
F: TField;
|
||||||
|
FixedLoc, FixedLocP: String;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.EventsDirty then begin
|
if (Resource <> nil) and Resource.EventsDirty then begin
|
||||||
Qry := TDBISAMQuery.Create(self);
|
Qry := TDBISAMQuery.Create(self);
|
||||||
@ -599,6 +599,14 @@ begin
|
|||||||
Qry.ParamByName('ID').AsInteger := Event.RecordID;
|
Qry.ParamByName('ID').AsInteger := Event.RecordID;
|
||||||
Qry.Open;
|
Qry.Open;
|
||||||
|
|
||||||
|
if Qry.FieldByName('Location') <> nil then begin
|
||||||
|
FixedLoc := 'Location, ';
|
||||||
|
FixedLocP := ':Loc, ';
|
||||||
|
end else begin
|
||||||
|
FixedLoc := '';
|
||||||
|
FixedLocP := '';
|
||||||
|
end;
|
||||||
|
|
||||||
if Qry.Locate('RecordID', Event.RecordID, [])
|
if Qry.Locate('RecordID', Event.RecordID, [])
|
||||||
then begin
|
then begin
|
||||||
{ existing record found }
|
{ existing record found }
|
||||||
@ -609,9 +617,11 @@ begin
|
|||||||
Qry.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
Qry.FieldByName('EndTime').AsDateTime := Event.EndTime;
|
||||||
Qry.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
Qry.FieldByName('ResourceID').AsInteger := Resource.ResourceID;
|
||||||
Qry.FieldByName('Description').AsString := Event.Description;
|
Qry.FieldByName('Description').AsString := Event.Description;
|
||||||
Qry.FieldByName('Notes').AsString := Event.Note;
|
F := Qry.FieldByName('Location'); // new
|
||||||
|
if F <> nil then F.AsString := Event.Location;
|
||||||
|
Qry.FieldByName('Notes').AsString := Event.Notes;
|
||||||
Qry.FieldByName('Category').AsInteger := Event.Category;
|
Qry.FieldByName('Category').AsInteger := Event.Category;
|
||||||
Qry.FieldByName('DingPath').AsString := Event.AlarmWavPath;
|
Qry.FieldByName('DingPath').AsString := Event.DingPath;
|
||||||
Qry.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
Qry.FieldByName('AllDayEvent').AsBoolean := Event.AllDayEvent;
|
||||||
Qry.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
Qry.FieldByName('AlarmSet').AsBoolean := Event.AlarmSet;
|
||||||
Qry.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
Qry.FieldByName('AlarmAdvance').AsInteger := Event.AlarmAdv;
|
||||||
@ -638,15 +648,15 @@ begin
|
|||||||
end else begin
|
end else begin
|
||||||
Qry.Close;
|
Qry.Close;
|
||||||
Qry.SQL.Text := 'INSERT INTO Events '
|
Qry.SQL.Text := 'INSERT INTO Events '
|
||||||
+ '(RecordID, StartTime, EndTime, ResourceID, Description, Notes, '
|
+ '(RecordID, StartTime, EndTime, ResourceID, Description, ' + FixedLoc
|
||||||
+ 'SnoozeTime, Category, DingPath, AllDayEvent, AlarmSet, '
|
+ 'Notes, SnoozeTime, Category, DingPath, AllDayEvent, AlarmSet, '
|
||||||
+ 'AlarmAdvance, AlarmAdvanceType, RepeatCode, '
|
+ 'AlarmAdvance, AlarmAdvanceType, RepeatCode, '
|
||||||
+ 'RepeatRangeEnd, CustomInterval, '
|
+ 'RepeatRangeEnd, CustomInterval, '
|
||||||
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
+ 'UserField0, UserField1, UserField2, UserField3, UserField4, '
|
||||||
+ 'UserField5, UserField6, UserField7, UserField8, UserField9) '
|
+ 'UserField5, UserField6, UserField7, UserField8, UserField9) '
|
||||||
+ 'VALUES(:RecID, :STime, :ETime, :ResID, :Desc, :Notes, :SnTime, '
|
+ 'VALUES(:RecID, :STime, :ETime, :ResID, :Desc, ' + FixedLocP
|
||||||
+ ':Cat, :DPath, :ADEvent, :ASet, :AAdvance, :AAdvanceType, '
|
+ ':Notes, :SnTime, :Cat, :DPath, :ADEvent, :ASet, :AAdvance, '
|
||||||
+ ':RCode, :RRangeEnd, :CInterval, :UserField0, '
|
+ ':AAdvanceType, :RCode, :RRangeEnd, :CInterval, :UserField0, '
|
||||||
+ ':UserField1, :UserField2, :UserField3, :UserField4, '
|
+ ':UserField1, :UserField2, :UserField3, :UserField4, '
|
||||||
+ ':UserField5, :UserField6, :UserField7, :UserField8, '
|
+ ':UserField5, :UserField6, :UserField7, :UserField8, '
|
||||||
+ ':UserField9)';
|
+ ':UserField9)';
|
||||||
@ -656,6 +666,7 @@ begin
|
|||||||
Qry.ParamByName('ETime').AsDateTime := Event.EndTime;
|
Qry.ParamByName('ETime').AsDateTime := Event.EndTime;
|
||||||
Qry.ParamByName('ResID').AsInteger := Resource.ResourceID;
|
Qry.ParamByName('ResID').AsInteger := Resource.ResourceID;
|
||||||
Qry.ParamByName('Desc').AsString := Event.Description;
|
Qry.ParamByName('Desc').AsString := Event.Description;
|
||||||
|
if FixedLocP <> '' then Qry.ParamByName('Loc').AsString := Event.Location;
|
||||||
Qry.ParamByName('Notes').AsString := Event.Note;
|
Qry.ParamByName('Notes').AsString := Event.Note;
|
||||||
Qry.ParamByName('SnTime').AsDateTime := Event.SnoozeTime;
|
Qry.ParamByName('SnTime').AsDateTime := Event.SnoozeTime;
|
||||||
Qry.ParamByName('Cat').AsInteger := Event.Category;
|
Qry.ParamByName('Cat').AsInteger := Event.Category;
|
||||||
@ -705,6 +716,8 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
Contact: TVpContact;
|
Contact: TVpContact;
|
||||||
Qry: TDBISAMQuery;
|
Qry: TDBISAMQuery;
|
||||||
|
F: TField;
|
||||||
|
FixedNote, FixedNoteP: String;
|
||||||
begin
|
begin
|
||||||
if (Resource <> nil) and Resource.ContactsDirty then begin
|
if (Resource <> nil) and Resource.ContactsDirty then begin
|
||||||
{ Dump this resource's dirty contacts to the DB }
|
{ Dump this resource's dirty contacts to the DB }
|
||||||
@ -732,6 +745,15 @@ begin
|
|||||||
Qry.ParamByName('ID').AsInteger := Contact.RecordID;
|
Qry.ParamByName('ID').AsInteger := Contact.RecordID;
|
||||||
Qry.Open;
|
Qry.Open;
|
||||||
|
|
||||||
|
if Qry.FieldByName('Notes') <> nil then begin
|
||||||
|
FixedNote := 'Notes, '; FixedNoteP := ':Note, ';
|
||||||
|
end else
|
||||||
|
if Qry.FieldByName('Note') <> nil then begin
|
||||||
|
FixedNote := 'Note, '; FixedNoteP := ':Notes, ';
|
||||||
|
end else begin
|
||||||
|
FixedNote := ''; FixedNoteP := '';
|
||||||
|
end;
|
||||||
|
|
||||||
if Qry.Locate('RecordID', Contact.RecordID, [])
|
if Qry.Locate('RecordID', Contact.RecordID, [])
|
||||||
then begin
|
then begin
|
||||||
{ existing record found }
|
{ existing record found }
|
||||||
@ -750,7 +772,9 @@ begin
|
|||||||
Qry.FieldByName('State').AsString := Contact.State;
|
Qry.FieldByName('State').AsString := Contact.State;
|
||||||
Qry.FieldByName('Zip').AsString := Contact.Zip;
|
Qry.FieldByName('Zip').AsString := Contact.Zip;
|
||||||
Qry.FieldByName('Country').AsString := Contact.Country;
|
Qry.FieldByName('Country').AsString := Contact.Country;
|
||||||
Qry.FieldByName('Note').AsString := Contact.Note;
|
F := Qry.FieldByName('Notes');
|
||||||
|
if F = nil then F := Qry.FieldByName('Note'); // deprecated
|
||||||
|
if F <> nil then F.AsString := Contact.Notes;
|
||||||
Qry.FieldByName('Phone1').AsString := Contact.Phone1;
|
Qry.FieldByName('Phone1').AsString := Contact.Phone1;
|
||||||
Qry.FieldByName('Phone2').AsString := Contact.Phone2;
|
Qry.FieldByName('Phone2').AsString := Contact.Phone2;
|
||||||
Qry.FieldByName('Phone3').AsString := Contact.Phone3;
|
Qry.FieldByName('Phone3').AsString := Contact.Phone3;
|
||||||
@ -786,7 +810,7 @@ begin
|
|||||||
Qry.SQL.Text := 'INSERT INTO Contacts '
|
Qry.SQL.Text := 'INSERT INTO Contacts '
|
||||||
+ '(ResourceID, RecordID, FirstName, LastName, Title, Company, '
|
+ '(ResourceID, RecordID, FirstName, LastName, Title, Company, '
|
||||||
+ 'Job_Position, EMail, Address, City, State, Zip, Country, '
|
+ 'Job_Position, EMail, Address, City, State, Zip, Country, '
|
||||||
+ 'Note, Phone1, Phone2, Phone3, Phone4, Phone5, PhoneType1, '
|
+ FixedNote + 'Phone1, Phone2, Phone3, Phone4, Phone5, PhoneType1, '
|
||||||
+ 'PhoneType2, PhoneType3, PhoneType4, PhoneType5, Category, '
|
+ 'PhoneType2, PhoneType3, PhoneType4, PhoneType5, Category, '
|
||||||
+ 'Custom1, Custom2, Custom3, Custom4, UserField0, UserField1, '
|
+ 'Custom1, Custom2, Custom3, Custom4, UserField0, UserField1, '
|
||||||
+ 'UserField2, UserField3, UserField4, UserField5, UserField6, '
|
+ 'UserField2, UserField3, UserField4, UserField5, UserField6, '
|
||||||
@ -794,7 +818,7 @@ begin
|
|||||||
|
|
||||||
+ 'VALUES(:ResourceID, :RecordID, :FirstName, :LastName, :Title, '
|
+ 'VALUES(:ResourceID, :RecordID, :FirstName, :LastName, :Title, '
|
||||||
+ ':Company, :Job_Position, :EMail, :Address, :City, :State, :Zip, '
|
+ ':Company, :Job_Position, :EMail, :Address, :City, :State, :Zip, '
|
||||||
+ ':Country, :Note, :Phone1, :Phone2, :Phone3, :Phone4, :Phone5, '
|
+ ':Country, ' + FixedNoteP + ':Phone1, :Phone2, :Phone3, :Phone4, :Phone5, '
|
||||||
+ ':PhoneType1, :PhoneType2, :PhoneType3, :PhoneType4, :PhoneType5, '
|
+ ':PhoneType1, :PhoneType2, :PhoneType3, :PhoneType4, :PhoneType5, '
|
||||||
+ ':Category, :Custom1, :Custom2, :Custom3, :Custom4, :UserField0, '
|
+ ':Category, :Custom1, :Custom2, :Custom3, :Custom4, :UserField0, '
|
||||||
+ ':UserField1, :UserField2, :UserField3, :UserField4, :UserField5, '
|
+ ':UserField1, :UserField2, :UserField3, :UserField4, :UserField5, '
|
||||||
@ -813,7 +837,7 @@ begin
|
|||||||
Qry.ParamByName('State').AsString := Contact.State;
|
Qry.ParamByName('State').AsString := Contact.State;
|
||||||
Qry.ParamByName('Zip').AsString := Contact.Zip;
|
Qry.ParamByName('Zip').AsString := Contact.Zip;
|
||||||
Qry.ParamByName('Country').AsString := Contact.Country;
|
Qry.ParamByName('Country').AsString := Contact.Country;
|
||||||
Qry.ParamByName('Note').AsString := Contact.Note;
|
if FixedNoteP <> '' then Qry.ParamByName('Notes').AsString := Contact.Notes;
|
||||||
Qry.ParamByName('Phone1').AsString := Contact.Phone1;
|
Qry.ParamByName('Phone1').AsString := Contact.Phone1;
|
||||||
Qry.ParamByName('Phone2').AsString := Contact.Phone2;
|
Qry.ParamByName('Phone2').AsString := Contact.Phone2;
|
||||||
Qry.ParamByName('Phone3').AsString := Contact.Phone3;
|
Qry.ParamByName('Phone3').AsString := Contact.Phone3;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
object DlgEventEdit: TDlgEventEdit
|
object DlgEventEdit: TDlgEventEdit
|
||||||
Left = 417
|
Left = 417
|
||||||
Height = 385
|
Height = 388
|
||||||
Top = 211
|
Top = 211
|
||||||
Width = 697
|
Width = 697
|
||||||
BorderStyle = bsToolWindow
|
BorderStyle = bsToolWindow
|
||||||
Caption = 'Add / Edit Events'
|
Caption = 'Add / Edit Events'
|
||||||
ClientHeight = 385
|
ClientHeight = 388
|
||||||
ClientWidth = 697
|
ClientWidth = 697
|
||||||
Constraints.MinHeight = 378
|
Constraints.MinHeight = 378
|
||||||
Constraints.MinWidth = 594
|
Constraints.MinWidth = 594
|
||||||
@ -16,7 +16,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 41
|
Height = 41
|
||||||
Top = 344
|
Top = 347
|
||||||
Width = 697
|
Width = 697
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -96,9 +96,9 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
end
|
end
|
||||||
object CategoryLbl: TLabel
|
object CategoryLbl: TLabel
|
||||||
Left = 5
|
Left = 403
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 41
|
Top = 43
|
||||||
Width = 51
|
Width = 51
|
||||||
Caption = 'Category:'
|
Caption = 'Category:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -286,7 +286,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
Width = 74
|
Width = 74
|
||||||
Caption = '&Reminder:'
|
Caption = '&Reminder:'
|
||||||
OnClick = AlarmSetClick
|
OnClick = AlarmSetClick
|
||||||
TabOrder = 11
|
TabOrder = 12
|
||||||
end
|
end
|
||||||
object StartTime: TComboBox
|
object StartTime: TComboBox
|
||||||
Left = 231
|
Left = 231
|
||||||
@ -296,7 +296,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
OnChangeBounds = StartTimeChange
|
OnChangeBounds = StartTimeChange
|
||||||
OnExit = StartTimeExit
|
OnExit = StartTimeExit
|
||||||
TabOrder = 4
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object EndTime: TComboBox
|
object EndTime: TComboBox
|
||||||
Left = 231
|
Left = 231
|
||||||
@ -306,18 +306,18 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
OnChangeBounds = EndTimeChange
|
OnChangeBounds = EndTimeChange
|
||||||
OnExit = EndTimeExit
|
OnExit = EndTimeExit
|
||||||
TabOrder = 6
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
object Category: TComboBox
|
object Category: TComboBox
|
||||||
Left = 86
|
Left = 484
|
||||||
Height = 21
|
Height = 21
|
||||||
Top = 38
|
Top = 40
|
||||||
Width = 182
|
Width = 182
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
OnDrawItem = CategoryDrawItem
|
OnDrawItem = CategoryDrawItem
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
Style = csOwnerDrawFixed
|
Style = csOwnerDrawFixed
|
||||||
TabOrder = 1
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object RecurringType: TComboBox
|
object RecurringType: TComboBox
|
||||||
Left = 379
|
Left = 379
|
||||||
@ -327,7 +327,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
OnChange = RecurringTypeChange
|
OnChange = RecurringTypeChange
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 7
|
TabOrder = 8
|
||||||
end
|
end
|
||||||
object IntervalUpDown: TUpDown
|
object IntervalUpDown: TUpDown
|
||||||
Left = 652
|
Left = 652
|
||||||
@ -339,7 +339,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
Min = 0
|
Min = 0
|
||||||
OnClick = IntervalUpDownClick
|
OnClick = IntervalUpDownClick
|
||||||
Position = 0
|
Position = 0
|
||||||
TabOrder = 9
|
TabOrder = 10
|
||||||
Wrap = False
|
Wrap = False
|
||||||
end
|
end
|
||||||
object AlarmAdvType: TComboBox
|
object AlarmAdvType: TComboBox
|
||||||
@ -349,7 +349,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
Width = 93
|
Width = 93
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 14
|
TabOrder = 15
|
||||||
end
|
end
|
||||||
object AdvanceUpDown: TUpDown
|
object AdvanceUpDown: TUpDown
|
||||||
Left = 194
|
Left = 194
|
||||||
@ -361,7 +361,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
Min = 1
|
Min = 1
|
||||||
OnClick = AdvanceUpDownClick
|
OnClick = AdvanceUpDownClick
|
||||||
Position = 1
|
Position = 1
|
||||||
TabOrder = 13
|
TabOrder = 14
|
||||||
Wrap = False
|
Wrap = False
|
||||||
end
|
end
|
||||||
object CBAllDay: TCheckBox
|
object CBAllDay: TCheckBox
|
||||||
@ -371,14 +371,14 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
Width = 89
|
Width = 89
|
||||||
Caption = 'All Day Event'
|
Caption = 'All Day Event'
|
||||||
OnClick = CBAllDayClick
|
OnClick = CBAllDayClick
|
||||||
TabOrder = 2
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object edtUnusedPlaceholder: TEdit
|
object edtUnusedPlaceholder: TEdit
|
||||||
Left = 587
|
Left = 587
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 104
|
Top = 104
|
||||||
Width = 65
|
Width = 65
|
||||||
TabOrder = 8
|
TabOrder = 9
|
||||||
Text = 'Placeholder control'
|
Text = 'Placeholder control'
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
@ -431,7 +431,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
OnChangeBounds = StartDateChange
|
OnChangeBounds = StartDateChange
|
||||||
TabOrder = 3
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object EndDate: TDateEdit
|
object EndDate: TDateEdit
|
||||||
Left = 104
|
Left = 104
|
||||||
@ -482,7 +482,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
OnChangeBounds = EndDateChange
|
OnChangeBounds = EndDateChange
|
||||||
TabOrder = 5
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
object RepeatUntil: TDateEdit
|
object RepeatUntil: TDateEdit
|
||||||
Left = 440
|
Left = 440
|
||||||
@ -532,7 +532,7 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
}
|
}
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
TabOrder = 10
|
TabOrder = 11
|
||||||
end
|
end
|
||||||
object AlarmAdvance: TEdit
|
object AlarmAdvance: TEdit
|
||||||
Left = 130
|
Left = 130
|
||||||
@ -540,13 +540,29 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
Top = 168
|
Top = 168
|
||||||
Width = 64
|
Width = 64
|
||||||
OnChange = AlarmAdvanceChange
|
OnChange = AlarmAdvanceChange
|
||||||
TabOrder = 12
|
TabOrder = 13
|
||||||
Text = 'AlarmAdvance'
|
Text = 'AlarmAdvance'
|
||||||
end
|
end
|
||||||
|
object LocationLbl: TLabel
|
||||||
|
Left = 5
|
||||||
|
Height = 15
|
||||||
|
Top = 43
|
||||||
|
Width = 49
|
||||||
|
Caption = 'Location:'
|
||||||
|
FocusControl = LocationEdit
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object LocationEdit: TEdit
|
||||||
|
Left = 86
|
||||||
|
Height = 23
|
||||||
|
Top = 39
|
||||||
|
Width = 235
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object NotesMemo: TMemo
|
object NotesMemo: TMemo
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 102
|
Height = 105
|
||||||
Top = 232
|
Top = 232
|
||||||
Width = 679
|
Width = 679
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
@ -41,7 +41,7 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
SysUtils, {$IFDEF VERSION6}Variants,{$ENDIF} Classes,
|
SysUtils, {$IFDEF VERSION6}Variants,{$ENDIF} Classes,
|
||||||
Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, VpData, VpEdPop,
|
Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, VpData, VpEdPop,
|
||||||
VpDateEdit, ComCtrls, VpBase, VpClock, VpBaseDS, VpDlg, VpConst,
|
ComCtrls, VpBase, VpBaseDS, VpDlg, VpConst,
|
||||||
Buttons, EditBtn;
|
Buttons, EditBtn;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -59,6 +59,8 @@ type
|
|||||||
|
|
||||||
TDlgEventEdit = class(TForm)
|
TDlgEventEdit = class(TForm)
|
||||||
AlarmAdvance: TEdit;
|
AlarmAdvance: TEdit;
|
||||||
|
LocationEdit: TEdit;
|
||||||
|
LocationLbl: TLabel;
|
||||||
NotesMemo: TMemo;
|
NotesMemo: TMemo;
|
||||||
StartDate: TDateEdit;
|
StartDate: TDateEdit;
|
||||||
EndDate: TDateEdit;
|
EndDate: TDateEdit;
|
||||||
@ -307,14 +309,14 @@ begin
|
|||||||
CBAllDay.Checked := Event.AllDayEvent;
|
CBAllDay.Checked := Event.AllDayEvent;
|
||||||
AlarmWavPath := Event.AlarmWavPath;
|
AlarmWavPath := Event.AlarmWavPath;
|
||||||
|
|
||||||
|
|
||||||
StartDate.Enabled := not CBAllDay.Checked;
|
StartDate.Enabled := not CBAllDay.Checked;
|
||||||
EndDate.Enabled := not CBAllDay.Checked;
|
EndDate.Enabled := not CBAllDay.Checked;
|
||||||
EndTime.Enabled := not CBAllDay.Checked;
|
EndTime.Enabled := not CBAllDay.Checked;
|
||||||
StartTime.Enabled := not CBAllDay.Checked;
|
StartTime.Enabled := not CBAllDay.Checked;
|
||||||
|
|
||||||
DescriptionEdit.Text := Event.Description;
|
DescriptionEdit.Text := Event.Description;
|
||||||
NotesMemo.Text := Event.Note;
|
LocationEdit.Text := Event.Location;
|
||||||
|
NotesMemo.Text := Event.Notes;
|
||||||
AlarmSet.Checked := Event.AlarmSet;
|
AlarmSet.Checked := Event.AlarmSet;
|
||||||
AlarmSetClick(Self);
|
AlarmSetClick(Self);
|
||||||
if not Event.AlarmSet then
|
if not Event.AlarmSet then
|
||||||
@ -345,7 +347,8 @@ begin
|
|||||||
Event.EndTime := EndDate.Date + StrToTime(EndTime.Text);
|
Event.EndTime := EndDate.Date + StrToTime(EndTime.Text);
|
||||||
Event.RepeatRangeEnd := RepeatUntil.Date;
|
Event.RepeatRangeEnd := RepeatUntil.Date;
|
||||||
Event.Description := DescriptionEdit.Text;
|
Event.Description := DescriptionEdit.Text;
|
||||||
Event.Note := NotesMemo.Text;
|
Event.Location := LocationEdit.Text;
|
||||||
|
Event.Notes := NotesMemo.Text;
|
||||||
Event.Category := Category.ItemIndex;
|
Event.Category := Category.ItemIndex;
|
||||||
Event.AlarmSet := AlarmSet.Checked;
|
Event.AlarmSet := AlarmSet.Checked;
|
||||||
Event.AlarmAdv := StrToIntDef(AlarmAdvance.Text, 0);
|
Event.AlarmAdv := StrToIntDef(AlarmAdvance.Text, 0);
|
||||||
@ -353,7 +356,7 @@ begin
|
|||||||
Event.RepeatCode := TVpRepeatType(RecurringType.ItemIndex);
|
Event.RepeatCode := TVpRepeatType(RecurringType.ItemIndex);
|
||||||
Event.CustInterval := StrToIntDef(FCustomInterval.Text, 0);
|
Event.CustInterval := StrToIntDef(FCustomInterval.Text, 0);
|
||||||
Event.AllDayEvent := CBAllDay.Checked;
|
Event.AllDayEvent := CBAllDay.Checked;
|
||||||
Event.AlarmWavPath := AlarmWavPath;
|
Event.DingPath := AlarmWavPath;
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
@ -502,6 +505,7 @@ begin
|
|||||||
CancelBtn.Caption := RSCancelBtn;
|
CancelBtn.Caption := RSCancelBtn;
|
||||||
AppointmentGroupBox.Caption := RSAppointmentGroupBox;
|
AppointmentGroupBox.Caption := RSAppointmentGroupBox;
|
||||||
DescriptionLbl.Caption := RSDescriptionLbl;
|
DescriptionLbl.Caption := RSDescriptionLbl;
|
||||||
|
LocationLbl.Caption := RSLocationLbl;
|
||||||
CategoryLbl.Caption := RSCategoryLbl;
|
CategoryLbl.Caption := RSCategoryLbl;
|
||||||
StartTimeLbl.Caption := RSStartTimeLbl;
|
StartTimeLbl.Caption := RSStartTimeLbl;
|
||||||
EndTimeLbl.Caption := RSEndTimeLbl;
|
EndTimeLbl.Caption := RSEndTimeLbl;
|
||||||
|
@ -158,9 +158,8 @@ type
|
|||||||
procedure PurgeEvents(Res: TVpResource); override;
|
procedure PurgeEvents(Res: TVpResource); override;
|
||||||
procedure PurgeContacts(Res: TVpResource); override;
|
procedure PurgeContacts(Res: TVpResource); override;
|
||||||
procedure PurgeTasks(Res: TVpResource); override;
|
procedure PurgeTasks(Res: TVpResource); override;
|
||||||
function GetFieldName(Mappings: TCollection;
|
|
||||||
VPField: string): string;
|
|
||||||
|
|
||||||
|
function GetFieldName(Mappings: TCollection; VPField: string): string;
|
||||||
function GetNextID(TableName: string): Int64; override;
|
function GetNextID(TableName: string): Int64; override;
|
||||||
|
|
||||||
{ These are published via the TVpDataSources class, which allows them to }
|
{ These are published via the TVpDataSources class, which allows them to }
|
||||||
@ -246,43 +245,39 @@ begin
|
|||||||
and FContactsDataSrc.DataSet.Active
|
and FContactsDataSrc.DataSet.Active
|
||||||
and FTasksDataSrc.DataSet.Active;
|
and FTasksDataSrc.DataSet.Active;
|
||||||
|
|
||||||
result := AllAssigned and AllActive;
|
Result := AllAssigned and AllActive;
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
function TVpFlexDataStore.GetResourceTable : TDataset;
|
function TVpFlexDataStore.GetResourceTable : TDataset;
|
||||||
begin
|
begin
|
||||||
result := nil;
|
result := nil;
|
||||||
if (FResourceDataSrc <> nil)
|
if (FResourceDataSrc <> nil) and (FResourceDataSrc.DataSet <> nil) then
|
||||||
and (FResourceDataSrc.DataSet <> nil)
|
Result := FResourceDataSrc.DataSet;
|
||||||
then result := FResourceDataSrc.DataSet;
|
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
function TVpFlexDataStore.GetEventsTable : TDataset;
|
function TVpFlexDataStore.GetEventsTable : TDataset;
|
||||||
begin
|
begin
|
||||||
result := nil;
|
result := nil;
|
||||||
if (FEventsDataSrc <> nil)
|
if (FEventsDataSrc <> nil) and (FEventsDataSrc.DataSet <> nil) then
|
||||||
and (FEventsDataSrc.DataSet <> nil)
|
Result := FEventsDataSrc.DataSet;
|
||||||
then result := FEventsDataSrc.DataSet;
|
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
function TVpFlexDataStore.GetContactsTable : TDataset;
|
function TVpFlexDataStore.GetContactsTable : TDataset;
|
||||||
begin
|
begin
|
||||||
result := nil;
|
result := nil;
|
||||||
if (FContactsDataSrc <> nil)
|
if (FContactsDataSrc <> nil) and (FContactsDataSrc.DataSet <> nil) then
|
||||||
and (FContactsDataSrc.DataSet <> nil)
|
Result := FContactsDataSrc.DataSet;
|
||||||
then result := FContactsDataSrc.DataSet;
|
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
function TVpFlexDataStore.GetTasksTable : TDataset;
|
function TVpFlexDataStore.GetTasksTable : TDataset;
|
||||||
begin
|
begin
|
||||||
result := nil;
|
result := nil;
|
||||||
if (FTasksDataSrc <> nil)
|
if (FTasksDataSrc <> nil) and (FTasksDataSrc.DataSet <> nil) then
|
||||||
and (FTasksDataSrc.DataSet <> nil)
|
Result := FTasksDataSrc.DataSet;
|
||||||
then result := FTasksDataSrc.DataSet;
|
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
@ -575,15 +570,22 @@ begin
|
|||||||
if (FN1 <> '') then
|
if (FN1 <> '') then
|
||||||
Event.Description := FieldByName(FN1).AsString;
|
Event.Description := FieldByName(FN1).AsString;
|
||||||
|
|
||||||
FN1 := GetFieldName(FEventMappings, 'Note');
|
FN1 := GetFieldName(FEventMappings, 'Location'); // new
|
||||||
if (FN1 <> '') then
|
if (FN1 <> '') then
|
||||||
Event.Note := FieldByName(FN1).AsString;
|
Event.Location := FieldByName(FN1).AsString;
|
||||||
|
|
||||||
|
FN1 := GetFieldName(FEventMappings, 'Notes');
|
||||||
|
if (FN1 = '') then FN1 := GetFieldName(FEventMappings, 'Note'); // deprecated
|
||||||
|
if (FN1 <> '') then
|
||||||
|
Event.Notes := FieldByName(FN1).AsString;
|
||||||
|
|
||||||
FN1 := GetFieldName(FEventMappings, 'Category');
|
FN1 := GetFieldName(FEventMappings, 'Category');
|
||||||
if (FN1 <> '') then
|
if (FN1 <> '') then
|
||||||
Event.Category := FieldByName(FN1).AsInteger;
|
Event.Category := FieldByName(FN1).AsInteger;
|
||||||
|
|
||||||
FN1 := GetFieldName(FEventMappings, 'AlarmWavPath');
|
FN1 := GetFieldName(FEventMappings, 'DingPath');
|
||||||
|
if FN1 = '' then
|
||||||
|
FN1 := GetFieldName(FEventMappings, 'AlarmWavPath'); // deprectated
|
||||||
if (FN1 <> '') then
|
if (FN1 <> '') then
|
||||||
Event.AlarmWavPath := FieldByName(FN1).AsString;
|
Event.AlarmWavPath := FieldByName(FN1).AsString;
|
||||||
|
|
||||||
@ -746,9 +748,11 @@ begin
|
|||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
Contact.Country := FieldByName(FN).AsString;
|
Contact.Country := FieldByName(FN).AsString;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Note');
|
FN := GetFieldName(FContactMappings, 'Notes');
|
||||||
|
if FN = '' then
|
||||||
|
FN := GetFieldName(FContactMappings, 'Note'); // deprecated
|
||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
Contact.Note := FieldByName(FN).AsString;
|
Contact.Notes := FieldByName(FN).AsString;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Phone1');
|
FN := GetFieldName(FContactMappings, 'Phone1');
|
||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
@ -1161,15 +1165,23 @@ begin
|
|||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
EventsTable.FieldByName(FN).AsString := Event.Description;
|
EventsTable.FieldByName(FN).AsString := Event.Description;
|
||||||
|
|
||||||
FN := GetFieldName(FEventMappings, 'Note');
|
FN := GetFieldName(FEventMappings, 'Location'); // new
|
||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
EventsTable.FieldByName(FN).AsString := Event.Note;
|
EventsTable.FieldByName(FN).AsString := Event.Location;
|
||||||
|
|
||||||
|
FN := GetFieldName(FEventMappings, 'Notes');
|
||||||
|
if FN = '' then
|
||||||
|
FN := GetFieldName(FEventMappings, 'Note'); // deprecated
|
||||||
|
if FN <> '' then
|
||||||
|
EventsTable.FieldByName(FN).AsString := Event.Notes;
|
||||||
|
|
||||||
FN := GetFieldName(FEventMappings, 'Category');
|
FN := GetFieldName(FEventMappings, 'Category');
|
||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
EventsTable.FieldByName(FN).AsInteger := Event.Category;
|
EventsTable.FieldByName(FN).AsInteger := Event.Category;
|
||||||
|
|
||||||
FN := GetFieldName(FEventMappings, 'AlarmWavPath');
|
FN := GetFieldName(FEventMappings, 'DingPath');
|
||||||
|
if FN = '' then
|
||||||
|
FN := GetFieldName(FEventMappings, 'AlarmWavPath'); // deprecated
|
||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
EventsTable.FieldByName(FN).AsString := Event.AlarmWavPath;
|
EventsTable.FieldByName(FN).AsString := Event.AlarmWavPath;
|
||||||
|
|
||||||
@ -1380,9 +1392,11 @@ begin
|
|||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
ContactsTable.FieldByName(FN).AsString := Contact.Country;
|
ContactsTable.FieldByName(FN).AsString := Contact.Country;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Note');
|
FN := GetFieldName(FContactMappings, 'Notes');
|
||||||
|
if FN = '' then
|
||||||
|
FN := GetFieldName(FContactMappings, 'Note'); // deprecated
|
||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
ContactsTable.FieldByName(FN).AsString := Contact.Note;
|
ContactsTable.FieldByName(FN).AsString := Contact.Notes;
|
||||||
|
|
||||||
FN := GetFieldName(FContactMappings, 'Phone1');
|
FN := GetFieldName(FContactMappings, 'Phone1');
|
||||||
if FN <> '' then
|
if FN <> '' then
|
||||||
|
@ -588,5 +588,4 @@ begin
|
|||||||
canvas.Free;
|
canvas.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -222,6 +222,7 @@ resourcestring
|
|||||||
RSDlgEventEdit = 'Event';
|
RSDlgEventEdit = 'Event';
|
||||||
RSAppointmentGroupBox = 'Appointment';
|
RSAppointmentGroupBox = 'Appointment';
|
||||||
RSDescriptionLbl = 'Subject:';
|
RSDescriptionLbl = 'Subject:';
|
||||||
|
RSLocationLbl = 'Location:';
|
||||||
RSCategoryLbl = 'Category:';
|
RSCategoryLbl = 'Category:';
|
||||||
RSStartTimeLbl = 'Start Time:';
|
RSStartTimeLbl = 'Start Time:';
|
||||||
RSEndTimeLbl = 'End Time:';
|
RSEndTimeLbl = 'End Time:';
|
||||||
|
Reference in New Issue
Block a user