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.
43 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
44 frameCENickname->SetEditorMode(FALSE, CE_WORK);
45 intResult = GetLastInt(&ContactEditorData.BusinessNicknamesList);
46 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
47 &ContactEditorData.BusinessNicknamesListAltID,
48 &ContactEditorData.BusinessNicknamesListPID,
49 &ContactEditorData.BusinessNicknamesListType,
50 &ContactEditorData.BusinessNicknamesListLanguage,
51 &ContactEditorData.BusinessNicknamesListTokens,
52 &ContactEditorData.BusinessNicknamesListPref,
55 frameCENickname->ShowModal();
56 delete frameCENickname;
57 frameCENickname = NULL;
61 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
64 // Bring up the window for modifying a nickname.
66 long longSelected = -1;
67 int intSelectedData = 0;
69 if (!GetSelectedItem(lboBusinessNicknames,
77 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
78 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
79 &ContactEditorData.BusinessNicknamesListAltID,
80 &ContactEditorData.BusinessNicknamesListPID,
81 &ContactEditorData.BusinessNicknamesListType,
82 &ContactEditorData.BusinessNicknamesListLanguage,
83 &ContactEditorData.BusinessNicknamesListTokens,
84 &ContactEditorData.BusinessNicknamesListPref,
87 frameCENickname->SetEditorMode(TRUE, CE_WORK);
88 frameCENickname->ShowModal();
89 delete frameCENickname;
90 frameCENickname = NULL;
94 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
97 // Bring up the window to delete the nickname.
99 long longSelected = -1;
100 int intSelectedData = 0;
102 if (!GetSelectedItem(lboBusinessNicknames,
110 lboBusinessNicknames->DeleteItem(longSelected);
112 DeleteMapData(intSelectedData,
113 &ContactEditorData.BusinessNicknamesList,
114 &ContactEditorData.BusinessNicknamesListLanguage,
115 &ContactEditorData.BusinessNicknamesListAltID,
116 &ContactEditorData.BusinessNicknamesListPID,
117 &ContactEditorData.BusinessNicknamesListTokens,
118 &ContactEditorData.BusinessNicknamesListType,
119 &ContactEditorData.BusinessNicknamesListPref);
123 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
126 // Bring up the window for adding an address.
130 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
131 frameCEAddress->SetEditorMode(FALSE, CE_WORK);
132 intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
133 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
134 &ContactEditorData.BusinessAddressListTown,
135 &ContactEditorData.BusinessAddressListCounty,
136 &ContactEditorData.BusinessAddressListPostCode,
137 &ContactEditorData.BusinessAddressListCountry,
138 &ContactEditorData.BusinessAddressListLabel,
139 &ContactEditorData.BusinessAddressListLang,
140 &ContactEditorData.BusinessAddressListAltID,
141 &ContactEditorData.BusinessAddressListPID,
142 &ContactEditorData.BusinessAddressListTokens,
143 &ContactEditorData.BusinessAddressListGeo,
144 &ContactEditorData.BusinessAddressListTimezone,
145 &ContactEditorData.BusinessAddressListType,
146 &ContactEditorData.BusinessAddressListMediatype,
147 &ContactEditorData.BusinessAddressListPref,
148 lboBusinessAddresses,
150 frameCEAddress->ShowModal();
151 delete frameCEAddress;
152 frameCEAddress = NULL;
156 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
159 // Bring up a window for editing an address.
161 long longSelected = -1;
162 int intSelectedData = 0;
164 if (!GetSelectedItem(lboBusinessAddresses,
172 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
173 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
174 &ContactEditorData.BusinessAddressListTown,
175 &ContactEditorData.BusinessAddressListCounty,
176 &ContactEditorData.BusinessAddressListPostCode,
177 &ContactEditorData.BusinessAddressListCountry,
178 &ContactEditorData.BusinessAddressListLabel,
179 &ContactEditorData.BusinessAddressListLang,
180 &ContactEditorData.BusinessAddressListAltID,
181 &ContactEditorData.BusinessAddressListPID,
182 &ContactEditorData.BusinessAddressListTokens,
183 &ContactEditorData.BusinessAddressListGeo,
184 &ContactEditorData.BusinessAddressListTimezone,
185 &ContactEditorData.BusinessAddressListType,
186 &ContactEditorData.BusinessAddressListMediatype,
187 &ContactEditorData.BusinessAddressListPref,
188 lboBusinessAddresses,
190 frameCEAddress->SetEditorMode(TRUE, CE_WORK);
191 frameCEAddress->ShowModal();
192 delete frameCEAddress;
193 frameCEAddress = NULL;
197 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
200 // Bring up the window for deleting the address.
202 long longSelected = -1;
203 int intSelectedData = 0;
205 if (!GetSelectedItem(lboBusinessAddresses,
213 lboBusinessAddresses->DeleteItem(longSelected);
214 DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
215 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
216 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
217 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
218 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
219 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
220 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
221 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
222 &ContactEditorData.BusinessAddressListPref);
226 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
229 // Bring up the window for adding an email address.
233 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
234 frameCEEmail->SetEditorMode(FALSE, CE_WORK);
235 intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
236 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
237 &ContactEditorData.BusinessEmailListAltID,
238 &ContactEditorData.BusinessEmailListPID,
239 &ContactEditorData.BusinessEmailListType,
240 &ContactEditorData.BusinessEmailListTokens,
241 &ContactEditorData.BusinessEmailListPref,
244 frameCEEmail->ShowModal();
250 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
253 // Bring up the window for modifying the email address.
255 long longSelected = -1;
256 int intSelectedData = 0;
258 if (!GetSelectedItem(lboBusinessEmail,
266 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
267 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
268 &ContactEditorData.BusinessEmailListAltID,
269 &ContactEditorData.BusinessEmailListPID,
270 &ContactEditorData.BusinessEmailListType,
271 &ContactEditorData.BusinessEmailListTokens,
272 &ContactEditorData.BusinessEmailListPref,
275 frameCEEmail->SetEditorMode(TRUE, CE_WORK);
276 frameCEEmail->ShowModal();
282 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
285 // Bring up the window to delete the email address.
287 long longSelected = -1;
288 int intSelectedData = 0;
290 if (!GetSelectedItem(lboBusinessEmail,
298 lboBusinessEmail->DeleteItem(longSelected);
300 DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
301 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
302 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
303 &ContactEditorData.BusinessEmailListPref);
307 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
310 // Bring up the window for adding an IM address.
314 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
315 frameCEIM->SetEditorMode(FALSE, CE_WORK);
316 intResult = GetLastInt(&ContactEditorData.BusinessIMList);
317 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
318 &ContactEditorData.BusinessIMListAltID,
319 &ContactEditorData.BusinessIMListPID,
320 &ContactEditorData.BusinessIMListType,
321 &ContactEditorData.BusinessIMListTypeInfo,
322 &ContactEditorData.BusinessIMListTokens,
323 &ContactEditorData.BusinessIMListMediatype,
324 &ContactEditorData.BusinessIMListPref,
327 frameCEIM->ShowModal();
333 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
336 // Bring up the window for editing an IM address.
338 long longSelected = -1;
339 int intSelectedData = 0;
341 if (!GetSelectedItem(lboBusinessIM,
349 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
350 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
351 &ContactEditorData.BusinessIMListAltID,
352 &ContactEditorData.BusinessIMListPID,
353 &ContactEditorData.BusinessIMListType,
354 &ContactEditorData.BusinessIMListTypeInfo,
355 &ContactEditorData.BusinessIMListTokens,
356 &ContactEditorData.BusinessIMListMediatype,
357 &ContactEditorData.BusinessIMListPref,
360 frameCEIM->SetEditorMode(TRUE, CE_WORK);
361 frameCEIM->ShowModal();
367 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
370 // Bring up the window for deleting an IM address.
372 long longSelected = -1;
373 int intSelectedData = 0;
375 if (!GetSelectedItem(lboBusinessIM,
383 lboBusinessIM->DeleteItem(longSelected);
385 DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
386 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
387 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
388 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype,
389 &ContactEditorData.BusinessIMListPref);
393 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
396 // Bring up the window for adding a telephone number.
400 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
401 frameCETel->SetEditorMode(FALSE, CE_WORK);
402 intResult = GetLastInt(&ContactEditorData.BusinessTelephoneList);
403 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
404 &ContactEditorData.BusinessTelephoneListAltID,
405 &ContactEditorData.BusinessTelephoneListPID,
406 &ContactEditorData.BusinessTelephoneListType,
407 &ContactEditorData.BusinessTelephoneListTypeInfo,
408 &ContactEditorData.BusinessTelephoneListTokens,
409 &ContactEditorData.BusinessTelephoneListPref,
410 lboBusinessTelephone,
412 frameCETel->ShowModal();
418 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
421 // Bring up the address for editing a telephone number.
423 long longSelected = -1;
424 int intSelectedData = 0;
426 if (!GetSelectedItem(lboBusinessTelephone,
434 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
435 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
436 &ContactEditorData.BusinessTelephoneListAltID,
437 &ContactEditorData.BusinessTelephoneListPID,
438 &ContactEditorData.BusinessTelephoneListType,
439 &ContactEditorData.BusinessTelephoneListTypeInfo,
440 &ContactEditorData.BusinessTelephoneListTokens,
441 &ContactEditorData.BusinessTelephoneListPref,
442 lboBusinessTelephone,
444 frameCETel->SetEditorMode(TRUE, CE_WORK);
445 frameCETel->ShowModal();
451 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
454 // Bring up the window for deleting a telephone number.
456 long longSelected = -1;
457 int intSelectedData = 0;
459 if (!GetSelectedItem(lboBusinessTelephone,
467 lboBusinessTelephone->DeleteItem(longSelected);
469 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
470 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
471 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
472 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
476 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
479 // Bring up the window for adding a language.
483 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
484 frameCELang->SetEditorMode(FALSE, CE_WORK);
485 intResult = GetLastInt(&ContactEditorData.BusinessLanguageList);
486 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
487 &ContactEditorData.BusinessLanguageListAltID,
488 &ContactEditorData.BusinessLanguageListPID,
489 &ContactEditorData.BusinessLanguageListType,
490 &ContactEditorData.BusinessLanguageListTokens,
491 &ContactEditorData.BusinessLanguageListPref,
492 lboBusinessLanguages,
494 frameCELang->ShowModal();
500 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
503 // Bring up the window for editing a language.
505 long longSelected = -1;
506 int intSelectedData = 0;
508 if (!GetSelectedItem(lboBusinessLanguages,
516 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
517 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
518 &ContactEditorData.BusinessLanguageListAltID,
519 &ContactEditorData.BusinessLanguageListPID,
520 &ContactEditorData.BusinessLanguageListType,
521 &ContactEditorData.BusinessLanguageListTokens,
522 &ContactEditorData.BusinessLanguageListPref,
523 lboBusinessLanguages,
525 frameCELang->SetEditorMode(TRUE, CE_WORK);
526 frameCELang->ShowModal();
532 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
535 // Bring up the window for deleting a language.
537 long longSelected = -1;
538 int intSelectedData = 0;
540 if (!GetSelectedItem(lboBusinessLanguages,
548 lboBusinessLanguages->DeleteItem(longSelected);
550 DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
551 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
552 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
553 &ContactEditorData.BusinessLanguageListPref);
557 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
560 // Bring up the window for adding a timezone.
564 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
565 frameCETZ->SetEditorMode(FALSE, CE_WORK);
566 intResult = GetLastInt(&ContactEditorData.BusinessTZList);
567 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
568 &ContactEditorData.BusinessTZListAltID,
569 &ContactEditorData.BusinessTZListPID,
570 &ContactEditorData.BusinessTZListType,
571 &ContactEditorData.BusinessTZListTokens,
572 &ContactEditorData.BusinessTZListMediatype,
573 &ContactEditorData.BusinessTZListPref,
574 lboBusinessTimezones,
576 frameCETZ->ShowModal();
582 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
585 // Bring up the window for modifying a timezone.
587 long longSelected = -1;
588 int intSelectedData = 0;
590 if (!GetSelectedItem(lboBusinessTimezones,
598 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
599 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
600 &ContactEditorData.BusinessTZListAltID,
601 &ContactEditorData.BusinessTZListPID,
602 &ContactEditorData.BusinessTZListType,
603 &ContactEditorData.BusinessTZListTokens,
604 &ContactEditorData.BusinessTZListMediatype,
605 &ContactEditorData.BusinessTZListPref,
606 lboBusinessTimezones,
608 frameCETZ->SetEditorMode(TRUE, CE_WORK);
609 frameCETZ->ShowModal();
615 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
618 // Bring up the window for deleting a timezone.
620 long longSelected = -1;
621 int intSelectedData = 0;
623 if (!GetSelectedItem(lboBusinessTimezones,
631 lboBusinessTimezones->DeleteItem(longSelected);
633 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
634 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
635 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
636 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
640 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
643 // Bring up the window for adding a geoposition location.
647 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
648 frameCEGeo->SetEditorMode(FALSE, CE_WORK);
649 intResult = GetLastInt(&ContactEditorData.BusinessGeographyList);
650 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
651 &ContactEditorData.BusinessGeographyListAltID,
652 &ContactEditorData.BusinessGeographyListPID,
653 &ContactEditorData.BusinessGeographyListType,
654 &ContactEditorData.BusinessGeographyListDataType,
655 &ContactEditorData.BusinessGeographyListTokens,
656 &ContactEditorData.BusinessGeographyListMediatype,
657 &ContactEditorData.BusinessGeographyListPref,
658 lboBusinessGeoposition,
660 frameCEGeo->ShowModal();
666 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
669 // Bring up the window for editing a geoposition location.
671 long longSelected = -1;
672 int intSelectedData = 0;
674 if (!GetSelectedItem(lboBusinessGeoposition,
682 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
683 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
684 &ContactEditorData.BusinessGeographyListAltID,
685 &ContactEditorData.BusinessGeographyListPID,
686 &ContactEditorData.BusinessGeographyListType,
687 &ContactEditorData.BusinessGeographyListDataType,
688 &ContactEditorData.BusinessGeographyListTokens,
689 &ContactEditorData.BusinessGeographyListMediatype,
690 &ContactEditorData.BusinessGeographyListPref,
691 lboBusinessGeoposition,
693 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
694 frameCEGeo->ShowModal();
700 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
703 // Bring up the window for deleting a geoposition location.
705 long longSelected = -1;
706 int intSelectedData = 0;
708 if (!GetSelectedItem(lboBusinessGeoposition,
716 lboBusinessGeoposition->DeleteItem(longSelected);
718 DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
719 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
720 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
721 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype,
722 &ContactEditorData.BusinessGeographyListPref);
726 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
729 // Bring up the window for adding a website.
733 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
734 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
735 intResult = GetLastInt(&ContactEditorData.BusinessWebsiteList);
736 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
737 &ContactEditorData.BusinessWebsiteListAltID,
738 &ContactEditorData.BusinessWebsiteListPID,
739 &ContactEditorData.BusinessWebsiteListType,
740 &ContactEditorData.BusinessWebsiteListTokens,
741 &ContactEditorData.BusinessWebsiteListMediatype,
742 &ContactEditorData.BusinessWebsiteListPref,
745 frameCEWeb->ShowModal();
751 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
754 // Bring up a window for editing a website.
756 long longSelected = -1;
757 int intSelectedData = 0;
759 if (!GetSelectedItem(lboBusinessWebsites,
767 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
768 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
769 &ContactEditorData.BusinessWebsiteListAltID,
770 &ContactEditorData.BusinessWebsiteListPID,
771 &ContactEditorData.BusinessWebsiteListType,
772 &ContactEditorData.BusinessWebsiteListTokens,
773 &ContactEditorData.BusinessWebsiteListMediatype,
774 &ContactEditorData.BusinessWebsiteListPref,
777 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
778 frameCEWeb->ShowModal();
784 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
787 // Bring up the window for deleting a website.
789 long longSelected = -1;
790 int intSelectedData = 0;
792 if (!GetSelectedItem(lboBusinessWebsites,
800 lboBusinessWebsites->DeleteItem(longSelected);
802 DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
803 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
804 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
805 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
809 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
812 // Bring up the window for adding a title.
816 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
817 frameCETitle->SetEditorMode(FALSE, CE_WORK);
818 intResult = GetLastInt(&ContactEditorData.BusinessTitleList);
819 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
820 &ContactEditorData.BusinessTitleListLanguage,
821 &ContactEditorData.BusinessTitleListAltID,
822 &ContactEditorData.BusinessTitleListPID,
823 &ContactEditorData.BusinessTitleListType,
824 &ContactEditorData.BusinessTitleListTokens,
825 &ContactEditorData.BusinessTitleListPref,
828 frameCETitle->ShowModal();
834 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
837 // Bring up the window for editing a title.
839 long longSelected = -1;
840 int intSelectedData = 0;
842 if (!GetSelectedItem(lboBusinessTitles,
850 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
851 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
852 &ContactEditorData.BusinessTitleListLanguage,
853 &ContactEditorData.BusinessTitleListAltID,
854 &ContactEditorData.BusinessTitleListPID,
855 &ContactEditorData.BusinessTitleListType,
856 &ContactEditorData.BusinessTitleListTokens,
857 &ContactEditorData.BusinessTitleListPref,
860 frameCETitle->SetEditorMode(TRUE, CE_WORK);
861 frameCETitle->ShowModal();
867 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
870 // Bring up the window to delete the title.
872 long longSelected = -1;
873 int intSelectedData = 0;
875 if (!GetSelectedItem(lboBusinessTitles,
883 lboTitles->DeleteItem(longSelected);
885 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
886 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
887 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
888 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
892 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
895 // Bring up the window to add a role.
899 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
900 frameCERole->SetEditorMode(FALSE, CE_WORK);
901 intResult = GetLastInt(&ContactEditorData.BusinessRoleList);
902 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
903 &ContactEditorData.BusinessRoleListLanguage,
904 &ContactEditorData.BusinessRoleListAltID,
905 &ContactEditorData.BusinessRoleListPID,
906 &ContactEditorData.BusinessRoleListType,
907 &ContactEditorData.BusinessRoleListTokens,
908 &ContactEditorData.BusinessRoleListPref,
911 frameCERole->ShowModal();
917 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
920 // Bring up the window for editing a role.
922 long longSelected = -1;
923 int intSelectedData = 0;
925 if (!GetSelectedItem(lboBusinessRoles,
933 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
934 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
935 &ContactEditorData.BusinessRoleListLanguage,
936 &ContactEditorData.BusinessRoleListAltID,
937 &ContactEditorData.BusinessRoleListPID,
938 &ContactEditorData.BusinessRoleListType,
939 &ContactEditorData.BusinessRoleListTokens,
940 &ContactEditorData.BusinessRoleListPref,
943 frameCERole->SetEditorMode(TRUE, CE_WORK);
944 frameCERole->ShowModal();
950 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
953 // Bring up the window to delete a role.
955 long longSelected = -1;
956 int intSelectedData = 0;
958 if (!GetSelectedItem(lboBusinessRoles,
966 lboBusinessRoles->DeleteItem(longSelected);
968 DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
969 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
970 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
971 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
975 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
978 // Bring up the window to add an organisation.
982 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
983 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
984 intResult = GetLastInt(&ContactEditorData.BusinessOrganisationsList);
985 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
986 &ContactEditorData.BusinessOrganisationsListLanguage,
987 &ContactEditorData.BusinessOrganisationsListSortAs,
988 &ContactEditorData.BusinessOrganisationsListAltID,
989 &ContactEditorData.BusinessOrganisationsListPID,
990 &ContactEditorData.BusinessOrganisationsListType,
991 &ContactEditorData.BusinessOrganisationsListTokens,
992 &ContactEditorData.BusinessOrganisationsListPref,
993 lboBusinessOrganisations,
995 frameCEOrg->ShowModal();
1001 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
1004 // Bring up the window to edit an organisation.
1006 long longSelected = -1;
1007 int intSelectedData = 0;
1009 if (!GetSelectedItem(lboBusinessOrganisations,
1017 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1018 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
1019 &ContactEditorData.BusinessOrganisationsListLanguage,
1020 &ContactEditorData.BusinessOrganisationsListSortAs,
1021 &ContactEditorData.BusinessOrganisationsListAltID,
1022 &ContactEditorData.BusinessOrganisationsListPID,
1023 &ContactEditorData.BusinessOrganisationsListType,
1024 &ContactEditorData.BusinessOrganisationsListTokens,
1025 &ContactEditorData.BusinessOrganisationsListPref,
1026 lboBusinessOrganisations,
1028 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
1029 frameCEOrg->ShowModal();
1035 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
1038 // Bring up the window to delete a organisation.
1040 long longSelected = -1;
1041 int intSelectedData = 0;
1043 if (!GetSelectedItem(lboBusinessOrganisations,
1051 lboBusinessOrganisations->DeleteItem(longSelected);
1053 DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
1054 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
1055 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
1056 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
1057 &ContactEditorData.BusinessOrganisationsListPref);
1061 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
1064 // Bring up the window to add a note.
1068 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1069 frameCENote->SetEditorMode(FALSE, CE_WORK);
1070 intResult = GetLastInt(&ContactEditorData.BusinessNoteList);
1071 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1072 &ContactEditorData.BusinessNoteListLanguage,
1073 &ContactEditorData.BusinessNoteListAltID,
1074 &ContactEditorData.BusinessNoteListPID,
1075 &ContactEditorData.BusinessNoteListType,
1076 &ContactEditorData.BusinessNoteListTokens,
1077 &ContactEditorData.BusinessNoteListPref,
1080 frameCENote->ShowModal();
1086 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1089 // Bring up the window to edit a note.
1091 long longSelected = -1;
1092 int intSelectedData = 0;
1094 if (!GetSelectedItem(lboBusinessNotes,
1102 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1103 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1104 &ContactEditorData.BusinessNoteListLanguage,
1105 &ContactEditorData.BusinessNoteListAltID,
1106 &ContactEditorData.BusinessNoteListPID,
1107 &ContactEditorData.BusinessNoteListType,
1108 &ContactEditorData.BusinessNoteListTokens,
1109 &ContactEditorData.BusinessNoteListPref,
1112 frameCENote->SetEditorMode(TRUE, CE_WORK);
1113 frameCENote->ShowModal();
1119 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1122 // Bring up the window to delete a note.
1124 long longSelected = -1;
1125 int intSelectedData = 0;
1127 if (!GetSelectedItem(lboBusinessNotes,
1135 lboBusinessNotes->DeleteItem(longSelected);
1137 DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1138 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1139 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1140 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);