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 )
40 frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
41 frameCENickname->SetEditorMode(FALSE, CE_WORK);
42 intResult = GetLastInt(&ContactEditorData.BusinessNicknamesList);
43 frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
44 &ContactEditorData.BusinessNicknamesListAltID,
45 &ContactEditorData.BusinessNicknamesListPID,
46 &ContactEditorData.BusinessNicknamesListType,
47 &ContactEditorData.BusinessNicknamesListLanguage,
48 &ContactEditorData.BusinessNicknamesListTokens,
49 &ContactEditorData.BusinessNicknamesListPref,
52 frameCENickname->ShowModal();
53 delete frameCENickname;
54 frameCENickname = NULL;
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(&ContactEditorData.BusinessNicknamesList,
70 &ContactEditorData.BusinessNicknamesListAltID,
71 &ContactEditorData.BusinessNicknamesListPID,
72 &ContactEditorData.BusinessNicknamesListType,
73 &ContactEditorData.BusinessNicknamesListLanguage,
74 &ContactEditorData.BusinessNicknamesListTokens,
75 &ContactEditorData.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 &ContactEditorData.BusinessNicknamesList,
99 &ContactEditorData.BusinessNicknamesListLanguage,
100 &ContactEditorData.BusinessNicknamesListAltID,
101 &ContactEditorData.BusinessNicknamesListPID,
102 &ContactEditorData.BusinessNicknamesListTokens,
103 &ContactEditorData.BusinessNicknamesListType,
104 &ContactEditorData.BusinessNicknamesListPref);
107 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
111 frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
112 frameCEAddress->SetEditorMode(FALSE, CE_WORK);
113 intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
114 frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
115 &ContactEditorData.BusinessAddressListTown,
116 &ContactEditorData.BusinessAddressListCounty,
117 &ContactEditorData.BusinessAddressListPostCode,
118 &ContactEditorData.BusinessAddressListCountry,
119 &ContactEditorData.BusinessAddressListLabel,
120 &ContactEditorData.BusinessAddressListLang,
121 &ContactEditorData.BusinessAddressListAltID,
122 &ContactEditorData.BusinessAddressListPID,
123 &ContactEditorData.BusinessAddressListTokens,
124 &ContactEditorData.BusinessAddressListGeo,
125 &ContactEditorData.BusinessAddressListTimezone,
126 &ContactEditorData.BusinessAddressListType,
127 &ContactEditorData.BusinessAddressListMediatype,
128 &ContactEditorData.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(&ContactEditorData.BusinessAddressList,
149 &ContactEditorData.BusinessAddressListTown,
150 &ContactEditorData.BusinessAddressListCounty,
151 &ContactEditorData.BusinessAddressListPostCode,
152 &ContactEditorData.BusinessAddressListCountry,
153 &ContactEditorData.BusinessAddressListLabel,
154 &ContactEditorData.BusinessAddressListLang,
155 &ContactEditorData.BusinessAddressListAltID,
156 &ContactEditorData.BusinessAddressListPID,
157 &ContactEditorData.BusinessAddressListTokens,
158 &ContactEditorData.BusinessAddressListGeo,
159 &ContactEditorData.BusinessAddressListTimezone,
160 &ContactEditorData.BusinessAddressListType,
161 &ContactEditorData.BusinessAddressListMediatype,
162 &ContactEditorData.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, &ContactEditorData.BusinessAddressList,
184 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
185 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
186 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
187 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
188 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
189 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
190 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
191 &ContactEditorData.BusinessAddressListPref);
195 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
199 frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
200 frameCEEmail->SetEditorMode(FALSE, CE_WORK);
201 intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
202 frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
203 &ContactEditorData.BusinessEmailListAltID,
204 &ContactEditorData.BusinessEmailListPID,
205 &ContactEditorData.BusinessEmailListType,
206 &ContactEditorData.BusinessEmailListTokens,
207 &ContactEditorData.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(&ContactEditorData.BusinessEmailList,
228 &ContactEditorData.BusinessEmailListAltID,
229 &ContactEditorData.BusinessEmailListPID,
230 &ContactEditorData.BusinessEmailListType,
231 &ContactEditorData.BusinessEmailListTokens,
232 &ContactEditorData.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, &ContactEditorData.BusinessEmailList,
255 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
256 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
257 &ContactEditorData.BusinessEmailListPref);
261 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
265 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
266 frameCEIM->SetEditorMode(FALSE, CE_WORK);
267 intResult = GetLastInt(&ContactEditorData.BusinessIMList);
268 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
269 &ContactEditorData.BusinessIMListAltID,
270 &ContactEditorData.BusinessIMListPID,
271 &ContactEditorData.BusinessIMListType,
272 &ContactEditorData.BusinessIMListTypeInfo,
273 &ContactEditorData.BusinessIMListTokens,
274 &ContactEditorData.BusinessIMListMediatype,
275 &ContactEditorData.BusinessIMListPref,
278 frameCEIM->ShowModal();
283 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
285 long longSelected = -1;
286 int intSelectedData = 0;
288 if (!GetSelectedItem(lboBusinessIM,
294 frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
295 frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
296 &ContactEditorData.BusinessIMListAltID,
297 &ContactEditorData.BusinessIMListPID,
298 &ContactEditorData.BusinessIMListType,
299 &ContactEditorData.BusinessIMListTypeInfo,
300 &ContactEditorData.BusinessIMListTokens,
301 &ContactEditorData.BusinessIMListMediatype,
302 &ContactEditorData.BusinessIMListPref,
305 frameCEIM->SetEditorMode(TRUE, CE_WORK);
306 frameCEIM->ShowModal();
311 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
313 long longSelected = -1;
314 int intSelectedData = 0;
316 if (!GetSelectedItem(lboBusinessIM,
322 lboBusinessIM->DeleteItem(longSelected);
324 DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
325 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
326 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
327 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype,
328 &ContactEditorData.BusinessIMListPref);
332 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
336 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
337 frameCETel->SetEditorMode(FALSE, CE_WORK);
338 intResult = GetLastInt(&ContactEditorData.BusinessTelephoneList);
339 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
340 &ContactEditorData.BusinessTelephoneListAltID,
341 &ContactEditorData.BusinessTelephoneListPID,
342 &ContactEditorData.BusinessTelephoneListType,
343 &ContactEditorData.BusinessTelephoneListTypeInfo,
344 &ContactEditorData.BusinessTelephoneListTokens,
345 &ContactEditorData.BusinessTelephoneListPref,
346 lboBusinessTelephone,
348 frameCETel->ShowModal();
353 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
355 long longSelected = -1;
356 int intSelectedData = 0;
358 if (!GetSelectedItem(lboBusinessTelephone,
364 frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
365 frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
366 &ContactEditorData.BusinessTelephoneListAltID,
367 &ContactEditorData.BusinessTelephoneListPID,
368 &ContactEditorData.BusinessTelephoneListType,
369 &ContactEditorData.BusinessTelephoneListTypeInfo,
370 &ContactEditorData.BusinessTelephoneListTokens,
371 &ContactEditorData.BusinessTelephoneListPref,
372 lboBusinessTelephone,
374 frameCETel->SetEditorMode(TRUE, CE_WORK);
375 frameCETel->ShowModal();
380 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
382 long longSelected = -1;
383 int intSelectedData = 0;
385 if (!GetSelectedItem(lboBusinessTelephone,
391 lboBusinessTelephone->DeleteItem(longSelected);
393 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
394 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
395 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
396 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
400 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
404 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
405 frameCELang->SetEditorMode(FALSE, CE_WORK);
406 intResult = GetLastInt(&ContactEditorData.BusinessLanguageList);
407 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
408 &ContactEditorData.BusinessLanguageListAltID,
409 &ContactEditorData.BusinessLanguageListPID,
410 &ContactEditorData.BusinessLanguageListType,
411 &ContactEditorData.BusinessLanguageListTokens,
412 &ContactEditorData.BusinessLanguageListPref,
413 lboBusinessLanguages,
415 frameCELang->ShowModal();
420 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
422 long longSelected = -1;
423 int intSelectedData = 0;
425 if (!GetSelectedItem(lboBusinessLanguages,
431 frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
432 frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
433 &ContactEditorData.BusinessLanguageListAltID,
434 &ContactEditorData.BusinessLanguageListPID,
435 &ContactEditorData.BusinessLanguageListType,
436 &ContactEditorData.BusinessLanguageListTokens,
437 &ContactEditorData.BusinessLanguageListPref,
438 lboBusinessLanguages,
440 frameCELang->SetEditorMode(TRUE, CE_WORK);
441 frameCELang->ShowModal();
446 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
448 long longSelected = -1;
449 int intSelectedData = 0;
451 if (!GetSelectedItem(lboBusinessLanguages,
457 lboBusinessLanguages->DeleteItem(longSelected);
459 DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
460 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
461 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
462 &ContactEditorData.BusinessLanguageListPref);
466 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
470 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
471 frameCETZ->SetEditorMode(FALSE, CE_WORK);
472 intResult = GetLastInt(&ContactEditorData.BusinessTZList);
473 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
474 &ContactEditorData.BusinessTZListAltID,
475 &ContactEditorData.BusinessTZListPID,
476 &ContactEditorData.BusinessTZListType,
477 &ContactEditorData.BusinessTZListTokens,
478 &ContactEditorData.BusinessTZListMediatype,
479 &ContactEditorData.BusinessTZListPref,
480 lboBusinessTimezones,
482 frameCETZ->ShowModal();
487 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
489 long longSelected = -1;
490 int intSelectedData = 0;
492 if (!GetSelectedItem(lboBusinessTimezones,
498 frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
499 frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
500 &ContactEditorData.BusinessTZListAltID,
501 &ContactEditorData.BusinessTZListPID,
502 &ContactEditorData.BusinessTZListType,
503 &ContactEditorData.BusinessTZListTokens,
504 &ContactEditorData.BusinessTZListMediatype,
505 &ContactEditorData.BusinessTZListPref,
506 lboBusinessTimezones,
508 frameCETZ->SetEditorMode(TRUE, CE_WORK);
509 frameCETZ->ShowModal();
514 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
516 long longSelected = -1;
517 int intSelectedData = 0;
519 if (!GetSelectedItem(lboBusinessTimezones,
525 lboBusinessTimezones->DeleteItem(longSelected);
527 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
528 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
529 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
530 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
534 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
538 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
539 frameCEGeo->SetEditorMode(FALSE, CE_WORK);
540 intResult = GetLastInt(&ContactEditorData.BusinessGeographyList);
541 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
542 &ContactEditorData.BusinessGeographyListAltID,
543 &ContactEditorData.BusinessGeographyListPID,
544 &ContactEditorData.BusinessGeographyListType,
545 &ContactEditorData.BusinessGeographyListTokens,
546 &ContactEditorData.BusinessGeographyListMediatype,
547 &ContactEditorData.BusinessGeographyListPref,
548 lboBusinessGeoposition,
550 frameCEGeo->ShowModal();
555 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
557 long longSelected = -1;
558 int intSelectedData = 0;
560 if (!GetSelectedItem(lboBusinessGeoposition,
566 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
567 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
568 &ContactEditorData.BusinessGeographyListAltID,
569 &ContactEditorData.BusinessGeographyListPID,
570 &ContactEditorData.BusinessGeographyListType,
571 &ContactEditorData.BusinessGeographyListTokens,
572 &ContactEditorData.BusinessGeographyListMediatype,
573 &ContactEditorData.BusinessGeographyListPref,
574 lboBusinessGeoposition,
576 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
577 frameCEGeo->ShowModal();
582 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
584 long longSelected = -1;
585 int intSelectedData = 0;
587 if (!GetSelectedItem(lboBusinessGeoposition,
593 lboBusinessGeoposition->DeleteItem(longSelected);
595 DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
596 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
597 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListTokens,
598 &ContactEditorData.BusinessGeographyListMediatype, &ContactEditorData.BusinessGeographyListPref);
602 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
606 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
607 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
608 intResult = GetLastInt(&ContactEditorData.BusinessWebsiteList);
609 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
610 &ContactEditorData.BusinessWebsiteListAltID,
611 &ContactEditorData.BusinessWebsiteListPID,
612 &ContactEditorData.BusinessWebsiteListType,
613 &ContactEditorData.BusinessWebsiteListTokens,
614 &ContactEditorData.BusinessWebsiteListMediatype,
615 &ContactEditorData.BusinessWebsiteListPref,
618 frameCEWeb->ShowModal();
623 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
625 long longSelected = -1;
626 int intSelectedData = 0;
628 if (!GetSelectedItem(lboBusinessWebsites,
634 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
635 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
636 &ContactEditorData.BusinessWebsiteListAltID,
637 &ContactEditorData.BusinessWebsiteListPID,
638 &ContactEditorData.BusinessWebsiteListType,
639 &ContactEditorData.BusinessWebsiteListTokens,
640 &ContactEditorData.BusinessWebsiteListMediatype,
641 &ContactEditorData.BusinessWebsiteListPref,
644 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
645 frameCEWeb->ShowModal();
650 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
652 long longSelected = -1;
653 int intSelectedData = 0;
655 if (!GetSelectedItem(lboBusinessWebsites,
661 lboBusinessWebsites->DeleteItem(longSelected);
663 DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
664 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
665 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
666 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
670 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
674 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
675 frameCETitle->SetEditorMode(FALSE, CE_WORK);
676 intResult = GetLastInt(&ContactEditorData.BusinessTitleList);
677 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
678 &ContactEditorData.BusinessTitleListLanguage,
679 &ContactEditorData.BusinessTitleListAltID,
680 &ContactEditorData.BusinessTitleListPID,
681 &ContactEditorData.BusinessTitleListType,
682 &ContactEditorData.BusinessTitleListTokens,
683 &ContactEditorData.BusinessTitleListPref,
686 frameCETitle->ShowModal();
691 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
693 long longSelected = -1;
694 int intSelectedData = 0;
696 if (!GetSelectedItem(lboBusinessTitles,
702 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
703 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
704 &ContactEditorData.BusinessTitleListLanguage,
705 &ContactEditorData.BusinessTitleListAltID,
706 &ContactEditorData.BusinessTitleListPID,
707 &ContactEditorData.BusinessTitleListType,
708 &ContactEditorData.BusinessTitleListTokens,
709 &ContactEditorData.BusinessTitleListPref,
712 frameCETitle->SetEditorMode(TRUE, CE_WORK);
713 frameCETitle->ShowModal();
718 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
720 long longSelected = -1;
721 int intSelectedData = 0;
723 if (!GetSelectedItem(lboBusinessTitles,
729 lboTitles->DeleteItem(longSelected);
731 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
732 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
733 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
734 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
738 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
742 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
743 frameCERole->SetEditorMode(FALSE, CE_WORK);
744 intResult = GetLastInt(&ContactEditorData.BusinessRoleList);
745 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
746 &ContactEditorData.BusinessRoleListLanguage,
747 &ContactEditorData.BusinessRoleListAltID,
748 &ContactEditorData.BusinessRoleListPID,
749 &ContactEditorData.BusinessRoleListType,
750 &ContactEditorData.BusinessRoleListTokens,
751 &ContactEditorData.BusinessRoleListPref,
754 frameCERole->ShowModal();
759 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
761 long longSelected = -1;
762 int intSelectedData = 0;
764 if (!GetSelectedItem(lboBusinessRoles,
770 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
771 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
772 &ContactEditorData.BusinessRoleListLanguage,
773 &ContactEditorData.BusinessRoleListAltID,
774 &ContactEditorData.BusinessRoleListPID,
775 &ContactEditorData.BusinessRoleListType,
776 &ContactEditorData.BusinessRoleListTokens,
777 &ContactEditorData.BusinessRoleListPref,
780 frameCERole->SetEditorMode(TRUE, CE_WORK);
781 frameCERole->ShowModal();
786 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
788 long longSelected = -1;
789 int intSelectedData = 0;
791 if (!GetSelectedItem(lboBusinessRoles,
797 lboBusinessRoles->DeleteItem(longSelected);
799 DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
800 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
801 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
802 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
806 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
810 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
811 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
812 intResult = GetLastInt(&ContactEditorData.BusinessOrganisationsList);
813 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
814 &ContactEditorData.BusinessOrganisationsListLanguage,
815 &ContactEditorData.BusinessOrganisationsListSortAs,
816 &ContactEditorData.BusinessOrganisationsListAltID,
817 &ContactEditorData.BusinessOrganisationsListPID,
818 &ContactEditorData.BusinessOrganisationsListType,
819 &ContactEditorData.BusinessOrganisationsListTokens,
820 &ContactEditorData.BusinessOrganisationsListPref,
821 lboBusinessOrganisations,
823 frameCEOrg->ShowModal();
828 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
830 long longSelected = -1;
831 int intSelectedData = 0;
833 if (!GetSelectedItem(lboBusinessOrganisations,
839 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
840 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
841 &ContactEditorData.BusinessOrganisationsListLanguage,
842 &ContactEditorData.BusinessOrganisationsListSortAs,
843 &ContactEditorData.BusinessOrganisationsListAltID,
844 &ContactEditorData.BusinessOrganisationsListPID,
845 &ContactEditorData.BusinessOrganisationsListType,
846 &ContactEditorData.BusinessOrganisationsListTokens,
847 &ContactEditorData.BusinessOrganisationsListPref,
848 lboBusinessOrganisations,
850 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
851 frameCEOrg->ShowModal();
856 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
858 long longSelected = -1;
859 int intSelectedData = 0;
861 if (!GetSelectedItem(lboBusinessOrganisations,
867 lboBusinessOrganisations->DeleteItem(longSelected);
869 DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
870 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
871 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
872 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
873 &ContactEditorData.BusinessOrganisationsListPref);
877 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
881 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
882 frameCENote->SetEditorMode(FALSE, CE_WORK);
883 intResult = GetLastInt(&ContactEditorData.BusinessNoteList);
884 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
885 &ContactEditorData.BusinessNoteListLanguage,
886 &ContactEditorData.BusinessNoteListAltID,
887 &ContactEditorData.BusinessNoteListPID,
888 &ContactEditorData.BusinessNoteListType,
889 &ContactEditorData.BusinessNoteListTokens,
890 &ContactEditorData.BusinessNoteListPref,
893 frameCENote->ShowModal();
898 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
900 long longSelected = -1;
901 int intSelectedData = 0;
903 if (!GetSelectedItem(lboBusinessNotes,
909 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
910 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
911 &ContactEditorData.BusinessNoteListLanguage,
912 &ContactEditorData.BusinessNoteListAltID,
913 &ContactEditorData.BusinessNoteListPID,
914 &ContactEditorData.BusinessNoteListType,
915 &ContactEditorData.BusinessNoteListTokens,
916 &ContactEditorData.BusinessNoteListPref,
919 frameCENote->SetEditorMode(TRUE, CE_WORK);
920 frameCENote->ShowModal();
925 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
927 long longSelected = -1;
928 int intSelectedData = 0;
930 if (!GetSelectedItem(lboBusinessNotes,
936 lboBusinessNotes->DeleteItem(longSelected);
938 DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
939 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
940 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
941 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);