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 )
41 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42 frameCENickname->SetEditorMode(FALSE, CE_WORK);
43 intResult = GetLastInt(&ContactEditorData.BusinessNicknamesList);
44 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
45 &ContactEditorData.BusinessNicknamesListAltID,
46 &ContactEditorData.BusinessNicknamesListPID,
47 &ContactEditorData.BusinessNicknamesListType,
48 &ContactEditorData.BusinessNicknamesListLanguage,
49 &ContactEditorData.BusinessNicknamesListTokens,
50 &ContactEditorData.BusinessNicknamesListPref,
53 frameCENickname->ShowModal();
54 delete frameCENickname;
55 frameCENickname = NULL;
59 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
62 long longSelected = -1;
63 int intSelectedData = 0;
65 if (!GetSelectedItem(lboBusinessNicknames,
73 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
74 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
75 &ContactEditorData.BusinessNicknamesListAltID,
76 &ContactEditorData.BusinessNicknamesListPID,
77 &ContactEditorData.BusinessNicknamesListType,
78 &ContactEditorData.BusinessNicknamesListLanguage,
79 &ContactEditorData.BusinessNicknamesListTokens,
80 &ContactEditorData.BusinessNicknamesListPref,
83 frameCENickname->SetEditorMode(TRUE, CE_WORK);
84 frameCENickname->ShowModal();
85 delete frameCENickname;
86 frameCENickname = NULL;
90 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
93 long longSelected = -1;
94 int intSelectedData = 0;
96 if (!GetSelectedItem(lboBusinessNicknames,
104 lboBusinessNicknames->DeleteItem(longSelected);
106 DeleteMapData(intSelectedData,
107 &ContactEditorData.BusinessNicknamesList,
108 &ContactEditorData.BusinessNicknamesListLanguage,
109 &ContactEditorData.BusinessNicknamesListAltID,
110 &ContactEditorData.BusinessNicknamesListPID,
111 &ContactEditorData.BusinessNicknamesListTokens,
112 &ContactEditorData.BusinessNicknamesListType,
113 &ContactEditorData.BusinessNicknamesListPref);
117 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
122 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
123 frameCEAddress->SetEditorMode(FALSE, CE_WORK);
124 intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
125 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
126 &ContactEditorData.BusinessAddressListTown,
127 &ContactEditorData.BusinessAddressListCounty,
128 &ContactEditorData.BusinessAddressListPostCode,
129 &ContactEditorData.BusinessAddressListCountry,
130 &ContactEditorData.BusinessAddressListLabel,
131 &ContactEditorData.BusinessAddressListLang,
132 &ContactEditorData.BusinessAddressListAltID,
133 &ContactEditorData.BusinessAddressListPID,
134 &ContactEditorData.BusinessAddressListTokens,
135 &ContactEditorData.BusinessAddressListGeo,
136 &ContactEditorData.BusinessAddressListTimezone,
137 &ContactEditorData.BusinessAddressListType,
138 &ContactEditorData.BusinessAddressListMediatype,
139 &ContactEditorData.BusinessAddressListPref,
140 lboBusinessAddresses,
142 frameCEAddress->ShowModal();
143 delete frameCEAddress;
144 frameCEAddress = NULL;
148 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
151 long longSelected = -1;
152 int intSelectedData = 0;
154 if (!GetSelectedItem(lboBusinessAddresses,
162 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
163 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
164 &ContactEditorData.BusinessAddressListTown,
165 &ContactEditorData.BusinessAddressListCounty,
166 &ContactEditorData.BusinessAddressListPostCode,
167 &ContactEditorData.BusinessAddressListCountry,
168 &ContactEditorData.BusinessAddressListLabel,
169 &ContactEditorData.BusinessAddressListLang,
170 &ContactEditorData.BusinessAddressListAltID,
171 &ContactEditorData.BusinessAddressListPID,
172 &ContactEditorData.BusinessAddressListTokens,
173 &ContactEditorData.BusinessAddressListGeo,
174 &ContactEditorData.BusinessAddressListTimezone,
175 &ContactEditorData.BusinessAddressListType,
176 &ContactEditorData.BusinessAddressListMediatype,
177 &ContactEditorData.BusinessAddressListPref,
178 lboBusinessAddresses,
180 frameCEAddress->SetEditorMode(TRUE, CE_WORK);
181 frameCEAddress->ShowModal();
182 delete frameCEAddress;
183 frameCEAddress = NULL;
187 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
190 long longSelected = -1;
191 int intSelectedData = 0;
193 if (!GetSelectedItem(lboBusinessAddresses,
201 lboBusinessAddresses->DeleteItem(longSelected);
202 DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
203 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
204 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
205 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
206 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
207 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
208 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
209 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
210 &ContactEditorData.BusinessAddressListPref);
214 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
219 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
220 frameCEEmail->SetEditorMode(FALSE, CE_WORK);
221 intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
222 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
223 &ContactEditorData.BusinessEmailListAltID,
224 &ContactEditorData.BusinessEmailListPID,
225 &ContactEditorData.BusinessEmailListType,
226 &ContactEditorData.BusinessEmailListTokens,
227 &ContactEditorData.BusinessEmailListPref,
230 frameCEEmail->ShowModal();
236 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
239 long longSelected = -1;
240 int intSelectedData = 0;
242 if (!GetSelectedItem(lboBusinessEmail,
250 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
251 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
252 &ContactEditorData.BusinessEmailListAltID,
253 &ContactEditorData.BusinessEmailListPID,
254 &ContactEditorData.BusinessEmailListType,
255 &ContactEditorData.BusinessEmailListTokens,
256 &ContactEditorData.BusinessEmailListPref,
259 frameCEEmail->SetEditorMode(TRUE, CE_WORK);
260 frameCEEmail->ShowModal();
266 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
269 long longSelected = -1;
270 int intSelectedData = 0;
272 if (!GetSelectedItem(lboBusinessEmail,
280 lboBusinessEmail->DeleteItem(longSelected);
282 DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
283 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
284 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
285 &ContactEditorData.BusinessEmailListPref);
289 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
294 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
295 frameCEIM->SetEditorMode(FALSE, CE_WORK);
296 intResult = GetLastInt(&ContactEditorData.BusinessIMList);
297 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
298 &ContactEditorData.BusinessIMListAltID,
299 &ContactEditorData.BusinessIMListPID,
300 &ContactEditorData.BusinessIMListType,
301 &ContactEditorData.BusinessIMListTypeInfo,
302 &ContactEditorData.BusinessIMListTokens,
303 &ContactEditorData.BusinessIMListMediatype,
304 &ContactEditorData.BusinessIMListPref,
307 frameCEIM->ShowModal();
313 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
316 long longSelected = -1;
317 int intSelectedData = 0;
319 if (!GetSelectedItem(lboBusinessIM,
327 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
328 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
329 &ContactEditorData.BusinessIMListAltID,
330 &ContactEditorData.BusinessIMListPID,
331 &ContactEditorData.BusinessIMListType,
332 &ContactEditorData.BusinessIMListTypeInfo,
333 &ContactEditorData.BusinessIMListTokens,
334 &ContactEditorData.BusinessIMListMediatype,
335 &ContactEditorData.BusinessIMListPref,
338 frameCEIM->SetEditorMode(TRUE, CE_WORK);
339 frameCEIM->ShowModal();
345 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
348 long longSelected = -1;
349 int intSelectedData = 0;
351 if (!GetSelectedItem(lboBusinessIM,
359 lboBusinessIM->DeleteItem(longSelected);
361 DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
362 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
363 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
364 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype,
365 &ContactEditorData.BusinessIMListPref);
369 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
374 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
375 frameCETel->SetEditorMode(FALSE, CE_WORK);
376 intResult = GetLastInt(&ContactEditorData.BusinessTelephoneList);
377 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
378 &ContactEditorData.BusinessTelephoneListAltID,
379 &ContactEditorData.BusinessTelephoneListPID,
380 &ContactEditorData.BusinessTelephoneListType,
381 &ContactEditorData.BusinessTelephoneListTypeInfo,
382 &ContactEditorData.BusinessTelephoneListTokens,
383 &ContactEditorData.BusinessTelephoneListPref,
384 lboBusinessTelephone,
386 frameCETel->ShowModal();
392 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
395 long longSelected = -1;
396 int intSelectedData = 0;
398 if (!GetSelectedItem(lboBusinessTelephone,
406 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
407 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
408 &ContactEditorData.BusinessTelephoneListAltID,
409 &ContactEditorData.BusinessTelephoneListPID,
410 &ContactEditorData.BusinessTelephoneListType,
411 &ContactEditorData.BusinessTelephoneListTypeInfo,
412 &ContactEditorData.BusinessTelephoneListTokens,
413 &ContactEditorData.BusinessTelephoneListPref,
414 lboBusinessTelephone,
416 frameCETel->SetEditorMode(TRUE, CE_WORK);
417 frameCETel->ShowModal();
423 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
426 long longSelected = -1;
427 int intSelectedData = 0;
429 if (!GetSelectedItem(lboBusinessTelephone,
437 lboBusinessTelephone->DeleteItem(longSelected);
439 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
440 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
441 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
442 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
446 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
451 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
452 frameCELang->SetEditorMode(FALSE, CE_WORK);
453 intResult = GetLastInt(&ContactEditorData.BusinessLanguageList);
454 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
455 &ContactEditorData.BusinessLanguageListAltID,
456 &ContactEditorData.BusinessLanguageListPID,
457 &ContactEditorData.BusinessLanguageListType,
458 &ContactEditorData.BusinessLanguageListTokens,
459 &ContactEditorData.BusinessLanguageListPref,
460 lboBusinessLanguages,
462 frameCELang->ShowModal();
468 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
471 long longSelected = -1;
472 int intSelectedData = 0;
474 if (!GetSelectedItem(lboBusinessLanguages,
482 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
483 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
484 &ContactEditorData.BusinessLanguageListAltID,
485 &ContactEditorData.BusinessLanguageListPID,
486 &ContactEditorData.BusinessLanguageListType,
487 &ContactEditorData.BusinessLanguageListTokens,
488 &ContactEditorData.BusinessLanguageListPref,
489 lboBusinessLanguages,
491 frameCELang->SetEditorMode(TRUE, CE_WORK);
492 frameCELang->ShowModal();
498 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
501 long longSelected = -1;
502 int intSelectedData = 0;
504 if (!GetSelectedItem(lboBusinessLanguages,
512 lboBusinessLanguages->DeleteItem(longSelected);
514 DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
515 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
516 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
517 &ContactEditorData.BusinessLanguageListPref);
521 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
526 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
527 frameCETZ->SetEditorMode(FALSE, CE_WORK);
528 intResult = GetLastInt(&ContactEditorData.BusinessTZList);
529 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
530 &ContactEditorData.BusinessTZListAltID,
531 &ContactEditorData.BusinessTZListPID,
532 &ContactEditorData.BusinessTZListType,
533 &ContactEditorData.BusinessTZListTokens,
534 &ContactEditorData.BusinessTZListMediatype,
535 &ContactEditorData.BusinessTZListPref,
536 lboBusinessTimezones,
538 frameCETZ->ShowModal();
544 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
547 long longSelected = -1;
548 int intSelectedData = 0;
550 if (!GetSelectedItem(lboBusinessTimezones,
558 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
559 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
560 &ContactEditorData.BusinessTZListAltID,
561 &ContactEditorData.BusinessTZListPID,
562 &ContactEditorData.BusinessTZListType,
563 &ContactEditorData.BusinessTZListTokens,
564 &ContactEditorData.BusinessTZListMediatype,
565 &ContactEditorData.BusinessTZListPref,
566 lboBusinessTimezones,
568 frameCETZ->SetEditorMode(TRUE, CE_WORK);
569 frameCETZ->ShowModal();
575 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
578 long longSelected = -1;
579 int intSelectedData = 0;
581 if (!GetSelectedItem(lboBusinessTimezones,
589 lboBusinessTimezones->DeleteItem(longSelected);
591 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
592 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
593 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
594 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
598 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
603 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
604 frameCEGeo->SetEditorMode(FALSE, CE_WORK);
605 intResult = GetLastInt(&ContactEditorData.BusinessGeographyList);
606 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
607 &ContactEditorData.BusinessGeographyListAltID,
608 &ContactEditorData.BusinessGeographyListPID,
609 &ContactEditorData.BusinessGeographyListType,
610 &ContactEditorData.BusinessGeographyListDataType,
611 &ContactEditorData.BusinessGeographyListTokens,
612 &ContactEditorData.BusinessGeographyListMediatype,
613 &ContactEditorData.BusinessGeographyListPref,
614 lboBusinessGeoposition,
616 frameCEGeo->ShowModal();
622 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
625 long longSelected = -1;
626 int intSelectedData = 0;
628 if (!GetSelectedItem(lboBusinessGeoposition,
636 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
637 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
638 &ContactEditorData.BusinessGeographyListAltID,
639 &ContactEditorData.BusinessGeographyListPID,
640 &ContactEditorData.BusinessGeographyListType,
641 &ContactEditorData.BusinessGeographyListDataType,
642 &ContactEditorData.BusinessGeographyListTokens,
643 &ContactEditorData.BusinessGeographyListMediatype,
644 &ContactEditorData.BusinessGeographyListPref,
645 lboBusinessGeoposition,
647 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
648 frameCEGeo->ShowModal();
654 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
657 long longSelected = -1;
658 int intSelectedData = 0;
660 if (!GetSelectedItem(lboBusinessGeoposition,
668 lboBusinessGeoposition->DeleteItem(longSelected);
670 DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
671 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
672 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
673 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype,
674 &ContactEditorData.BusinessGeographyListPref);
678 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
683 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
684 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
685 intResult = GetLastInt(&ContactEditorData.BusinessWebsiteList);
686 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
687 &ContactEditorData.BusinessWebsiteListAltID,
688 &ContactEditorData.BusinessWebsiteListPID,
689 &ContactEditorData.BusinessWebsiteListType,
690 &ContactEditorData.BusinessWebsiteListTokens,
691 &ContactEditorData.BusinessWebsiteListMediatype,
692 &ContactEditorData.BusinessWebsiteListPref,
695 frameCEWeb->ShowModal();
701 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
704 long longSelected = -1;
705 int intSelectedData = 0;
707 if (!GetSelectedItem(lboBusinessWebsites,
715 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
716 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
717 &ContactEditorData.BusinessWebsiteListAltID,
718 &ContactEditorData.BusinessWebsiteListPID,
719 &ContactEditorData.BusinessWebsiteListType,
720 &ContactEditorData.BusinessWebsiteListTokens,
721 &ContactEditorData.BusinessWebsiteListMediatype,
722 &ContactEditorData.BusinessWebsiteListPref,
725 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
726 frameCEWeb->ShowModal();
732 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
735 long longSelected = -1;
736 int intSelectedData = 0;
738 if (!GetSelectedItem(lboBusinessWebsites,
746 lboBusinessWebsites->DeleteItem(longSelected);
748 DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
749 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
750 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
751 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
755 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
760 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
761 frameCETitle->SetEditorMode(FALSE, CE_WORK);
762 intResult = GetLastInt(&ContactEditorData.BusinessTitleList);
763 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
764 &ContactEditorData.BusinessTitleListLanguage,
765 &ContactEditorData.BusinessTitleListAltID,
766 &ContactEditorData.BusinessTitleListPID,
767 &ContactEditorData.BusinessTitleListType,
768 &ContactEditorData.BusinessTitleListTokens,
769 &ContactEditorData.BusinessTitleListPref,
772 frameCETitle->ShowModal();
778 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
781 long longSelected = -1;
782 int intSelectedData = 0;
784 if (!GetSelectedItem(lboBusinessTitles,
792 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
793 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
794 &ContactEditorData.BusinessTitleListLanguage,
795 &ContactEditorData.BusinessTitleListAltID,
796 &ContactEditorData.BusinessTitleListPID,
797 &ContactEditorData.BusinessTitleListType,
798 &ContactEditorData.BusinessTitleListTokens,
799 &ContactEditorData.BusinessTitleListPref,
802 frameCETitle->SetEditorMode(TRUE, CE_WORK);
803 frameCETitle->ShowModal();
809 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
812 long longSelected = -1;
813 int intSelectedData = 0;
815 if (!GetSelectedItem(lboBusinessTitles,
823 lboTitles->DeleteItem(longSelected);
825 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
826 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
827 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
828 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
832 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
837 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
838 frameCERole->SetEditorMode(FALSE, CE_WORK);
839 intResult = GetLastInt(&ContactEditorData.BusinessRoleList);
840 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
841 &ContactEditorData.BusinessRoleListLanguage,
842 &ContactEditorData.BusinessRoleListAltID,
843 &ContactEditorData.BusinessRoleListPID,
844 &ContactEditorData.BusinessRoleListType,
845 &ContactEditorData.BusinessRoleListTokens,
846 &ContactEditorData.BusinessRoleListPref,
849 frameCERole->ShowModal();
855 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
858 long longSelected = -1;
859 int intSelectedData = 0;
861 if (!GetSelectedItem(lboBusinessRoles,
869 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
870 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
871 &ContactEditorData.BusinessRoleListLanguage,
872 &ContactEditorData.BusinessRoleListAltID,
873 &ContactEditorData.BusinessRoleListPID,
874 &ContactEditorData.BusinessRoleListType,
875 &ContactEditorData.BusinessRoleListTokens,
876 &ContactEditorData.BusinessRoleListPref,
879 frameCERole->SetEditorMode(TRUE, CE_WORK);
880 frameCERole->ShowModal();
886 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
889 long longSelected = -1;
890 int intSelectedData = 0;
892 if (!GetSelectedItem(lboBusinessRoles,
900 lboBusinessRoles->DeleteItem(longSelected);
902 DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
903 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
904 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
905 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
909 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
914 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
915 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
916 intResult = GetLastInt(&ContactEditorData.BusinessOrganisationsList);
917 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
918 &ContactEditorData.BusinessOrganisationsListLanguage,
919 &ContactEditorData.BusinessOrganisationsListSortAs,
920 &ContactEditorData.BusinessOrganisationsListAltID,
921 &ContactEditorData.BusinessOrganisationsListPID,
922 &ContactEditorData.BusinessOrganisationsListType,
923 &ContactEditorData.BusinessOrganisationsListTokens,
924 &ContactEditorData.BusinessOrganisationsListPref,
925 lboBusinessOrganisations,
927 frameCEOrg->ShowModal();
933 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
936 long longSelected = -1;
937 int intSelectedData = 0;
939 if (!GetSelectedItem(lboBusinessOrganisations,
947 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
948 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
949 &ContactEditorData.BusinessOrganisationsListLanguage,
950 &ContactEditorData.BusinessOrganisationsListSortAs,
951 &ContactEditorData.BusinessOrganisationsListAltID,
952 &ContactEditorData.BusinessOrganisationsListPID,
953 &ContactEditorData.BusinessOrganisationsListType,
954 &ContactEditorData.BusinessOrganisationsListTokens,
955 &ContactEditorData.BusinessOrganisationsListPref,
956 lboBusinessOrganisations,
958 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
959 frameCEOrg->ShowModal();
965 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
968 long longSelected = -1;
969 int intSelectedData = 0;
971 if (!GetSelectedItem(lboBusinessOrganisations,
979 lboBusinessOrganisations->DeleteItem(longSelected);
981 DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
982 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
983 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
984 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
985 &ContactEditorData.BusinessOrganisationsListPref);
989 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
994 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
995 frameCENote->SetEditorMode(FALSE, CE_WORK);
996 intResult = GetLastInt(&ContactEditorData.BusinessNoteList);
997 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
998 &ContactEditorData.BusinessNoteListLanguage,
999 &ContactEditorData.BusinessNoteListAltID,
1000 &ContactEditorData.BusinessNoteListPID,
1001 &ContactEditorData.BusinessNoteListType,
1002 &ContactEditorData.BusinessNoteListTokens,
1003 &ContactEditorData.BusinessNoteListPref,
1006 frameCENote->ShowModal();
1012 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1015 long longSelected = -1;
1016 int intSelectedData = 0;
1018 if (!GetSelectedItem(lboBusinessNotes,
1026 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1027 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1028 &ContactEditorData.BusinessNoteListLanguage,
1029 &ContactEditorData.BusinessNoteListAltID,
1030 &ContactEditorData.BusinessNoteListPID,
1031 &ContactEditorData.BusinessNoteListType,
1032 &ContactEditorData.BusinessNoteListTokens,
1033 &ContactEditorData.BusinessNoteListPref,
1036 frameCENote->SetEditorMode(TRUE, CE_WORK);
1037 frameCENote->ShowModal();
1043 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1046 long longSelected = -1;
1047 int intSelectedData = 0;
1049 if (!GetSelectedItem(lboBusinessNotes,
1057 lboBusinessNotes->DeleteItem(longSelected);
1059 DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1060 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1061 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1062 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);