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;
58 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
61 // Bring up the window for modifying a nickname.
63 long longSelected = -1;
64 int intSelectedData = 0;
66 if (!GetSelectedItem(lboBusinessNicknames,
74 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
75 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
76 &ContactEditorData.BusinessNicknamesListAltID,
77 &ContactEditorData.BusinessNicknamesListPID,
78 &ContactEditorData.BusinessNicknamesListType,
79 &ContactEditorData.BusinessNicknamesListLanguage,
80 &ContactEditorData.BusinessNicknamesListTokens,
81 &ContactEditorData.BusinessNicknamesListPref,
84 frameCENickname->SetEditorMode(TRUE, CE_WORK);
85 frameCENickname->ShowModal();
86 delete frameCENickname;
87 frameCENickname = NULL;
91 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
94 // Bring up the window to delete the nickname.
96 long longSelected = -1;
97 int intSelectedData = 0;
99 if (!GetSelectedItem(lboBusinessNicknames,
107 lboBusinessNicknames->DeleteItem(longSelected);
109 DeleteMapData(intSelectedData,
110 &ContactEditorData.BusinessNicknamesList,
111 &ContactEditorData.BusinessNicknamesListLanguage,
112 &ContactEditorData.BusinessNicknamesListAltID,
113 &ContactEditorData.BusinessNicknamesListPID,
114 &ContactEditorData.BusinessNicknamesListTokens,
115 &ContactEditorData.BusinessNicknamesListType,
116 &ContactEditorData.BusinessNicknamesListPref);
120 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
123 // Bring up the window for adding an address.
125 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
126 frameCEAddress->SetEditorMode(FALSE, CE_WORK);
127 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
128 &ContactEditorData.BusinessAddressListTown,
129 &ContactEditorData.BusinessAddressListCounty,
130 &ContactEditorData.BusinessAddressListPostCode,
131 &ContactEditorData.BusinessAddressListCountry,
132 &ContactEditorData.BusinessAddressListLabel,
133 &ContactEditorData.BusinessAddressListLang,
134 &ContactEditorData.BusinessAddressListAltID,
135 &ContactEditorData.BusinessAddressListPID,
136 &ContactEditorData.BusinessAddressListTokens,
137 &ContactEditorData.BusinessAddressListGeo,
138 &ContactEditorData.BusinessAddressListTimezone,
139 &ContactEditorData.BusinessAddressListType,
140 &ContactEditorData.BusinessAddressListMediatype,
141 &ContactEditorData.BusinessAddressListPref,
142 lboBusinessAddresses,
144 frameCEAddress->ShowModal();
145 delete frameCEAddress;
146 frameCEAddress = NULL;
150 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
153 // Bring up a window for editing an address.
155 long longSelected = -1;
156 int intSelectedData = 0;
158 if (!GetSelectedItem(lboBusinessAddresses,
166 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
167 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
168 &ContactEditorData.BusinessAddressListTown,
169 &ContactEditorData.BusinessAddressListCounty,
170 &ContactEditorData.BusinessAddressListPostCode,
171 &ContactEditorData.BusinessAddressListCountry,
172 &ContactEditorData.BusinessAddressListLabel,
173 &ContactEditorData.BusinessAddressListLang,
174 &ContactEditorData.BusinessAddressListAltID,
175 &ContactEditorData.BusinessAddressListPID,
176 &ContactEditorData.BusinessAddressListTokens,
177 &ContactEditorData.BusinessAddressListGeo,
178 &ContactEditorData.BusinessAddressListTimezone,
179 &ContactEditorData.BusinessAddressListType,
180 &ContactEditorData.BusinessAddressListMediatype,
181 &ContactEditorData.BusinessAddressListPref,
182 lboBusinessAddresses,
184 frameCEAddress->SetEditorMode(TRUE, CE_WORK);
185 frameCEAddress->ShowModal();
186 delete frameCEAddress;
187 frameCEAddress = NULL;
191 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
194 // Bring up the window for deleting the address.
196 long longSelected = -1;
197 int intSelectedData = 0;
199 if (!GetSelectedItem(lboBusinessAddresses,
207 lboBusinessAddresses->DeleteItem(longSelected);
208 DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
209 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
210 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
211 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
212 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
213 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
214 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
215 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
216 &ContactEditorData.BusinessAddressListPref);
220 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
223 // Bring up the window for adding an email address.
225 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
226 frameCEEmail->SetEditorMode(FALSE, CE_WORK);
227 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
228 &ContactEditorData.BusinessEmailListAltID,
229 &ContactEditorData.BusinessEmailListPID,
230 &ContactEditorData.BusinessEmailListType,
231 &ContactEditorData.BusinessEmailListTokens,
232 &ContactEditorData.BusinessEmailListPref,
235 frameCEEmail->ShowModal();
241 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
244 // Bring up the window for modifying the email address.
246 long longSelected = -1;
247 int intSelectedData = 0;
249 if (!GetSelectedItem(lboBusinessEmail,
257 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
258 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
259 &ContactEditorData.BusinessEmailListAltID,
260 &ContactEditorData.BusinessEmailListPID,
261 &ContactEditorData.BusinessEmailListType,
262 &ContactEditorData.BusinessEmailListTokens,
263 &ContactEditorData.BusinessEmailListPref,
266 frameCEEmail->SetEditorMode(TRUE, CE_WORK);
267 frameCEEmail->ShowModal();
273 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
276 // Bring up the window to delete the email address.
278 long longSelected = -1;
279 int intSelectedData = 0;
281 if (!GetSelectedItem(lboBusinessEmail,
289 lboBusinessEmail->DeleteItem(longSelected);
291 DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
292 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
293 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
294 &ContactEditorData.BusinessEmailListPref);
298 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
301 // Bring up the window for adding an IM address.
303 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
304 frameCEIM->SetEditorMode(FALSE, CE_WORK);
305 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
306 &ContactEditorData.BusinessIMListAltID,
307 &ContactEditorData.BusinessIMListPID,
308 &ContactEditorData.BusinessIMListType,
309 &ContactEditorData.BusinessIMListTypeInfo,
310 &ContactEditorData.BusinessIMListTokens,
311 &ContactEditorData.BusinessIMListMediatype,
312 &ContactEditorData.BusinessIMListPref,
315 frameCEIM->ShowModal();
321 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
324 // Bring up the window for editing an IM address.
326 long longSelected = -1;
327 int intSelectedData = 0;
329 if (!GetSelectedItem(lboBusinessIM,
337 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
338 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
339 &ContactEditorData.BusinessIMListAltID,
340 &ContactEditorData.BusinessIMListPID,
341 &ContactEditorData.BusinessIMListType,
342 &ContactEditorData.BusinessIMListTypeInfo,
343 &ContactEditorData.BusinessIMListTokens,
344 &ContactEditorData.BusinessIMListMediatype,
345 &ContactEditorData.BusinessIMListPref,
348 frameCEIM->SetEditorMode(TRUE, CE_WORK);
349 frameCEIM->ShowModal();
355 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
358 // Bring up the window for deleting an IM address.
360 long longSelected = -1;
361 int intSelectedData = 0;
363 if (!GetSelectedItem(lboBusinessIM,
371 lboBusinessIM->DeleteItem(longSelected);
373 DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
374 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
375 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
376 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype,
377 &ContactEditorData.BusinessIMListPref);
381 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
384 // Bring up the window for adding a telephone number.
386 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
387 frameCETel->SetEditorMode(FALSE, CE_WORK);
388 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
389 &ContactEditorData.BusinessTelephoneListAltID,
390 &ContactEditorData.BusinessTelephoneListPID,
391 &ContactEditorData.BusinessTelephoneListType,
392 &ContactEditorData.BusinessTelephoneListTypeInfo,
393 &ContactEditorData.BusinessTelephoneListTokens,
394 &ContactEditorData.BusinessTelephoneListPref,
395 lboBusinessTelephone,
397 frameCETel->ShowModal();
403 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
406 // Bring up the address for editing a telephone number.
408 long longSelected = -1;
409 int intSelectedData = 0;
411 if (!GetSelectedItem(lboBusinessTelephone,
419 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
420 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
421 &ContactEditorData.BusinessTelephoneListAltID,
422 &ContactEditorData.BusinessTelephoneListPID,
423 &ContactEditorData.BusinessTelephoneListType,
424 &ContactEditorData.BusinessTelephoneListTypeInfo,
425 &ContactEditorData.BusinessTelephoneListTokens,
426 &ContactEditorData.BusinessTelephoneListPref,
427 lboBusinessTelephone,
429 frameCETel->SetEditorMode(TRUE, CE_WORK);
430 frameCETel->ShowModal();
436 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
439 // Bring up the window for deleting a telephone number.
441 long longSelected = -1;
442 int intSelectedData = 0;
444 if (!GetSelectedItem(lboBusinessTelephone,
452 lboBusinessTelephone->DeleteItem(longSelected);
454 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
455 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
456 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
457 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
461 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
464 // Bring up the window for adding a language.
466 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
467 frameCELang->SetEditorMode(FALSE, CE_WORK);
468 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
469 &ContactEditorData.BusinessLanguageListAltID,
470 &ContactEditorData.BusinessLanguageListPID,
471 &ContactEditorData.BusinessLanguageListType,
472 &ContactEditorData.BusinessLanguageListTokens,
473 &ContactEditorData.BusinessLanguageListPref,
474 lboBusinessLanguages,
476 frameCELang->ShowModal();
482 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
485 // Bring up the window for editing a language.
487 long longSelected = -1;
488 int intSelectedData = 0;
490 if (!GetSelectedItem(lboBusinessLanguages,
498 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
499 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
500 &ContactEditorData.BusinessLanguageListAltID,
501 &ContactEditorData.BusinessLanguageListPID,
502 &ContactEditorData.BusinessLanguageListType,
503 &ContactEditorData.BusinessLanguageListTokens,
504 &ContactEditorData.BusinessLanguageListPref,
505 lboBusinessLanguages,
507 frameCELang->SetEditorMode(TRUE, CE_WORK);
508 frameCELang->ShowModal();
514 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
517 // Bring up the window for deleting a language.
519 long longSelected = -1;
520 int intSelectedData = 0;
522 if (!GetSelectedItem(lboBusinessLanguages,
530 lboBusinessLanguages->DeleteItem(longSelected);
532 DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
533 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
534 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
535 &ContactEditorData.BusinessLanguageListPref);
539 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
542 // Bring up the window for adding a timezone.
544 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
545 frameCETZ->SetEditorMode(FALSE, CE_WORK);
546 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
547 &ContactEditorData.BusinessTZListAltID,
548 &ContactEditorData.BusinessTZListPID,
549 &ContactEditorData.BusinessTZListType,
550 &ContactEditorData.BusinessTZListTokens,
551 &ContactEditorData.BusinessTZListMediatype,
552 &ContactEditorData.BusinessTZListPref,
553 lboBusinessTimezones,
555 frameCETZ->ShowModal();
561 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
564 // Bring up the window for modifying a timezone.
566 long longSelected = -1;
567 int intSelectedData = 0;
569 if (!GetSelectedItem(lboBusinessTimezones,
577 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
578 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
579 &ContactEditorData.BusinessTZListAltID,
580 &ContactEditorData.BusinessTZListPID,
581 &ContactEditorData.BusinessTZListType,
582 &ContactEditorData.BusinessTZListTokens,
583 &ContactEditorData.BusinessTZListMediatype,
584 &ContactEditorData.BusinessTZListPref,
585 lboBusinessTimezones,
587 frameCETZ->SetEditorMode(TRUE, CE_WORK);
588 frameCETZ->ShowModal();
594 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
597 // Bring up the window for deleting a timezone.
599 long longSelected = -1;
600 int intSelectedData = 0;
602 if (!GetSelectedItem(lboBusinessTimezones,
610 lboBusinessTimezones->DeleteItem(longSelected);
612 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
613 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
614 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
615 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
619 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
622 // Bring up the window for adding a geoposition location.
624 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
625 frameCEGeo->SetEditorMode(FALSE, CE_WORK);
626 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
627 &ContactEditorData.BusinessGeographyListAltID,
628 &ContactEditorData.BusinessGeographyListPID,
629 &ContactEditorData.BusinessGeographyListType,
630 &ContactEditorData.BusinessGeographyListDataType,
631 &ContactEditorData.BusinessGeographyListTokens,
632 &ContactEditorData.BusinessGeographyListMediatype,
633 &ContactEditorData.BusinessGeographyListPref,
634 lboBusinessGeoposition,
636 frameCEGeo->ShowModal();
642 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
645 // Bring up the window for editing a geoposition location.
647 long longSelected = -1;
648 int intSelectedData = 0;
650 if (!GetSelectedItem(lboBusinessGeoposition,
658 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
659 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
660 &ContactEditorData.BusinessGeographyListAltID,
661 &ContactEditorData.BusinessGeographyListPID,
662 &ContactEditorData.BusinessGeographyListType,
663 &ContactEditorData.BusinessGeographyListDataType,
664 &ContactEditorData.BusinessGeographyListTokens,
665 &ContactEditorData.BusinessGeographyListMediatype,
666 &ContactEditorData.BusinessGeographyListPref,
667 lboBusinessGeoposition,
669 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
670 frameCEGeo->ShowModal();
676 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
679 // Bring up the window for deleting a geoposition location.
681 long longSelected = -1;
682 int intSelectedData = 0;
684 if (!GetSelectedItem(lboBusinessGeoposition,
692 lboBusinessGeoposition->DeleteItem(longSelected);
694 DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
695 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
696 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
697 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype,
698 &ContactEditorData.BusinessGeographyListPref);
702 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
705 // Bring up the window for adding a website.
707 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
708 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
709 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
710 &ContactEditorData.BusinessWebsiteListAltID,
711 &ContactEditorData.BusinessWebsiteListPID,
712 &ContactEditorData.BusinessWebsiteListType,
713 &ContactEditorData.BusinessWebsiteListTokens,
714 &ContactEditorData.BusinessWebsiteListMediatype,
715 &ContactEditorData.BusinessWebsiteListPref,
718 frameCEWeb->ShowModal();
724 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
727 // Bring up a window for editing a website.
729 long longSelected = -1;
730 int intSelectedData = 0;
732 if (!GetSelectedItem(lboBusinessWebsites,
740 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
741 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
742 &ContactEditorData.BusinessWebsiteListAltID,
743 &ContactEditorData.BusinessWebsiteListPID,
744 &ContactEditorData.BusinessWebsiteListType,
745 &ContactEditorData.BusinessWebsiteListTokens,
746 &ContactEditorData.BusinessWebsiteListMediatype,
747 &ContactEditorData.BusinessWebsiteListPref,
750 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
751 frameCEWeb->ShowModal();
757 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
760 // Bring up the window for deleting a website.
762 long longSelected = -1;
763 int intSelectedData = 0;
765 if (!GetSelectedItem(lboBusinessWebsites,
773 lboBusinessWebsites->DeleteItem(longSelected);
775 DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
776 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
777 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
778 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
782 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
785 // Bring up the window for adding a title.
787 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
788 frameCETitle->SetEditorMode(FALSE, CE_WORK);
789 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
790 &ContactEditorData.BusinessTitleListLanguage,
791 &ContactEditorData.BusinessTitleListAltID,
792 &ContactEditorData.BusinessTitleListPID,
793 &ContactEditorData.BusinessTitleListType,
794 &ContactEditorData.BusinessTitleListTokens,
795 &ContactEditorData.BusinessTitleListPref,
798 frameCETitle->ShowModal();
804 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
807 // Bring up the window for editing a title.
809 long longSelected = -1;
810 int intSelectedData = 0;
812 if (!GetSelectedItem(lboBusinessTitles,
820 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
821 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
822 &ContactEditorData.BusinessTitleListLanguage,
823 &ContactEditorData.BusinessTitleListAltID,
824 &ContactEditorData.BusinessTitleListPID,
825 &ContactEditorData.BusinessTitleListType,
826 &ContactEditorData.BusinessTitleListTokens,
827 &ContactEditorData.BusinessTitleListPref,
830 frameCETitle->SetEditorMode(TRUE, CE_WORK);
831 frameCETitle->ShowModal();
837 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
840 // Bring up the window to delete the title.
842 long longSelected = -1;
843 int intSelectedData = 0;
845 if (!GetSelectedItem(lboBusinessTitles,
853 lboTitles->DeleteItem(longSelected);
855 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
856 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
857 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
858 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
862 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
865 // Bring up the window to add a role.
867 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
868 frameCERole->SetEditorMode(FALSE, CE_WORK);
869 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
870 &ContactEditorData.BusinessRoleListLanguage,
871 &ContactEditorData.BusinessRoleListAltID,
872 &ContactEditorData.BusinessRoleListPID,
873 &ContactEditorData.BusinessRoleListType,
874 &ContactEditorData.BusinessRoleListTokens,
875 &ContactEditorData.BusinessRoleListPref,
878 frameCERole->ShowModal();
884 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
887 // Bring up the window for editing a role.
889 long longSelected = -1;
890 int intSelectedData = 0;
892 if (!GetSelectedItem(lboBusinessRoles,
900 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
901 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
902 &ContactEditorData.BusinessRoleListLanguage,
903 &ContactEditorData.BusinessRoleListAltID,
904 &ContactEditorData.BusinessRoleListPID,
905 &ContactEditorData.BusinessRoleListType,
906 &ContactEditorData.BusinessRoleListTokens,
907 &ContactEditorData.BusinessRoleListPref,
910 frameCERole->SetEditorMode(TRUE, CE_WORK);
911 frameCERole->ShowModal();
917 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
920 // Bring up the window to delete a role.
922 long longSelected = -1;
923 int intSelectedData = 0;
925 if (!GetSelectedItem(lboBusinessRoles,
933 lboBusinessRoles->DeleteItem(longSelected);
935 DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
936 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
937 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
938 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
942 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
945 // Bring up the window to add an organisation.
947 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
948 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
949 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
950 &ContactEditorData.BusinessOrganisationsListLanguage,
951 &ContactEditorData.BusinessOrganisationsListSortAs,
952 &ContactEditorData.BusinessOrganisationsListAltID,
953 &ContactEditorData.BusinessOrganisationsListPID,
954 &ContactEditorData.BusinessOrganisationsListType,
955 &ContactEditorData.BusinessOrganisationsListTokens,
956 &ContactEditorData.BusinessOrganisationsListPref,
957 lboBusinessOrganisations,
959 frameCEOrg->ShowModal();
965 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
968 // Bring up the window to edit an organisation.
970 long longSelected = -1;
971 int intSelectedData = 0;
973 if (!GetSelectedItem(lboBusinessOrganisations,
981 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
982 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
983 &ContactEditorData.BusinessOrganisationsListLanguage,
984 &ContactEditorData.BusinessOrganisationsListSortAs,
985 &ContactEditorData.BusinessOrganisationsListAltID,
986 &ContactEditorData.BusinessOrganisationsListPID,
987 &ContactEditorData.BusinessOrganisationsListType,
988 &ContactEditorData.BusinessOrganisationsListTokens,
989 &ContactEditorData.BusinessOrganisationsListPref,
990 lboBusinessOrganisations,
992 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
993 frameCEOrg->ShowModal();
999 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
1002 // Bring up the window to delete a organisation.
1004 long longSelected = -1;
1005 int intSelectedData = 0;
1007 if (!GetSelectedItem(lboBusinessOrganisations,
1015 lboBusinessOrganisations->DeleteItem(longSelected);
1017 DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
1018 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
1019 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
1020 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
1021 &ContactEditorData.BusinessOrganisationsListPref);
1025 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
1028 // Bring up the window to add a note.
1030 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1031 frameCENote->SetEditorMode(FALSE, CE_WORK);
1032 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1033 &ContactEditorData.BusinessNoteListLanguage,
1034 &ContactEditorData.BusinessNoteListAltID,
1035 &ContactEditorData.BusinessNoteListPID,
1036 &ContactEditorData.BusinessNoteListType,
1037 &ContactEditorData.BusinessNoteListTokens,
1038 &ContactEditorData.BusinessNoteListPref,
1041 frameCENote->ShowModal();
1047 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1050 // Bring up the window to edit a note.
1052 long longSelected = -1;
1053 int intSelectedData = 0;
1055 if (!GetSelectedItem(lboBusinessNotes,
1063 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1064 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1065 &ContactEditorData.BusinessNoteListLanguage,
1066 &ContactEditorData.BusinessNoteListAltID,
1067 &ContactEditorData.BusinessNoteListPID,
1068 &ContactEditorData.BusinessNoteListType,
1069 &ContactEditorData.BusinessNoteListTokens,
1070 &ContactEditorData.BusinessNoteListPref,
1073 frameCENote->SetEditorMode(TRUE, CE_WORK);
1074 frameCENote->ShowModal();
1080 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1083 // Bring up the window to delete a note.
1085 long longSelected = -1;
1086 int intSelectedData = 0;
1088 if (!GetSelectedItem(lboBusinessNotes,
1096 lboBusinessNotes->DeleteItem(longSelected);
1098 DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1099 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1100 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1101 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);