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.BusinessGeographyListDataType,
546 &ContactEditorData.BusinessGeographyListTokens,
547 &ContactEditorData.BusinessGeographyListMediatype,
548 &ContactEditorData.BusinessGeographyListPref,
549 lboBusinessGeoposition,
551 frameCEGeo->ShowModal();
556 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
558 long longSelected = -1;
559 int intSelectedData = 0;
561 if (!GetSelectedItem(lboBusinessGeoposition,
567 frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
568 frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
569 &ContactEditorData.BusinessGeographyListAltID,
570 &ContactEditorData.BusinessGeographyListPID,
571 &ContactEditorData.BusinessGeographyListType,
572 &ContactEditorData.BusinessGeographyListDataType,
573 &ContactEditorData.BusinessGeographyListTokens,
574 &ContactEditorData.BusinessGeographyListMediatype,
575 &ContactEditorData.BusinessGeographyListPref,
576 lboBusinessGeoposition,
578 frameCEGeo->SetEditorMode(TRUE, CE_WORK);
579 frameCEGeo->ShowModal();
584 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
586 long longSelected = -1;
587 int intSelectedData = 0;
589 if (!GetSelectedItem(lboBusinessGeoposition,
595 lboBusinessGeoposition->DeleteItem(longSelected);
597 DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
598 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
599 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
600 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype,
601 &ContactEditorData.BusinessGeographyListPref);
605 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
609 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
610 frameCEWeb->SetEditorMode(FALSE, CE_WORK);
611 intResult = GetLastInt(&ContactEditorData.BusinessWebsiteList);
612 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
613 &ContactEditorData.BusinessWebsiteListAltID,
614 &ContactEditorData.BusinessWebsiteListPID,
615 &ContactEditorData.BusinessWebsiteListType,
616 &ContactEditorData.BusinessWebsiteListTokens,
617 &ContactEditorData.BusinessWebsiteListMediatype,
618 &ContactEditorData.BusinessWebsiteListPref,
621 frameCEWeb->ShowModal();
626 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
628 long longSelected = -1;
629 int intSelectedData = 0;
631 if (!GetSelectedItem(lboBusinessWebsites,
637 frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
638 frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
639 &ContactEditorData.BusinessWebsiteListAltID,
640 &ContactEditorData.BusinessWebsiteListPID,
641 &ContactEditorData.BusinessWebsiteListType,
642 &ContactEditorData.BusinessWebsiteListTokens,
643 &ContactEditorData.BusinessWebsiteListMediatype,
644 &ContactEditorData.BusinessWebsiteListPref,
647 frameCEWeb->SetEditorMode(TRUE, CE_WORK);
648 frameCEWeb->ShowModal();
653 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
655 long longSelected = -1;
656 int intSelectedData = 0;
658 if (!GetSelectedItem(lboBusinessWebsites,
664 lboBusinessWebsites->DeleteItem(longSelected);
666 DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
667 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
668 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
669 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
673 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
677 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
678 frameCETitle->SetEditorMode(FALSE, CE_WORK);
679 intResult = GetLastInt(&ContactEditorData.BusinessTitleList);
680 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
681 &ContactEditorData.BusinessTitleListLanguage,
682 &ContactEditorData.BusinessTitleListAltID,
683 &ContactEditorData.BusinessTitleListPID,
684 &ContactEditorData.BusinessTitleListType,
685 &ContactEditorData.BusinessTitleListTokens,
686 &ContactEditorData.BusinessTitleListPref,
689 frameCETitle->ShowModal();
694 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
696 long longSelected = -1;
697 int intSelectedData = 0;
699 if (!GetSelectedItem(lboBusinessTitles,
705 frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
706 frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
707 &ContactEditorData.BusinessTitleListLanguage,
708 &ContactEditorData.BusinessTitleListAltID,
709 &ContactEditorData.BusinessTitleListPID,
710 &ContactEditorData.BusinessTitleListType,
711 &ContactEditorData.BusinessTitleListTokens,
712 &ContactEditorData.BusinessTitleListPref,
715 frameCETitle->SetEditorMode(TRUE, CE_WORK);
716 frameCETitle->ShowModal();
721 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
723 long longSelected = -1;
724 int intSelectedData = 0;
726 if (!GetSelectedItem(lboBusinessTitles,
732 lboTitles->DeleteItem(longSelected);
734 DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
735 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
736 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
737 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
741 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
745 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
746 frameCERole->SetEditorMode(FALSE, CE_WORK);
747 intResult = GetLastInt(&ContactEditorData.BusinessRoleList);
748 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
749 &ContactEditorData.BusinessRoleListLanguage,
750 &ContactEditorData.BusinessRoleListAltID,
751 &ContactEditorData.BusinessRoleListPID,
752 &ContactEditorData.BusinessRoleListType,
753 &ContactEditorData.BusinessRoleListTokens,
754 &ContactEditorData.BusinessRoleListPref,
757 frameCERole->ShowModal();
762 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
764 long longSelected = -1;
765 int intSelectedData = 0;
767 if (!GetSelectedItem(lboBusinessRoles,
773 frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
774 frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
775 &ContactEditorData.BusinessRoleListLanguage,
776 &ContactEditorData.BusinessRoleListAltID,
777 &ContactEditorData.BusinessRoleListPID,
778 &ContactEditorData.BusinessRoleListType,
779 &ContactEditorData.BusinessRoleListTokens,
780 &ContactEditorData.BusinessRoleListPref,
783 frameCERole->SetEditorMode(TRUE, CE_WORK);
784 frameCERole->ShowModal();
789 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
791 long longSelected = -1;
792 int intSelectedData = 0;
794 if (!GetSelectedItem(lboBusinessRoles,
800 lboBusinessRoles->DeleteItem(longSelected);
802 DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
803 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
804 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
805 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
809 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
813 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
814 frameCEOrg->SetEditorMode(FALSE, CE_WORK);
815 intResult = GetLastInt(&ContactEditorData.BusinessOrganisationsList);
816 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
817 &ContactEditorData.BusinessOrganisationsListLanguage,
818 &ContactEditorData.BusinessOrganisationsListSortAs,
819 &ContactEditorData.BusinessOrganisationsListAltID,
820 &ContactEditorData.BusinessOrganisationsListPID,
821 &ContactEditorData.BusinessOrganisationsListType,
822 &ContactEditorData.BusinessOrganisationsListTokens,
823 &ContactEditorData.BusinessOrganisationsListPref,
824 lboBusinessOrganisations,
826 frameCEOrg->ShowModal();
831 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
833 long longSelected = -1;
834 int intSelectedData = 0;
836 if (!GetSelectedItem(lboBusinessOrganisations,
842 frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
843 frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
844 &ContactEditorData.BusinessOrganisationsListLanguage,
845 &ContactEditorData.BusinessOrganisationsListSortAs,
846 &ContactEditorData.BusinessOrganisationsListAltID,
847 &ContactEditorData.BusinessOrganisationsListPID,
848 &ContactEditorData.BusinessOrganisationsListType,
849 &ContactEditorData.BusinessOrganisationsListTokens,
850 &ContactEditorData.BusinessOrganisationsListPref,
851 lboBusinessOrganisations,
853 frameCEOrg->SetEditorMode(TRUE, CE_WORK);
854 frameCEOrg->ShowModal();
859 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
861 long longSelected = -1;
862 int intSelectedData = 0;
864 if (!GetSelectedItem(lboBusinessOrganisations,
870 lboBusinessOrganisations->DeleteItem(longSelected);
872 DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
873 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
874 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
875 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
876 &ContactEditorData.BusinessOrganisationsListPref);
880 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
884 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
885 frameCENote->SetEditorMode(FALSE, CE_WORK);
886 intResult = GetLastInt(&ContactEditorData.BusinessNoteList);
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->ShowModal();
901 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
903 long longSelected = -1;
904 int intSelectedData = 0;
906 if (!GetSelectedItem(lboBusinessNotes,
912 frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
913 frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
914 &ContactEditorData.BusinessNoteListLanguage,
915 &ContactEditorData.BusinessNoteListAltID,
916 &ContactEditorData.BusinessNoteListPID,
917 &ContactEditorData.BusinessNoteListType,
918 &ContactEditorData.BusinessNoteListTokens,
919 &ContactEditorData.BusinessNoteListPref,
922 frameCENote->SetEditorMode(TRUE, CE_WORK);
923 frameCENote->ShowModal();
928 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
930 long longSelected = -1;
931 int intSelectedData = 0;
933 if (!GetSelectedItem(lboBusinessNotes,
939 lboBusinessNotes->DeleteItem(longSelected);
941 DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
942 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
943 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
944 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);