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 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
40 frameCENickname->SetEditorMode(FALSE, CE_WORK);
41 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
42 &ContactEditorData.BusinessNicknamesListAltID,
43 &ContactEditorData.BusinessNicknamesListPID,
44 &ContactEditorData.BusinessNicknamesListType,
45 &ContactEditorData.BusinessNicknamesListLanguage,
46 &ContactEditorData.BusinessNicknamesListTokens,
47 &ContactEditorData.BusinessNicknamesListPref,
50 frameCENickname->ShowModal();
51 delete frameCENickname;
52 frameCENickname = NULL;
55 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
57 long longSelected = -1;
58 int intSelectedData = 0;
60 if (!GetSelectedItem(lboBusinessNicknames,
66 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
67 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
68 &ContactEditorData.BusinessNicknamesListAltID,
69 &ContactEditorData.BusinessNicknamesListPID,
70 &ContactEditorData.BusinessNicknamesListType,
71 &ContactEditorData.BusinessNicknamesListLanguage,
72 &ContactEditorData.BusinessNicknamesListTokens,
73 &ContactEditorData.BusinessNicknamesListPref,
76 frameCENickname->SetEditorMode(TRUE, CE_WORK);
77 frameCENickname->ShowModal();
78 delete frameCENickname;
79 frameCENickname = NULL;
82 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
84 long longSelected = -1;
85 int intSelectedData = 0;
87 if (!GetSelectedItem(lboBusinessNicknames,
93 lboBusinessNicknames->DeleteItem(longSelected);
95 DeleteMapData(intSelectedData,
96 &ContactEditorData.BusinessNicknamesList,
97 &ContactEditorData.BusinessNicknamesListLanguage,
98 &ContactEditorData.BusinessNicknamesListAltID,
99 &ContactEditorData.BusinessNicknamesListPID,
100 &ContactEditorData.BusinessNicknamesListTokens,
101 &ContactEditorData.BusinessNicknamesListType,
102 &ContactEditorData.BusinessNicknamesListPref);
105 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
108 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
109 frameCEAddress->SetEditorMode(FALSE, CE_WORK);
110 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
111 &ContactEditorData.BusinessAddressListTown,
112 &ContactEditorData.BusinessAddressListCounty,
113 &ContactEditorData.BusinessAddressListPostCode,
114 &ContactEditorData.BusinessAddressListCountry,
115 &ContactEditorData.BusinessAddressListLabel,
116 &ContactEditorData.BusinessAddressListLang,
117 &ContactEditorData.BusinessAddressListAltID,
118 &ContactEditorData.BusinessAddressListPID,
119 &ContactEditorData.BusinessAddressListTokens,
120 &ContactEditorData.BusinessAddressListGeo,
121 &ContactEditorData.BusinessAddressListTimezone,
122 &ContactEditorData.BusinessAddressListType,
123 &ContactEditorData.BusinessAddressListMediatype,
124 &ContactEditorData.BusinessAddressListPref,
125 lboBusinessAddresses,
127 frameCEAddress->ShowModal();
128 delete frameCEAddress;
129 frameCEAddress = NULL;
132 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
134 long longSelected = -1;
135 int intSelectedData = 0;
137 if (!GetSelectedItem(lboBusinessAddresses,
143 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
144 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
145 &ContactEditorData.BusinessAddressListTown,
146 &ContactEditorData.BusinessAddressListCounty,
147 &ContactEditorData.BusinessAddressListPostCode,
148 &ContactEditorData.BusinessAddressListCountry,
149 &ContactEditorData.BusinessAddressListLabel,
150 &ContactEditorData.BusinessAddressListLang,
151 &ContactEditorData.BusinessAddressListAltID,
152 &ContactEditorData.BusinessAddressListPID,
153 &ContactEditorData.BusinessAddressListTokens,
154 &ContactEditorData.BusinessAddressListGeo,
155 &ContactEditorData.BusinessAddressListTimezone,
156 &ContactEditorData.BusinessAddressListType,
157 &ContactEditorData.BusinessAddressListMediatype,
158 &ContactEditorData.BusinessAddressListPref,
159 lboBusinessAddresses,
161 frameCEAddress->SetEditorMode(TRUE, CE_WORK);
162 frameCEAddress->ShowModal();
163 delete frameCEAddress;
164 frameCEAddress = NULL;
167 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
169 long longSelected = -1;
170 int intSelectedData = 0;
172 if (!GetSelectedItem(lboBusinessAddresses,
178 lboBusinessAddresses->DeleteItem(longSelected);
179 DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
180 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
181 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
182 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
183 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
184 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
185 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
186 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
187 &ContactEditorData.BusinessAddressListPref);
191 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
194 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
195 frameCEEmail->SetEditorMode(FALSE, CE_WORK);
196 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
197 &ContactEditorData.BusinessEmailListAltID,
198 &ContactEditorData.BusinessEmailListPID,
199 &ContactEditorData.BusinessEmailListType,
200 &ContactEditorData.BusinessEmailListTokens,
201 &ContactEditorData.BusinessEmailListPref,
204 frameCEEmail->ShowModal();
209 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
211 long longSelected = -1;
212 int intSelectedData = 0;
214 if (!GetSelectedItem(lboBusinessEmail,
220 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
221 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
222 &ContactEditorData.BusinessEmailListAltID,
223 &ContactEditorData.BusinessEmailListPID,
224 &ContactEditorData.BusinessEmailListType,
225 &ContactEditorData.BusinessEmailListTokens,
226 &ContactEditorData.BusinessEmailListPref,
229 frameCEEmail->SetEditorMode(TRUE, CE_WORK);
230 frameCEEmail->ShowModal();
235 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
237 long longSelected = -1;
238 int intSelectedData = 0;
240 if (!GetSelectedItem(lboBusinessEmail,
246 lboBusinessEmail->DeleteItem(longSelected);
248 DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
249 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
250 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
251 &ContactEditorData.BusinessEmailListPref);
255 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
258 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
259 frameCEIM->SetEditorMode(FALSE, CE_WORK);
260 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
261 &ContactEditorData.BusinessIMListAltID,
262 &ContactEditorData.BusinessIMListPID,
263 &ContactEditorData.BusinessIMListType,
264 &ContactEditorData.BusinessIMListTypeInfo,
265 &ContactEditorData.BusinessIMListTokens,
266 &ContactEditorData.BusinessIMListMediatype,
267 &ContactEditorData.BusinessIMListPref,
270 frameCEIM->ShowModal();
275 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
277 long longSelected = -1;
278 int intSelectedData = 0;
280 if (!GetSelectedItem(lboBusinessIM,
286 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
287 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
288 &ContactEditorData.BusinessIMListAltID,
289 &ContactEditorData.BusinessIMListPID,
290 &ContactEditorData.BusinessIMListType,
291 &ContactEditorData.BusinessIMListTypeInfo,
292 &ContactEditorData.BusinessIMListTokens,
293 &ContactEditorData.BusinessIMListMediatype,
294 &ContactEditorData.BusinessIMListPref,
297 frameCEIM->SetEditorMode(TRUE, CE_WORK);
298 frameCEIM->ShowModal();
303 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
305 long longSelected = -1;
306 int intSelectedData = 0;
308 if (!GetSelectedItem(lboBusinessIM,
314 lboBusinessIM->DeleteItem(longSelected);
316 DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
317 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
318 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
319 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype,
320 &ContactEditorData.BusinessIMListPref);
324 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
327 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
328 frameCETel->SetEditorMode(FALSE, CE_WORK);
329 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
330 &ContactEditorData.BusinessTelephoneListAltID,
331 &ContactEditorData.BusinessTelephoneListPID,
332 &ContactEditorData.BusinessTelephoneListType,
333 &ContactEditorData.BusinessTelephoneListTypeInfo,
334 &ContactEditorData.BusinessTelephoneListTokens,
335 &ContactEditorData.BusinessTelephoneListPref,
336 lboBusinessTelephone,
338 frameCETel->ShowModal();
343 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
345 long longSelected = -1;
346 int intSelectedData = 0;
348 if (!GetSelectedItem(lboBusinessTelephone,
354 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
355 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
356 &ContactEditorData.BusinessTelephoneListAltID,
357 &ContactEditorData.BusinessTelephoneListPID,
358 &ContactEditorData.BusinessTelephoneListType,
359 &ContactEditorData.BusinessTelephoneListTypeInfo,
360 &ContactEditorData.BusinessTelephoneListTokens,
361 &ContactEditorData.BusinessTelephoneListPref,
362 lboBusinessTelephone,
364 frameCETel->SetEditorMode(TRUE, CE_WORK);
365 frameCETel->ShowModal();
370 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
372 long longSelected = -1;
373 int intSelectedData = 0;
375 if (!GetSelectedItem(lboBusinessTelephone,
381 lboBusinessTelephone->DeleteItem(longSelected);
383 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
384 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
385 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
386 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
390 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
393 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
394 frameCELang->SetEditorMode(FALSE, CE_WORK);
395 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
396 &ContactEditorData.BusinessLanguageListAltID,
397 &ContactEditorData.BusinessLanguageListPID,
398 &ContactEditorData.BusinessLanguageListType,
399 &ContactEditorData.BusinessLanguageListTokens,
400 &ContactEditorData.BusinessLanguageListPref,
401 lboBusinessLanguages,
403 frameCELang->ShowModal();
408 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
410 long longSelected = -1;
411 int intSelectedData = 0;
413 if (!GetSelectedItem(lboBusinessLanguages,
419 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
420 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
421 &ContactEditorData.BusinessLanguageListAltID,
422 &ContactEditorData.BusinessLanguageListPID,
423 &ContactEditorData.BusinessLanguageListType,
424 &ContactEditorData.BusinessLanguageListTokens,
425 &ContactEditorData.BusinessLanguageListPref,
426 lboBusinessLanguages,
428 frameCELang->SetEditorMode(TRUE, CE_WORK);
429 frameCELang->ShowModal();
434 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
436 long longSelected = -1;
437 int intSelectedData = 0;
439 if (!GetSelectedItem(lboBusinessLanguages,
445 lboBusinessLanguages->DeleteItem(longSelected);
447 DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
448 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
449 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
450 &ContactEditorData.BusinessLanguageListPref);
454 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
457 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
458 frameCETZ->SetEditorMode(FALSE, CE_WORK);
459 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
460 &ContactEditorData.BusinessTZListAltID,
461 &ContactEditorData.BusinessTZListPID,
462 &ContactEditorData.BusinessTZListType,
463 &ContactEditorData.BusinessTZListTokens,
464 &ContactEditorData.BusinessTZListMediatype,
465 &ContactEditorData.BusinessTZListPref,
466 lboBusinessTimezones,
468 frameCETZ->ShowModal();
473 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
475 long longSelected = -1;
476 int intSelectedData = 0;
478 if (!GetSelectedItem(lboBusinessTimezones,
484 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
485 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
486 &ContactEditorData.BusinessTZListAltID,
487 &ContactEditorData.BusinessTZListPID,
488 &ContactEditorData.BusinessTZListType,
489 &ContactEditorData.BusinessTZListTokens,
490 &ContactEditorData.BusinessTZListMediatype,
491 &ContactEditorData.BusinessTZListPref,
492 lboBusinessTimezones,
494 frameCETZ->SetEditorMode(TRUE, CE_WORK);
495 frameCETZ->ShowModal();
500 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
502 long longSelected = -1;
503 int intSelectedData = 0;
505 if (!GetSelectedItem(lboBusinessTimezones,
511 lboBusinessTimezones->DeleteItem(longSelected);
513 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
514 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
515 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
516 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
520 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
523 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
524 frameCEGeo->SetEditorMode(FALSE, CE_WORK);
525 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
526 &ContactEditorData.BusinessGeographyListAltID,
527 &ContactEditorData.BusinessGeographyListPID,
528 &ContactEditorData.BusinessGeographyListType,
529 &ContactEditorData.BusinessGeographyListDataType,
530 &ContactEditorData.BusinessGeographyListTokens,
531 &ContactEditorData.BusinessGeographyListMediatype,
532 &ContactEditorData.BusinessGeographyListPref,
533 lboBusinessGeoposition,
535 frameCEGeo->ShowModal();
540 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
542 long longSelected = -1;
543 int intSelectedData = 0;
545 if (!GetSelectedItem(lboBusinessGeoposition,
551 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
552 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
553 &ContactEditorData.BusinessGeographyListAltID,
554 &ContactEditorData.BusinessGeographyListPID,
555 &ContactEditorData.BusinessGeographyListType,
556 &ContactEditorData.BusinessGeographyListDataType,
557 &ContactEditorData.BusinessGeographyListTokens,
558 &ContactEditorData.BusinessGeographyListMediatype,
559 &ContactEditorData.BusinessGeographyListPref,
560 lboBusinessGeoposition,
562 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
563 frameCEGeo->ShowModal();
568 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
570 long longSelected = -1;
571 int intSelectedData = 0;
573 if (!GetSelectedItem(lboBusinessGeoposition,
579 lboBusinessGeoposition->DeleteItem(longSelected);
581 DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
582 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
583 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
584 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype,
585 &ContactEditorData.BusinessGeographyListPref);
589 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
592 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
593 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
594 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
595 &ContactEditorData.BusinessWebsiteListAltID,
596 &ContactEditorData.BusinessWebsiteListPID,
597 &ContactEditorData.BusinessWebsiteListType,
598 &ContactEditorData.BusinessWebsiteListTokens,
599 &ContactEditorData.BusinessWebsiteListMediatype,
600 &ContactEditorData.BusinessWebsiteListPref,
603 frameCEWeb->ShowModal();
608 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
610 long longSelected = -1;
611 int intSelectedData = 0;
613 if (!GetSelectedItem(lboBusinessWebsites,
619 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
620 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
621 &ContactEditorData.BusinessWebsiteListAltID,
622 &ContactEditorData.BusinessWebsiteListPID,
623 &ContactEditorData.BusinessWebsiteListType,
624 &ContactEditorData.BusinessWebsiteListTokens,
625 &ContactEditorData.BusinessWebsiteListMediatype,
626 &ContactEditorData.BusinessWebsiteListPref,
629 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
630 frameCEWeb->ShowModal();
635 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
637 long longSelected = -1;
638 int intSelectedData = 0;
640 if (!GetSelectedItem(lboBusinessWebsites,
646 lboBusinessWebsites->DeleteItem(longSelected);
648 DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
649 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
650 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
651 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
655 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
658 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
659 frameCETitle->SetEditorMode(FALSE, CE_WORK);
660 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
661 &ContactEditorData.BusinessTitleListLanguage,
662 &ContactEditorData.BusinessTitleListAltID,
663 &ContactEditorData.BusinessTitleListPID,
664 &ContactEditorData.BusinessTitleListType,
665 &ContactEditorData.BusinessTitleListTokens,
666 &ContactEditorData.BusinessTitleListPref,
669 frameCETitle->ShowModal();
674 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
676 long longSelected = -1;
677 int intSelectedData = 0;
679 if (!GetSelectedItem(lboBusinessTitles,
685 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
686 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
687 &ContactEditorData.BusinessTitleListLanguage,
688 &ContactEditorData.BusinessTitleListAltID,
689 &ContactEditorData.BusinessTitleListPID,
690 &ContactEditorData.BusinessTitleListType,
691 &ContactEditorData.BusinessTitleListTokens,
692 &ContactEditorData.BusinessTitleListPref,
695 frameCETitle->SetEditorMode(TRUE, CE_WORK);
696 frameCETitle->ShowModal();
701 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
703 long longSelected = -1;
704 int intSelectedData = 0;
706 if (!GetSelectedItem(lboBusinessTitles,
712 lboTitles->DeleteItem(longSelected);
714 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
715 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
716 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
717 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
721 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
724 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
725 frameCERole->SetEditorMode(FALSE, CE_WORK);
726 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
727 &ContactEditorData.BusinessRoleListLanguage,
728 &ContactEditorData.BusinessRoleListAltID,
729 &ContactEditorData.BusinessRoleListPID,
730 &ContactEditorData.BusinessRoleListType,
731 &ContactEditorData.BusinessRoleListTokens,
732 &ContactEditorData.BusinessRoleListPref,
735 frameCERole->ShowModal();
740 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
742 long longSelected = -1;
743 int intSelectedData = 0;
745 if (!GetSelectedItem(lboBusinessRoles,
751 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
752 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
753 &ContactEditorData.BusinessRoleListLanguage,
754 &ContactEditorData.BusinessRoleListAltID,
755 &ContactEditorData.BusinessRoleListPID,
756 &ContactEditorData.BusinessRoleListType,
757 &ContactEditorData.BusinessRoleListTokens,
758 &ContactEditorData.BusinessRoleListPref,
761 frameCERole->SetEditorMode(TRUE, CE_WORK);
762 frameCERole->ShowModal();
767 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
769 long longSelected = -1;
770 int intSelectedData = 0;
772 if (!GetSelectedItem(lboBusinessRoles,
778 lboBusinessRoles->DeleteItem(longSelected);
780 DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
781 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
782 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
783 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
787 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
790 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
791 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
792 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
793 &ContactEditorData.BusinessOrganisationsListLanguage,
794 &ContactEditorData.BusinessOrganisationsListSortAs,
795 &ContactEditorData.BusinessOrganisationsListAltID,
796 &ContactEditorData.BusinessOrganisationsListPID,
797 &ContactEditorData.BusinessOrganisationsListType,
798 &ContactEditorData.BusinessOrganisationsListTokens,
799 &ContactEditorData.BusinessOrganisationsListPref,
800 lboBusinessOrganisations,
802 frameCEOrg->ShowModal();
807 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
809 long longSelected = -1;
810 int intSelectedData = 0;
812 if (!GetSelectedItem(lboBusinessOrganisations,
818 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
819 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
820 &ContactEditorData.BusinessOrganisationsListLanguage,
821 &ContactEditorData.BusinessOrganisationsListSortAs,
822 &ContactEditorData.BusinessOrganisationsListAltID,
823 &ContactEditorData.BusinessOrganisationsListPID,
824 &ContactEditorData.BusinessOrganisationsListType,
825 &ContactEditorData.BusinessOrganisationsListTokens,
826 &ContactEditorData.BusinessOrganisationsListPref,
827 lboBusinessOrganisations,
829 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
830 frameCEOrg->ShowModal();
835 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
837 long longSelected = -1;
838 int intSelectedData = 0;
840 if (!GetSelectedItem(lboBusinessOrganisations,
846 lboBusinessOrganisations->DeleteItem(longSelected);
848 DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
849 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
850 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
851 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
852 &ContactEditorData.BusinessOrganisationsListPref);
856 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
859 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
860 frameCENote->SetEditorMode(FALSE, CE_WORK);
861 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
862 &ContactEditorData.BusinessNoteListLanguage,
863 &ContactEditorData.BusinessNoteListAltID,
864 &ContactEditorData.BusinessNoteListPID,
865 &ContactEditorData.BusinessNoteListType,
866 &ContactEditorData.BusinessNoteListTokens,
867 &ContactEditorData.BusinessNoteListPref,
870 frameCENote->ShowModal();
875 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
877 long longSelected = -1;
878 int intSelectedData = 0;
880 if (!GetSelectedItem(lboBusinessNotes,
886 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
887 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
888 &ContactEditorData.BusinessNoteListLanguage,
889 &ContactEditorData.BusinessNoteListAltID,
890 &ContactEditorData.BusinessNoteListPID,
891 &ContactEditorData.BusinessNoteListType,
892 &ContactEditorData.BusinessNoteListTokens,
893 &ContactEditorData.BusinessNoteListPref,
896 frameCENote->SetEditorMode(TRUE, CE_WORK);
897 frameCENote->ShowModal();
902 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
904 long longSelected = -1;
905 int intSelectedData = 0;
907 if (!GetSelectedItem(lboBusinessNotes,
913 lboBusinessNotes->DeleteItem(longSelected);
915 DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
916 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
917 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
918 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);