1 // frmContactEditorBusiness.cpp - frmContactEditor Business tab subroutines.
3 // (c) 2012-2016 Xestia Software Development.
5 // This file is part of Xestia Address Book.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include "frmContactEditor.h"
20 #include "frmContactEditorNickname.h"
21 #include "frmContactEditorAddress.h"
22 #include "frmContactEditorEmail.h"
23 #include "frmContactEditorIM.h"
24 #include "frmContactEditorTelephone.h"
25 #include "frmContactEditorLanguages.h"
26 #include "frmContactEditorTimezones.h"
27 #include "frmContactEditorRelated.h"
28 #include "frmContactEditorWebsites.h"
29 #include "frmContactEditorTitles.h"
30 #include "frmContactEditorRoles.h"
31 #include "frmContactEditorGeoposition.h"
32 #include "frmContactEditorGroups.h"
33 #include "frmContactEditorOrganisations.h"
34 #include "frmContactEditorNotes.h"
36 void frmContactEditor::AddBusinessNickname( wxCommandEvent& event )
39 // Bring up the window for adding a nickname.
41 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42 frameCENickname->SetEditorMode(FALSE, CE_WORK);
43 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
44 &ContactEditorData.BusinessNicknamesListAltID,
45 &ContactEditorData.BusinessNicknamesListPID,
46 &ContactEditorData.BusinessNicknamesListType,
47 &ContactEditorData.BusinessNicknamesListLanguage,
48 &ContactEditorData.BusinessNicknamesListTokens,
49 &ContactEditorData.BusinessNicknamesListPref,
52 frameCENickname->ShowModal();
53 delete frameCENickname;
54 frameCENickname = NULL;
59 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
62 // Bring up the window for modifying a nickname.
64 long longSelected = -1;
65 int intSelectedData = 0;
67 if (lboBusinessNicknames->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNicknames,
75 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
76 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
77 &ContactEditorData.BusinessNicknamesListAltID,
78 &ContactEditorData.BusinessNicknamesListPID,
79 &ContactEditorData.BusinessNicknamesListType,
80 &ContactEditorData.BusinessNicknamesListLanguage,
81 &ContactEditorData.BusinessNicknamesListTokens,
82 &ContactEditorData.BusinessNicknamesListPref,
85 frameCENickname->SetEditorMode(TRUE, CE_WORK);
86 frameCENickname->ShowModal();
87 delete frameCENickname;
88 frameCENickname = NULL;
92 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
95 // Bring up the window to delete the nickname.
97 long longSelected = -1;
98 int intSelectedData = 0;
100 if (lboBusinessNicknames->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNicknames,
108 lboBusinessNicknames->DeleteItem(longSelected);
110 DeleteMapData(intSelectedData,
111 &ContactEditorData.BusinessNicknamesList,
112 &ContactEditorData.BusinessNicknamesListLanguage,
113 &ContactEditorData.BusinessNicknamesListAltID,
114 &ContactEditorData.BusinessNicknamesListPID,
115 &ContactEditorData.BusinessNicknamesListTokens,
116 &ContactEditorData.BusinessNicknamesListType,
117 &ContactEditorData.BusinessNicknamesListPref);
121 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
124 // Bring up the window for adding an address.
126 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
127 frameCEAddress->SetEditorMode(FALSE, CE_WORK);
128 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
129 &ContactEditorData.BusinessAddressListTown,
130 &ContactEditorData.BusinessAddressListCounty,
131 &ContactEditorData.BusinessAddressListPostCode,
132 &ContactEditorData.BusinessAddressListCountry,
133 &ContactEditorData.BusinessAddressListLabel,
134 &ContactEditorData.BusinessAddressListLang,
135 &ContactEditorData.BusinessAddressListAltID,
136 &ContactEditorData.BusinessAddressListPID,
137 &ContactEditorData.BusinessAddressListTokens,
138 &ContactEditorData.BusinessAddressListGeo,
139 &ContactEditorData.BusinessAddressListTimezone,
140 &ContactEditorData.BusinessAddressListType,
141 &ContactEditorData.BusinessAddressListMediatype,
142 &ContactEditorData.BusinessAddressListPref,
143 lboBusinessAddresses,
145 frameCEAddress->ShowModal();
146 delete frameCEAddress;
147 frameCEAddress = NULL;
152 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
155 // Bring up a window for editing an address.
157 long longSelected = -1;
158 int intSelectedData = 0;
160 if (lboBusinessAddresses->GetItemCount() == 0 || !GetSelectedItem(lboBusinessAddresses,
168 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
169 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
170 &ContactEditorData.BusinessAddressListTown,
171 &ContactEditorData.BusinessAddressListCounty,
172 &ContactEditorData.BusinessAddressListPostCode,
173 &ContactEditorData.BusinessAddressListCountry,
174 &ContactEditorData.BusinessAddressListLabel,
175 &ContactEditorData.BusinessAddressListLang,
176 &ContactEditorData.BusinessAddressListAltID,
177 &ContactEditorData.BusinessAddressListPID,
178 &ContactEditorData.BusinessAddressListTokens,
179 &ContactEditorData.BusinessAddressListGeo,
180 &ContactEditorData.BusinessAddressListTimezone,
181 &ContactEditorData.BusinessAddressListType,
182 &ContactEditorData.BusinessAddressListMediatype,
183 &ContactEditorData.BusinessAddressListPref,
184 lboBusinessAddresses,
186 frameCEAddress->SetEditorMode(TRUE, CE_WORK);
187 frameCEAddress->ShowModal();
188 delete frameCEAddress;
189 frameCEAddress = NULL;
193 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
196 // Bring up the window for deleting the address.
198 long longSelected = -1;
199 int intSelectedData = 0;
201 if (lboBusinessAddresses->GetItemCount() == 0 || !GetSelectedItem(lboBusinessAddresses,
209 lboBusinessAddresses->DeleteItem(longSelected);
210 DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
211 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
212 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
213 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
214 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
215 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
216 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
217 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
218 &ContactEditorData.BusinessAddressListPref);
222 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
225 // Bring up the window for adding an email address.
227 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
228 frameCEEmail->SetEditorMode(FALSE, CE_WORK);
229 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
230 &ContactEditorData.BusinessEmailListAltID,
231 &ContactEditorData.BusinessEmailListPID,
232 &ContactEditorData.BusinessEmailListType,
233 &ContactEditorData.BusinessEmailListTokens,
234 &ContactEditorData.BusinessEmailListPref,
237 frameCEEmail->ShowModal();
244 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
247 // Bring up the window for modifying the email address.
249 long longSelected = -1;
250 int intSelectedData = 0;
252 if (lboBusinessEmail->GetItemCount() == 0 || !GetSelectedItem(lboBusinessEmail,
260 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
261 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
262 &ContactEditorData.BusinessEmailListAltID,
263 &ContactEditorData.BusinessEmailListPID,
264 &ContactEditorData.BusinessEmailListType,
265 &ContactEditorData.BusinessEmailListTokens,
266 &ContactEditorData.BusinessEmailListPref,
269 frameCEEmail->SetEditorMode(TRUE, CE_WORK);
270 frameCEEmail->ShowModal();
276 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
279 // Bring up the window to delete the email address.
281 long longSelected = -1;
282 int intSelectedData = 0;
284 if (lboBusinessEmail->GetItemCount() == 0 || !GetSelectedItem(lboBusinessEmail,
292 lboBusinessEmail->DeleteItem(longSelected);
294 DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
295 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
296 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
297 &ContactEditorData.BusinessEmailListPref);
301 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
304 // Bring up the window for adding an IM address.
306 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
307 frameCEIM->SetEditorMode(FALSE, CE_WORK);
308 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
309 &ContactEditorData.BusinessIMListAltID,
310 &ContactEditorData.BusinessIMListPID,
311 &ContactEditorData.BusinessIMListType,
312 &ContactEditorData.BusinessIMListTypeInfo,
313 &ContactEditorData.BusinessIMListTokens,
314 &ContactEditorData.BusinessIMListMediatype,
315 &ContactEditorData.BusinessIMListPref,
318 frameCEIM->ShowModal();
325 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
328 // Bring up the window for editing an IM address.
330 long longSelected = -1;
331 int intSelectedData = 0;
333 if (lboBusinessIM->GetItemCount() == 0 || !GetSelectedItem(lboBusinessIM,
341 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
342 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
343 &ContactEditorData.BusinessIMListAltID,
344 &ContactEditorData.BusinessIMListPID,
345 &ContactEditorData.BusinessIMListType,
346 &ContactEditorData.BusinessIMListTypeInfo,
347 &ContactEditorData.BusinessIMListTokens,
348 &ContactEditorData.BusinessIMListMediatype,
349 &ContactEditorData.BusinessIMListPref,
352 frameCEIM->SetEditorMode(TRUE, CE_WORK);
353 frameCEIM->ShowModal();
359 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
362 // Bring up the window for deleting an IM address.
364 long longSelected = -1;
365 int intSelectedData = 0;
367 if (lboBusinessIM->GetItemCount() == 0 || !GetSelectedItem(lboBusinessIM,
375 lboBusinessIM->DeleteItem(longSelected);
377 DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
378 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
379 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
380 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype,
381 &ContactEditorData.BusinessIMListPref);
385 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
388 // Bring up the window for adding a telephone number.
390 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
391 frameCETel->SetEditorMode(FALSE, CE_WORK);
392 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
393 &ContactEditorData.BusinessTelephoneListAltID,
394 &ContactEditorData.BusinessTelephoneListPID,
395 &ContactEditorData.BusinessTelephoneListType,
396 &ContactEditorData.BusinessTelephoneListTypeInfo,
397 &ContactEditorData.BusinessTelephoneListTokens,
398 &ContactEditorData.BusinessTelephoneListPref,
399 lboBusinessTelephone,
401 frameCETel->ShowModal();
408 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
411 // Bring up the address for editing a telephone number.
413 long longSelected = -1;
414 int intSelectedData = 0;
416 if (lboBusinessTelephone->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTelephone,
424 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
425 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
426 &ContactEditorData.BusinessTelephoneListAltID,
427 &ContactEditorData.BusinessTelephoneListPID,
428 &ContactEditorData.BusinessTelephoneListType,
429 &ContactEditorData.BusinessTelephoneListTypeInfo,
430 &ContactEditorData.BusinessTelephoneListTokens,
431 &ContactEditorData.BusinessTelephoneListPref,
432 lboBusinessTelephone,
434 frameCETel->SetEditorMode(TRUE, CE_WORK);
435 frameCETel->ShowModal();
441 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
444 // Bring up the window for deleting a telephone number.
446 long longSelected = -1;
447 int intSelectedData = 0;
449 if (lboBusinessTelephone->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTelephone,
457 lboBusinessTelephone->DeleteItem(longSelected);
459 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
460 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
461 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
462 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
466 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
469 // Bring up the window for adding a language.
471 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
472 frameCELang->SetEditorMode(FALSE, CE_WORK);
473 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
474 &ContactEditorData.BusinessLanguageListAltID,
475 &ContactEditorData.BusinessLanguageListPID,
476 &ContactEditorData.BusinessLanguageListType,
477 &ContactEditorData.BusinessLanguageListTokens,
478 &ContactEditorData.BusinessLanguageListPref,
479 lboBusinessLanguages,
481 frameCELang->ShowModal();
488 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
491 // Bring up the window for editing a language.
493 long longSelected = -1;
494 int intSelectedData = 0;
496 if (lboBusinessLanguages->GetItemCount() == 0 || !GetSelectedItem(lboBusinessLanguages,
504 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
505 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
506 &ContactEditorData.BusinessLanguageListAltID,
507 &ContactEditorData.BusinessLanguageListPID,
508 &ContactEditorData.BusinessLanguageListType,
509 &ContactEditorData.BusinessLanguageListTokens,
510 &ContactEditorData.BusinessLanguageListPref,
511 lboBusinessLanguages,
513 frameCELang->SetEditorMode(TRUE, CE_WORK);
514 frameCELang->ShowModal();
520 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
523 // Bring up the window for deleting a language.
525 long longSelected = -1;
526 int intSelectedData = 0;
528 if (lboBusinessLanguages->GetItemCount() == 0 || !GetSelectedItem(lboBusinessLanguages,
536 lboBusinessLanguages->DeleteItem(longSelected);
538 DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
539 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
540 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
541 &ContactEditorData.BusinessLanguageListPref);
545 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
548 // Bring up the window for adding a timezone.
550 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
551 frameCETZ->SetEditorMode(FALSE, CE_WORK);
552 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
553 &ContactEditorData.BusinessTZListAltID,
554 &ContactEditorData.BusinessTZListPID,
555 &ContactEditorData.BusinessTZListType,
556 &ContactEditorData.BusinessTZListTokens,
557 &ContactEditorData.BusinessTZListMediatype,
558 &ContactEditorData.BusinessTZListPref,
559 lboBusinessTimezones,
561 frameCETZ->ShowModal();
568 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
571 // Bring up the window for modifying a timezone.
573 long longSelected = -1;
574 int intSelectedData = 0;
576 if (lboBusinessTimezones->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTimezones,
584 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
585 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
586 &ContactEditorData.BusinessTZListAltID,
587 &ContactEditorData.BusinessTZListPID,
588 &ContactEditorData.BusinessTZListType,
589 &ContactEditorData.BusinessTZListTokens,
590 &ContactEditorData.BusinessTZListMediatype,
591 &ContactEditorData.BusinessTZListPref,
592 lboBusinessTimezones,
594 frameCETZ->SetEditorMode(TRUE, CE_WORK);
595 frameCETZ->ShowModal();
601 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
604 // Bring up the window for deleting a timezone.
606 long longSelected = -1;
607 int intSelectedData = 0;
609 if (lboBusinessTimezones->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTimezones,
617 lboBusinessTimezones->DeleteItem(longSelected);
619 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
620 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
621 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
622 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
626 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
629 // Bring up the window for adding a geoposition location.
631 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
632 frameCEGeo->SetEditorMode(FALSE, CE_WORK);
633 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
634 &ContactEditorData.BusinessGeographyListAltID,
635 &ContactEditorData.BusinessGeographyListPID,
636 &ContactEditorData.BusinessGeographyListType,
637 &ContactEditorData.BusinessGeographyListDataType,
638 &ContactEditorData.BusinessGeographyListTokens,
639 &ContactEditorData.BusinessGeographyListMediatype,
640 &ContactEditorData.BusinessGeographyListPref,
641 lboBusinessGeoposition,
643 frameCEGeo->ShowModal();
650 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
653 // Bring up the window for editing a geoposition location.
655 long longSelected = -1;
656 int intSelectedData = 0;
658 if (lboBusinessGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboBusinessGeoposition,
666 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
667 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
668 &ContactEditorData.BusinessGeographyListAltID,
669 &ContactEditorData.BusinessGeographyListPID,
670 &ContactEditorData.BusinessGeographyListType,
671 &ContactEditorData.BusinessGeographyListDataType,
672 &ContactEditorData.BusinessGeographyListTokens,
673 &ContactEditorData.BusinessGeographyListMediatype,
674 &ContactEditorData.BusinessGeographyListPref,
675 lboBusinessGeoposition,
677 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
678 frameCEGeo->ShowModal();
684 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
687 // Bring up the window for deleting a geoposition location.
689 long longSelected = -1;
690 int intSelectedData = 0;
692 if (lboBusinessGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboBusinessGeoposition,
700 lboBusinessGeoposition->DeleteItem(longSelected);
702 DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
703 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
704 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
705 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype,
706 &ContactEditorData.BusinessGeographyListPref);
710 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
713 // Bring up the window for adding a website.
715 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
716 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
717 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
718 &ContactEditorData.BusinessWebsiteListAltID,
719 &ContactEditorData.BusinessWebsiteListPID,
720 &ContactEditorData.BusinessWebsiteListType,
721 &ContactEditorData.BusinessWebsiteListTokens,
722 &ContactEditorData.BusinessWebsiteListMediatype,
723 &ContactEditorData.BusinessWebsiteListPref,
726 frameCEWeb->ShowModal();
733 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
736 // Bring up a window for editing a website.
738 long longSelected = -1;
739 int intSelectedData = 0;
741 if (lboBusinessWebsites->GetItemCount() == 0 || !GetSelectedItem(lboBusinessWebsites,
749 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
750 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
751 &ContactEditorData.BusinessWebsiteListAltID,
752 &ContactEditorData.BusinessWebsiteListPID,
753 &ContactEditorData.BusinessWebsiteListType,
754 &ContactEditorData.BusinessWebsiteListTokens,
755 &ContactEditorData.BusinessWebsiteListMediatype,
756 &ContactEditorData.BusinessWebsiteListPref,
759 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
760 frameCEWeb->ShowModal();
766 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
769 // Bring up the window for deleting a website.
771 long longSelected = -1;
772 int intSelectedData = 0;
774 if (lboBusinessWebsites->GetItemCount() == 0 || !GetSelectedItem(lboBusinessWebsites,
782 lboBusinessWebsites->DeleteItem(longSelected);
784 DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
785 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
786 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
787 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
791 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
794 // Bring up the window for adding a title.
796 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
797 frameCETitle->SetEditorMode(FALSE, CE_WORK);
798 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
799 &ContactEditorData.BusinessTitleListLanguage,
800 &ContactEditorData.BusinessTitleListAltID,
801 &ContactEditorData.BusinessTitleListPID,
802 &ContactEditorData.BusinessTitleListType,
803 &ContactEditorData.BusinessTitleListTokens,
804 &ContactEditorData.BusinessTitleListPref,
807 frameCETitle->ShowModal();
814 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
817 // Bring up the window for editing a title.
819 long longSelected = -1;
820 int intSelectedData = 0;
822 if (lboBusinessTitles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTitles,
830 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
831 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
832 &ContactEditorData.BusinessTitleListLanguage,
833 &ContactEditorData.BusinessTitleListAltID,
834 &ContactEditorData.BusinessTitleListPID,
835 &ContactEditorData.BusinessTitleListType,
836 &ContactEditorData.BusinessTitleListTokens,
837 &ContactEditorData.BusinessTitleListPref,
840 frameCETitle->SetEditorMode(TRUE, CE_WORK);
841 frameCETitle->ShowModal();
847 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
850 // Bring up the window to delete the title.
852 long longSelected = -1;
853 int intSelectedData = 0;
855 if (lboBusinessTitles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTitles,
863 lboBusinessTitles->DeleteItem(longSelected);
865 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
866 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
867 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
868 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
872 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
875 // Bring up the window to add a role.
877 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
878 frameCERole->SetEditorMode(FALSE, CE_WORK);
879 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
880 &ContactEditorData.BusinessRoleListLanguage,
881 &ContactEditorData.BusinessRoleListAltID,
882 &ContactEditorData.BusinessRoleListPID,
883 &ContactEditorData.BusinessRoleListType,
884 &ContactEditorData.BusinessRoleListTokens,
885 &ContactEditorData.BusinessRoleListPref,
888 frameCERole->ShowModal();
895 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
898 // Bring up the window for editing a role.
900 long longSelected = -1;
901 int intSelectedData = 0;
903 if (lboBusinessRoles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessRoles,
911 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
912 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
913 &ContactEditorData.BusinessRoleListLanguage,
914 &ContactEditorData.BusinessRoleListAltID,
915 &ContactEditorData.BusinessRoleListPID,
916 &ContactEditorData.BusinessRoleListType,
917 &ContactEditorData.BusinessRoleListTokens,
918 &ContactEditorData.BusinessRoleListPref,
921 frameCERole->SetEditorMode(TRUE, CE_WORK);
922 frameCERole->ShowModal();
928 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
931 // Bring up the window to delete a role.
933 long longSelected = -1;
934 int intSelectedData = 0;
936 if (lboBusinessRoles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessRoles,
944 lboBusinessRoles->DeleteItem(longSelected);
946 DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
947 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
948 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
949 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
953 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
956 // Bring up the window to add an organisation.
958 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
959 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
960 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
961 &ContactEditorData.BusinessOrganisationsListLanguage,
962 &ContactEditorData.BusinessOrganisationsListSortAs,
963 &ContactEditorData.BusinessOrganisationsListAltID,
964 &ContactEditorData.BusinessOrganisationsListPID,
965 &ContactEditorData.BusinessOrganisationsListType,
966 &ContactEditorData.BusinessOrganisationsListTokens,
967 &ContactEditorData.BusinessOrganisationsListPref,
968 lboBusinessOrganisations,
970 frameCEOrg->ShowModal();
977 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
980 // Bring up the window to edit an organisation.
982 long longSelected = -1;
983 int intSelectedData = 0;
985 if (lboBusinessOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboBusinessOrganisations,
993 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
994 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
995 &ContactEditorData.BusinessOrganisationsListLanguage,
996 &ContactEditorData.BusinessOrganisationsListSortAs,
997 &ContactEditorData.BusinessOrganisationsListAltID,
998 &ContactEditorData.BusinessOrganisationsListPID,
999 &ContactEditorData.BusinessOrganisationsListType,
1000 &ContactEditorData.BusinessOrganisationsListTokens,
1001 &ContactEditorData.BusinessOrganisationsListPref,
1002 lboBusinessOrganisations,
1004 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
1005 frameCEOrg->ShowModal();
1011 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
1014 // Bring up the window to delete a organisation.
1016 long longSelected = -1;
1017 int intSelectedData = 0;
1019 if (lboBusinessOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboBusinessOrganisations,
1027 lboBusinessOrganisations->DeleteItem(longSelected);
1029 DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
1030 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
1031 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
1032 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
1033 &ContactEditorData.BusinessOrganisationsListPref);
1037 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
1040 // Bring up the window to add a note.
1042 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1043 frameCENote->SetEditorMode(FALSE, CE_WORK);
1044 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1045 &ContactEditorData.BusinessNoteListLanguage,
1046 &ContactEditorData.BusinessNoteListAltID,
1047 &ContactEditorData.BusinessNoteListPID,
1048 &ContactEditorData.BusinessNoteListType,
1049 &ContactEditorData.BusinessNoteListTokens,
1050 &ContactEditorData.BusinessNoteListPref,
1053 frameCENote->ShowModal();
1060 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1063 // Bring up the window to edit a note.
1065 long longSelected = -1;
1066 int intSelectedData = 0;
1068 if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNotes,
1076 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1077 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1078 &ContactEditorData.BusinessNoteListLanguage,
1079 &ContactEditorData.BusinessNoteListAltID,
1080 &ContactEditorData.BusinessNoteListPID,
1081 &ContactEditorData.BusinessNoteListType,
1082 &ContactEditorData.BusinessNoteListTokens,
1083 &ContactEditorData.BusinessNoteListPref,
1086 frameCENote->SetEditorMode(TRUE, CE_WORK);
1087 frameCENote->ShowModal();
1093 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1096 // Bring up the window to delete a note.
1098 long longSelected = -1;
1099 int intSelectedData = 0;
1101 if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNotes,
1109 lboBusinessNotes->DeleteItem(longSelected);
1111 DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1112 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1113 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1114 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);