1 // frmContactEditorBusiness.cpp - frmContactEditor Business tab subroutines.
3 // (c) 2012-2015 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 )
40 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41 frameCENickname->SetEditorMode(FALSE, CE_WORK);
42 intResult = GetLastInt(&BusinessNicknamesList);
43 frameCENickname->SetupPointers(&BusinessNicknamesList,
44 &BusinessNicknamesListAltID,
45 &BusinessNicknamesListPID,
46 &BusinessNicknamesListType,
47 &BusinessNicknamesListLanguage,
48 &BusinessNicknamesListTokens,
49 &BusinessNicknamesListPref,
52 frameCENickname->ShowModal();
53 delete frameCENickname;
54 frameCENickname = NULL;
57 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
59 long longSelected = -1;
60 int intSelectedData = 0;
62 if (!GetSelectedItem(lboBusinessNicknames,
68 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
69 frameCENickname->SetupPointers(&BusinessNicknamesList,
70 &BusinessNicknamesListAltID,
71 &BusinessNicknamesListPID,
72 &BusinessNicknamesListType,
73 &BusinessNicknamesListLanguage,
74 &BusinessNicknamesListTokens,
75 &BusinessNicknamesListPref,
78 frameCENickname->SetEditorMode(TRUE, CE_WORK);
79 frameCENickname->ShowModal();
80 delete frameCENickname;
81 frameCENickname = NULL;
84 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
86 long longSelected = -1;
87 int intSelectedData = 0;
89 if (!GetSelectedItem(lboBusinessNicknames,
95 lboBusinessNicknames->DeleteItem(longSelected);
97 DeleteMapData(intSelectedData,
98 &BusinessNicknamesList,
99 &BusinessNicknamesListLanguage,
100 &BusinessNicknamesListAltID,
101 &BusinessNicknamesListPID,
102 &BusinessNicknamesListTokens,
103 &BusinessNicknamesListType,
104 &BusinessNicknamesListPref);
107 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
111 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
112 frameCEAddress->SetEditorMode(FALSE, CE_WORK);
113 intResult = GetLastInt(&BusinessAddressList);
114 frameCEAddress->SetupPointers(&BusinessAddressList,
115 &BusinessAddressListTown,
116 &BusinessAddressListCounty,
117 &BusinessAddressListPostCode,
118 &BusinessAddressListCountry,
119 &BusinessAddressListLabel,
120 &BusinessAddressListLang,
121 &BusinessAddressListAltID,
122 &BusinessAddressListPID,
123 &BusinessAddressListTokens,
124 &BusinessAddressListGeo,
125 &BusinessAddressListTimezone,
126 &BusinessAddressListType,
127 &BusinessAddressListMediatype,
128 &BusinessAddressListPref,
129 lboBusinessAddresses,
131 frameCEAddress->ShowModal();
132 delete frameCEAddress;
133 frameCEAddress = NULL;
136 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
138 long longSelected = -1;
139 int intSelectedData = 0;
141 if (!GetSelectedItem(lboBusinessAddresses,
147 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
148 frameCEAddress->SetupPointers(&BusinessAddressList,
149 &BusinessAddressListTown,
150 &BusinessAddressListCounty,
151 &BusinessAddressListPostCode,
152 &BusinessAddressListCountry,
153 &BusinessAddressListLabel,
154 &BusinessAddressListLang,
155 &BusinessAddressListAltID,
156 &BusinessAddressListPID,
157 &BusinessAddressListTokens,
158 &BusinessAddressListGeo,
159 &BusinessAddressListTimezone,
160 &BusinessAddressListType,
161 &BusinessAddressListMediatype,
162 &BusinessAddressListPref,
163 lboBusinessAddresses,
165 frameCEAddress->SetEditorMode(TRUE, CE_WORK);
166 frameCEAddress->ShowModal();
167 delete frameCEAddress;
168 frameCEAddress = NULL;
171 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
173 long longSelected = -1;
174 int intSelectedData = 0;
176 if (!GetSelectedItem(lboBusinessAddresses,
182 lboBusinessAddresses->DeleteItem(longSelected);
183 DeleteMapData(intSelectedData, &BusinessAddressList,
184 &BusinessAddressListTown, &BusinessAddressListCounty,
185 &BusinessAddressListPostCode, &BusinessAddressListCountry,
186 &BusinessAddressList, &BusinessAddressListLabel,
187 &BusinessAddressListLang, &BusinessAddressListAltID,
188 &BusinessAddressListPID, &BusinessAddressListTokens,
189 &BusinessAddressListGeo, &BusinessAddressListTimezone,
190 &BusinessAddressListType, &BusinessAddressListMediatype,
191 &BusinessAddressListPref);
195 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
199 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
200 frameCEEmail->SetEditorMode(FALSE, CE_WORK);
201 intResult = GetLastInt(&BusinessAddressList);
202 frameCEEmail->SetupPointers(&BusinessEmailList,
203 &BusinessEmailListAltID,
204 &BusinessEmailListPID,
205 &BusinessEmailListType,
206 &BusinessEmailListTokens,
207 &BusinessEmailListPref,
210 frameCEEmail->ShowModal();
215 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
217 long longSelected = -1;
218 int intSelectedData = 0;
220 if (!GetSelectedItem(lboBusinessEmail,
226 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
227 frameCEEmail->SetupPointers(&BusinessEmailList,
228 &BusinessEmailListAltID,
229 &BusinessEmailListPID,
230 &BusinessEmailListType,
231 &BusinessEmailListTokens,
232 &BusinessEmailListPref,
235 frameCEEmail->SetEditorMode(TRUE, CE_WORK);
236 frameCEEmail->ShowModal();
241 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
243 long longSelected = -1;
244 int intSelectedData = 0;
246 if (!GetSelectedItem(lboBusinessEmail,
252 lboBusinessEmail->DeleteItem(longSelected);
254 DeleteMapData(intSelectedData, &BusinessEmailList,
255 &BusinessEmailListAltID, &BusinessEmailListPID,
256 &BusinessEmailListType, &BusinessEmailListTokens,
257 &BusinessEmailListPref);
261 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
265 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
266 frameCEIM->SetEditorMode(FALSE, CE_WORK);
267 intResult = GetLastInt(&BusinessIMList);
268 frameCEIM->SetupPointers(&BusinessIMList,
269 &BusinessIMListAltID,
272 &BusinessIMListTokens,
273 &BusinessIMListMediatype,
277 frameCEIM->ShowModal();
282 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
284 long longSelected = -1;
285 int intSelectedData = 0;
287 if (!GetSelectedItem(lboBusinessIM,
293 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
294 frameCEIM->SetupPointers(&BusinessIMList,
295 &BusinessIMListAltID,
298 &BusinessIMListTokens,
299 &BusinessIMListMediatype,
303 frameCEIM->SetEditorMode(TRUE, CE_WORK);
304 frameCEIM->ShowModal();
309 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
311 long longSelected = -1;
312 int intSelectedData = 0;
314 if (!GetSelectedItem(lboBusinessIM,
320 lboBusinessIM->DeleteItem(longSelected);
322 DeleteMapData(intSelectedData, &BusinessIMList,
323 &BusinessIMListAltID, &BusinessIMListPID,
324 &BusinessIMListType, &BusinessIMListTokens,
325 &BusinessIMListMediatype, &BusinessIMListPref);
329 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
333 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
334 frameCETel->SetEditorMode(FALSE, CE_WORK);
335 intResult = GetLastInt(&BusinessTelephoneList);
336 frameCETel->SetupPointers(&BusinessTelephoneList,
337 &BusinessTelephoneListAltID,
338 &BusinessTelephoneListPID,
339 &BusinessTelephoneListType,
340 &BusinessTelephoneListTokens,
341 &BusinessTelephoneListPref,
342 lboBusinessTelephone,
344 frameCETel->ShowModal();
349 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
351 long longSelected = -1;
352 int intSelectedData = 0;
354 if (!GetSelectedItem(lboBusinessTelephone,
360 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
361 frameCETel->SetupPointers(&BusinessTelephoneList,
362 &BusinessTelephoneListAltID,
363 &BusinessTelephoneListPID,
364 &BusinessTelephoneListType,
365 &BusinessTelephoneListTokens,
366 &BusinessTelephoneListPref,
367 lboBusinessTelephone,
369 frameCETel->SetEditorMode(TRUE, CE_WORK);
370 frameCETel->ShowModal();
375 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
377 long longSelected = -1;
378 int intSelectedData = 0;
380 if (!GetSelectedItem(lboBusinessTelephone,
386 lboBusinessTelephone->DeleteItem(longSelected);
388 DeleteMapData(intSelectedData, &BusinessTelephoneList,
389 &BusinessTelephoneListAltID, &BusinessTelephoneListPID,
390 &BusinessTelephoneListType, &BusinessTelephoneListTokens,
391 &BusinessTelephoneListPref);
395 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
399 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
400 frameCELang->SetEditorMode(FALSE, CE_WORK);
401 intResult = GetLastInt(&BusinessLanguageList);
402 frameCELang->SetupPointers(&BusinessLanguageList,
403 &BusinessLanguageListAltID,
404 &BusinessLanguageListPID,
405 &BusinessLanguageListType,
406 &BusinessLanguageListTokens,
407 &BusinessLanguageListPref,
408 lboBusinessLanguages,
410 frameCELang->ShowModal();
415 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
417 long longSelected = -1;
418 int intSelectedData = 0;
420 if (!GetSelectedItem(lboBusinessLanguages,
426 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
427 frameCELang->SetupPointers(&BusinessLanguageList,
428 &BusinessLanguageListAltID,
429 &BusinessLanguageListPID,
430 &BusinessLanguageListType,
431 &BusinessLanguageListTokens,
432 &BusinessLanguageListPref,
433 lboBusinessLanguages,
435 frameCELang->SetEditorMode(TRUE, CE_WORK);
436 frameCELang->ShowModal();
441 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
443 long longSelected = -1;
444 int intSelectedData = 0;
446 if (!GetSelectedItem(lboBusinessLanguages,
452 lboBusinessLanguages->DeleteItem(longSelected);
454 DeleteMapData(intSelectedData, &BusinessLanguageList,
455 &BusinessLanguageListAltID, &BusinessLanguageListPID,
456 &BusinessLanguageListType, &BusinessLanguageListTokens,
457 &BusinessLanguageListPref);
461 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
465 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
466 frameCETZ->SetEditorMode(FALSE, CE_WORK);
467 intResult = GetLastInt(&BusinessTZList);
468 frameCETZ->SetupPointers(&BusinessTZList,
469 &BusinessTZListAltID,
472 &BusinessTZListTokens,
473 &BusinessTZListMediatype,
475 lboBusinessTimezones,
477 frameCETZ->ShowModal();
482 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
484 long longSelected = -1;
485 int intSelectedData = 0;
487 if (!GetSelectedItem(lboBusinessTimezones,
493 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
494 frameCETZ->SetupPointers(&BusinessTZList,
495 &BusinessTZListAltID,
498 &BusinessTZListTokens,
499 &BusinessTZListMediatype,
501 lboBusinessTimezones,
503 frameCETZ->SetEditorMode(TRUE, CE_WORK);
504 frameCETZ->ShowModal();
509 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
511 long longSelected = -1;
512 int intSelectedData = 0;
514 if (!GetSelectedItem(lboBusinessTimezones,
520 lboBusinessTimezones->DeleteItem(longSelected);
522 DeleteMapData(intSelectedData, &BusinessTZList,
523 &BusinessTZListAltID, &BusinessTZListPID,
524 &BusinessTZListType, &BusinessTZListTokens,
525 &BusinessTZListMediatype, &BusinessTZListPref);
529 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
533 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
534 frameCEGeo->SetEditorMode(FALSE, CE_WORK);
535 intResult = GetLastInt(&BusinessGeographyList);
536 frameCEGeo->SetupPointers(&BusinessGeographyList,
537 &BusinessGeographyListAltID,
538 &BusinessGeographyListPID,
539 &BusinessGeographyListType,
540 &BusinessGeographyListTokens,
541 &BusinessGeographyListMediatype,
542 &BusinessGeographyListPref,
543 lboBusinessGeoposition,
545 frameCEGeo->ShowModal();
550 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
552 long longSelected = -1;
553 int intSelectedData = 0;
555 if (!GetSelectedItem(lboBusinessGeoposition,
561 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
562 frameCEGeo->SetupPointers(&BusinessGeographyList,
563 &BusinessGeographyListAltID,
564 &BusinessGeographyListPID,
565 &BusinessGeographyListType,
566 &BusinessGeographyListTokens,
567 &BusinessGeographyListMediatype,
568 &BusinessGeographyListPref,
569 lboBusinessGeoposition,
571 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
572 frameCEGeo->ShowModal();
577 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
579 long longSelected = -1;
580 int intSelectedData = 0;
582 if (!GetSelectedItem(lboBusinessGeoposition,
588 lboBusinessGeoposition->DeleteItem(longSelected);
590 DeleteMapData(intSelectedData, &BusinessGeographyList,
591 &BusinessGeographyListAltID, &BusinessGeographyListPID,
592 &BusinessGeographyListType, &BusinessGeographyListTokens,
593 &BusinessGeographyListMediatype, &BusinessGeographyListPref);
597 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
601 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
602 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
603 intResult = GetLastInt(&BusinessWebsiteList);
604 frameCEWeb->SetupPointers(&BusinessWebsiteList,
605 &BusinessWebsiteListAltID,
606 &BusinessWebsiteListPID,
607 &BusinessWebsiteListType,
608 &BusinessWebsiteListTokens,
609 &BusinessWebsiteListMediatype,
610 &BusinessWebsiteListPref,
613 frameCEWeb->ShowModal();
618 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
620 long longSelected = -1;
621 int intSelectedData = 0;
623 if (!GetSelectedItem(lboBusinessWebsites,
629 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
630 frameCEWeb->SetupPointers(&BusinessWebsiteList,
631 &BusinessWebsiteListAltID,
632 &BusinessWebsiteListPID,
633 &BusinessWebsiteListType,
634 &BusinessWebsiteListTokens,
635 &BusinessWebsiteListMediatype,
636 &BusinessWebsiteListPref,
639 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
640 frameCEWeb->ShowModal();
645 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
647 long longSelected = -1;
648 int intSelectedData = 0;
650 if (!GetSelectedItem(lboBusinessWebsites,
656 lboBusinessWebsites->DeleteItem(longSelected);
658 DeleteMapData(intSelectedData, &BusinessWebsiteList,
659 &BusinessWebsiteListAltID, &BusinessWebsiteListPID,
660 &BusinessWebsiteListType, &BusinessWebsiteListTokens,
661 &BusinessWebsiteListMediatype, &BusinessWebsiteListPref);
665 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
669 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
670 frameCETitle->SetEditorMode(FALSE, CE_WORK);
671 intResult = GetLastInt(&BusinessTitleList);
672 frameCETitle->SetupPointers(&BusinessTitleList,
673 &BusinessTitleListLanguage,
674 &BusinessTitleListAltID,
675 &BusinessTitleListPID,
676 &BusinessTitleListType,
677 &BusinessTitleListTokens,
678 &BusinessTitleListPref,
681 frameCETitle->ShowModal();
686 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
688 long longSelected = -1;
689 int intSelectedData = 0;
691 if (!GetSelectedItem(lboBusinessTitles,
697 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
698 frameCETitle->SetupPointers(&BusinessTitleList,
699 &BusinessTitleListLanguage,
700 &BusinessTitleListAltID,
701 &BusinessTitleListPID,
702 &BusinessTitleListType,
703 &BusinessTitleListTokens,
704 &BusinessTitleListPref,
707 frameCETitle->SetEditorMode(TRUE, CE_WORK);
708 frameCETitle->ShowModal();
713 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
715 long longSelected = -1;
716 int intSelectedData = 0;
718 if (!GetSelectedItem(lboBusinessTitles,
724 lboTitles->DeleteItem(longSelected);
726 DeleteMapData(intSelectedData, &BusinessTitleList,
727 &BusinessTitleListLanguage, &BusinessTitleListAltID,
728 &BusinessTitleListPID, &BusinessTitleListType,
729 &BusinessTitleListTokens, &BusinessTitleListPref);
733 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
737 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
738 frameCERole->SetEditorMode(FALSE, CE_WORK);
739 intResult = GetLastInt(&BusinessRoleList);
740 frameCERole->SetupPointers(&BusinessRoleList,
741 &BusinessRoleListLanguage,
742 &BusinessRoleListAltID,
743 &BusinessRoleListPID,
744 &BusinessRoleListType,
745 &BusinessRoleListTokens,
746 &BusinessRoleListPref,
749 frameCERole->ShowModal();
754 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
756 long longSelected = -1;
757 int intSelectedData = 0;
759 if (!GetSelectedItem(lboBusinessRoles,
765 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
766 frameCERole->SetupPointers(&BusinessRoleList,
767 &BusinessRoleListLanguage,
768 &BusinessRoleListAltID,
769 &BusinessRoleListPID,
770 &BusinessRoleListType,
771 &BusinessRoleListTokens,
772 &BusinessRoleListPref,
775 frameCERole->SetEditorMode(TRUE, CE_WORK);
776 frameCERole->ShowModal();
781 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
783 long longSelected = -1;
784 int intSelectedData = 0;
786 if (!GetSelectedItem(lboBusinessRoles,
792 lboBusinessRoles->DeleteItem(longSelected);
794 DeleteMapData(intSelectedData, &BusinessRoleList,
795 &BusinessRoleListLanguage, &BusinessRoleListAltID,
796 &BusinessRoleListPID, &BusinessRoleListType,
797 &BusinessRoleListTokens, &BusinessRoleListPref);
801 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
805 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
806 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
807 intResult = GetLastInt(&GeneralOrganisationsList);
808 frameCEOrg->SetupPointers(&GeneralOrganisationsList,
809 &BusinessOrganisationsListLanguage,
810 &BusinessOrganisationsListSortAs,
811 &BusinessOrganisationsListAltID,
812 &BusinessOrganisationsListPID,
813 &BusinessOrganisationsListType,
814 &BusinessOrganisationsListTokens,
815 &BusinessOrganisationsListPref,
816 lboBusinessOrganisations,
818 frameCEOrg->ShowModal();
823 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
825 long longSelected = -1;
826 int intSelectedData = 0;
828 if (!GetSelectedItem(lboBusinessOrganisations,
834 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
835 frameCEOrg->SetupPointers(&BusinessOrganisationsList,
836 &BusinessOrganisationsListLanguage,
837 &BusinessOrganisationsListSortAs,
838 &BusinessOrganisationsListAltID,
839 &BusinessOrganisationsListPID,
840 &BusinessOrganisationsListType,
841 &BusinessOrganisationsListTokens,
842 &BusinessOrganisationsListPref,
843 lboBusinessOrganisations,
845 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
846 frameCEOrg->ShowModal();
851 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
853 long longSelected = -1;
854 int intSelectedData = 0;
856 if (!GetSelectedItem(lboBusinessOrganisations,
862 lboBusinessOrganisations->DeleteItem(longSelected);
864 DeleteMapData(intSelectedData, &BusinessOrganisationsList,
865 &BusinessOrganisationsListLanguage, &BusinessOrganisationsListSortAs,
866 &BusinessOrganisationsListAltID, &BusinessOrganisationsListPID,
867 &BusinessOrganisationsListType, &BusinessOrganisationsListTokens,
868 &BusinessOrganisationsListPref);
872 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
876 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
877 frameCENote->SetEditorMode(FALSE, CE_WORK);
878 intResult = GetLastInt(&BusinessNoteList);
879 frameCENote->SetupPointers(&BusinessNoteList,
880 &BusinessNoteListLanguage,
881 &BusinessNoteListAltID,
882 &BusinessNoteListPID,
883 &BusinessNoteListType,
884 &BusinessNoteListTokens,
885 &BusinessNoteListPref,
888 frameCENote->ShowModal();
893 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
895 long longSelected = -1;
896 int intSelectedData = 0;
898 if (!GetSelectedItem(lboBusinessNotes,
904 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
905 frameCENote->SetupPointers(&BusinessNoteList,
906 &BusinessNoteListLanguage,
907 &BusinessNoteListAltID,
908 &BusinessNoteListPID,
909 &BusinessNoteListType,
910 &BusinessNoteListTokens,
911 &BusinessNoteListPref,
914 frameCENote->SetEditorMode(TRUE, CE_WORK);
915 frameCENote->ShowModal();
920 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
922 long longSelected = -1;
923 int intSelectedData = 0;
925 if (!GetSelectedItem(lboBusinessNotes,
931 lboBusinessNotes->DeleteItem(longSelected);
933 DeleteMapData(intSelectedData, &BusinessNoteList,
934 &BusinessNoteListLanguage, &BusinessNoteListAltID,
935 &BusinessNoteListPID, &BusinessNoteListType,
936 &BusinessNoteListTokens, &BusinessNoteListPref);