Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Stop XAB crashing when pressing Modify/Delete
[xestiaab/.git] / source / contacteditor / frmContactEditor-Business.cpp
1 // frmContactEditorBusiness.cpp - frmContactEditor Business tab subroutines.
2 //
3 // (c) 2012-2016 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
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.
10 //
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.
15 //
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 )
37 {
39         // Bring up the window for adding a nickname.
40    
41         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42         frameCENickname->SetEditorMode(FALSE, CE_WORK);
43         frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
44                 &ContactEditorData.BusinessNicknamesListAltID,
45                 &ContactEditorData.BusinessNicknamesListPID,
46                 &ContactEditorData.BusinessNicknamesListType,
47                 &ContactEditorData.BusinessNicknamesListLanguage,
48                 &ContactEditorData.BusinessNicknamesListTokens,
49                 &ContactEditorData.BusinessNicknamesListPref,
50                 lboBusinessNicknames,
51                 (intValueSeek));
52         frameCENickname->ShowModal();
53         delete frameCENickname;
54         frameCENickname = NULL;
55         
56 }
58 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
59 {
61         // Bring up the window for modifying a nickname.
63         long longSelected = -1;
64         int intSelectedData = 0;
65     
66         if (lboBusinessNicknames->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNicknames,
67                 &longSelected,
68                 &intSelectedData)){
69                 
70                 return;
71                 
72         }
73     
74         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
75         frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
76                 &ContactEditorData.BusinessNicknamesListAltID,
77                 &ContactEditorData.BusinessNicknamesListPID,
78                 &ContactEditorData.BusinessNicknamesListType,
79                 &ContactEditorData.BusinessNicknamesListLanguage,
80                 &ContactEditorData.BusinessNicknamesListTokens,
81                 &ContactEditorData.BusinessNicknamesListPref,
82                 lboBusinessNicknames,
83                 intSelectedData);
84         frameCENickname->SetEditorMode(TRUE, CE_WORK);
85         frameCENickname->ShowModal();
86         delete frameCENickname;
87         frameCENickname = NULL;
88         
89 }
91 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
92 {
94         // Bring up the window to delete the nickname.
96         long longSelected = -1;
97         int intSelectedData = 0;
98     
99         if (lboBusinessNicknames->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNicknames,
100                 &longSelected,
101                 &intSelectedData)){
102                 
103                 return;
104                 
105         }
106     
107         lboBusinessNicknames->DeleteItem(longSelected);
108     
109         DeleteMapData(intSelectedData,
110                 &ContactEditorData.BusinessNicknamesList,
111                 &ContactEditorData.BusinessNicknamesListLanguage,
112                 &ContactEditorData.BusinessNicknamesListAltID,
113                 &ContactEditorData.BusinessNicknamesListPID,
114                 &ContactEditorData.BusinessNicknamesListTokens,
115                 &ContactEditorData.BusinessNicknamesListType,
116                 &ContactEditorData.BusinessNicknamesListPref);
120 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
123         // Bring up the window for adding an address.
124     
125         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
126         frameCEAddress->SetEditorMode(FALSE, CE_WORK);
127         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
128                 &ContactEditorData.BusinessAddressListTown,
129                 &ContactEditorData.BusinessAddressListCounty,
130                 &ContactEditorData.BusinessAddressListPostCode,
131                 &ContactEditorData.BusinessAddressListCountry,
132                 &ContactEditorData.BusinessAddressListLabel,
133                 &ContactEditorData.BusinessAddressListLang,
134                 &ContactEditorData.BusinessAddressListAltID,
135                 &ContactEditorData.BusinessAddressListPID,
136                 &ContactEditorData.BusinessAddressListTokens,
137                 &ContactEditorData.BusinessAddressListGeo,
138                 &ContactEditorData.BusinessAddressListTimezone,
139                 &ContactEditorData.BusinessAddressListType,
140                 &ContactEditorData.BusinessAddressListMediatype,
141                 &ContactEditorData.BusinessAddressListPref,
142                 lboBusinessAddresses,
143                 (intValueSeek));
144         frameCEAddress->ShowModal();
145         delete frameCEAddress;
146         frameCEAddress = NULL;
147         
150 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
153         // Bring up a window for editing an address.
155         long longSelected = -1;
156         int intSelectedData = 0;
157     
158         if (lboBusinessAddresses->GetItemCount() == 0 || !GetSelectedItem(lboBusinessAddresses,
159                 &longSelected,
160                 &intSelectedData)){
161                 
162                 return;
163                 
164         }
165     
166         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
167         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
168                 &ContactEditorData.BusinessAddressListTown,
169                 &ContactEditorData.BusinessAddressListCounty,
170                 &ContactEditorData.BusinessAddressListPostCode,
171                 &ContactEditorData.BusinessAddressListCountry,
172                 &ContactEditorData.BusinessAddressListLabel,
173                 &ContactEditorData.BusinessAddressListLang,
174                 &ContactEditorData.BusinessAddressListAltID,
175                 &ContactEditorData.BusinessAddressListPID,
176                 &ContactEditorData.BusinessAddressListTokens,
177                 &ContactEditorData.BusinessAddressListGeo,
178                 &ContactEditorData.BusinessAddressListTimezone,
179                 &ContactEditorData.BusinessAddressListType,
180                 &ContactEditorData.BusinessAddressListMediatype,
181                 &ContactEditorData.BusinessAddressListPref,
182                 lboBusinessAddresses,
183                 intSelectedData);
184         frameCEAddress->SetEditorMode(TRUE, CE_WORK);
185         frameCEAddress->ShowModal();
186         delete frameCEAddress;
187         frameCEAddress = NULL;
188         
191 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
194         // Bring up the window for deleting the address.
196         long longSelected = -1;
197         int intSelectedData = 0;
198     
199         if (lboBusinessAddresses->GetItemCount() == 0 || !GetSelectedItem(lboBusinessAddresses,
200                 &longSelected,
201                 &intSelectedData)){
202                 
203                 return;
204                 
205         }
206     
207         lboBusinessAddresses->DeleteItem(longSelected);
208         DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
209                 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
210                 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
211                 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
212                 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
213                 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
214                 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
215                 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
216                 &ContactEditorData.BusinessAddressListPref);
217     
220 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
223         // Bring up the window for adding an email address.
224     
225         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
226         frameCEEmail->SetEditorMode(FALSE, CE_WORK);
227         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
228                 &ContactEditorData.BusinessEmailListAltID,
229                 &ContactEditorData.BusinessEmailListPID,
230                 &ContactEditorData.BusinessEmailListType,
231                 &ContactEditorData.BusinessEmailListTokens,
232                 &ContactEditorData.BusinessEmailListPref,
233                 lboBusinessEmail,
234                 (intValueSeek));
235         frameCEEmail->ShowModal();
236         delete frameCEEmail;
237         frameCEEmail = NULL;
238         
241 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
244         // Bring up the window for modifying the email address.
246         long longSelected = -1;
247         int intSelectedData = 0;
248     
249         if (lboBusinessEmail->GetItemCount() == 0 || !GetSelectedItem(lboBusinessEmail,
250                 &longSelected,
251                 &intSelectedData)){
252                 
253                 return;
254                 
255         }
256     
257         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
258         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
259                 &ContactEditorData.BusinessEmailListAltID,
260                 &ContactEditorData.BusinessEmailListPID,
261                 &ContactEditorData.BusinessEmailListType,
262                 &ContactEditorData.BusinessEmailListTokens,
263                 &ContactEditorData.BusinessEmailListPref,
264                 lboBusinessEmail,
265                 intSelectedData);
266         frameCEEmail->SetEditorMode(TRUE, CE_WORK);
267         frameCEEmail->ShowModal();
268         delete frameCEEmail;
269         frameCEEmail = NULL;
270         
273 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
276         // Bring up the window to delete the email address.
278         long longSelected = -1;
279         int intSelectedData = 0;
280     
281         if (lboBusinessEmail->GetItemCount() == 0 || !GetSelectedItem(lboBusinessEmail,
282                          &longSelected,
283                          &intSelectedData)){
284                          
285                 return;
286                 
287         }
288     
289         lboBusinessEmail->DeleteItem(longSelected);
290     
291         DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
292                 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
293                 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
294                 &ContactEditorData.BusinessEmailListPref);
295     
298 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
301         // Bring up the window for adding an IM address.
302     
303         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
304         frameCEIM->SetEditorMode(FALSE, CE_WORK);
305         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
306                 &ContactEditorData.BusinessIMListAltID,
307                 &ContactEditorData.BusinessIMListPID,
308                 &ContactEditorData.BusinessIMListType,
309                 &ContactEditorData.BusinessIMListTypeInfo,
310                 &ContactEditorData.BusinessIMListTokens,
311                 &ContactEditorData.BusinessIMListMediatype,
312                 &ContactEditorData.BusinessIMListPref,
313                 lboBusinessIM,
314                 (intValueSeek));
315         frameCEIM->ShowModal();
316         delete frameCEIM;
317         frameCEIM = NULL;
318         
321 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
324         // Bring up the window for editing an IM address.
326         long longSelected = -1;
327         int intSelectedData = 0;
328     
329         if (lboBusinessIM->GetItemCount() == 0 || !GetSelectedItem(lboBusinessIM,
330                 &longSelected,
331                 &intSelectedData)){
332                 
333                 return;
334                 
335         }
336     
337         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
338         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
339                 &ContactEditorData.BusinessIMListAltID,
340                 &ContactEditorData.BusinessIMListPID,
341                 &ContactEditorData.BusinessIMListType,
342                 &ContactEditorData.BusinessIMListTypeInfo,
343                 &ContactEditorData.BusinessIMListTokens,
344                 &ContactEditorData.BusinessIMListMediatype,
345                 &ContactEditorData.BusinessIMListPref,
346                 lboBusinessIM,
347                 intSelectedData);
348         frameCEIM->SetEditorMode(TRUE, CE_WORK);
349         frameCEIM->ShowModal();
350         delete frameCEIM;
351         frameCEIM = NULL;
352         
355 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
358         // Bring up the window for deleting an IM address.
360         long longSelected = -1;
361         int intSelectedData = 0;
362     
363         if (lboBusinessIM->GetItemCount() == 0 || !GetSelectedItem(lboBusinessIM,
364                 &longSelected,
365                 &intSelectedData)){
366                 
367                 return;
368                 
369         }
370     
371         lboBusinessIM->DeleteItem(longSelected);
372     
373         DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
374                 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
375                 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
376                 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype, 
377                 &ContactEditorData.BusinessIMListPref);
378     
381 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
384         // Bring up the window for adding a telephone number.
385     
386         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
387         frameCETel->SetEditorMode(FALSE, CE_WORK);
388         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
389                 &ContactEditorData.BusinessTelephoneListAltID,
390                 &ContactEditorData.BusinessTelephoneListPID,
391                 &ContactEditorData.BusinessTelephoneListType,
392                 &ContactEditorData.BusinessTelephoneListTypeInfo,
393                 &ContactEditorData.BusinessTelephoneListTokens,
394                 &ContactEditorData.BusinessTelephoneListPref,
395                 lboBusinessTelephone,
396                 (intValueSeek));
397         frameCETel->ShowModal();
398         delete frameCETel;
399         frameCETel = NULL;
400         
403 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
406         // Bring up the address for editing a telephone number.
408         long longSelected = -1;
409         int intSelectedData = 0;
410     
411         if (lboBusinessTelephone->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTelephone,
412                 &longSelected,
413                 &intSelectedData)){
414                 
415                 return;
416                 
417         }
418     
419         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
420         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
421                 &ContactEditorData.BusinessTelephoneListAltID,
422                 &ContactEditorData.BusinessTelephoneListPID,
423                 &ContactEditorData.BusinessTelephoneListType,
424                 &ContactEditorData.BusinessTelephoneListTypeInfo,
425                 &ContactEditorData.BusinessTelephoneListTokens,
426                 &ContactEditorData.BusinessTelephoneListPref,
427                 lboBusinessTelephone,
428                 intSelectedData);
429         frameCETel->SetEditorMode(TRUE, CE_WORK);
430         frameCETel->ShowModal();
431         delete frameCETel;
432         frameCETel = NULL;
433         
436 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
439         // Bring up the window for deleting a telephone number.
441         long longSelected = -1;
442         int intSelectedData = 0;
443     
444         if (lboBusinessTelephone->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTelephone,
445                 &longSelected,
446                 &intSelectedData)){
447                 
448                 return;
449         
450         }
451     
452         lboBusinessTelephone->DeleteItem(longSelected);
453     
454         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
455                 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
456                 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
457                 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
458     
461 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
464         // Bring up the window for adding a language.
465     
466         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
467         frameCELang->SetEditorMode(FALSE, CE_WORK);
468         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
469                 &ContactEditorData.BusinessLanguageListAltID,
470                 &ContactEditorData.BusinessLanguageListPID,
471                 &ContactEditorData.BusinessLanguageListType,
472                 &ContactEditorData.BusinessLanguageListTokens,
473                 &ContactEditorData.BusinessLanguageListPref,
474                 lboBusinessLanguages,
475                 (intValueSeek));
476         frameCELang->ShowModal();
477         delete frameCELang;
478         frameCELang = NULL;
479         
482 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
485         // Bring up the window for editing a language.
487         long longSelected = -1;
488         int intSelectedData = 0;
489     
490         if (lboBusinessLanguages->GetItemCount() == 0 || !GetSelectedItem(lboBusinessLanguages,
491                 &longSelected,
492                 &intSelectedData)){
493                 
494                 return;
495                 
496         }
497     
498         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
499         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
500                 &ContactEditorData.BusinessLanguageListAltID,
501                 &ContactEditorData.BusinessLanguageListPID,
502                 &ContactEditorData.BusinessLanguageListType,
503                 &ContactEditorData.BusinessLanguageListTokens,
504                 &ContactEditorData.BusinessLanguageListPref,
505                 lboBusinessLanguages,
506                 intSelectedData);
507         frameCELang->SetEditorMode(TRUE, CE_WORK);
508         frameCELang->ShowModal();
509         delete frameCELang;
510         frameCELang = NULL;
511         
514 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
517         // Bring up the window for deleting a language.
519         long longSelected = -1;
520         int intSelectedData = 0;
521     
522         if (lboBusinessLanguages->GetItemCount() == 0 || !GetSelectedItem(lboBusinessLanguages,
523                 &longSelected,
524                 &intSelectedData)){
525                          
526                 return;
527                 
528         }
529     
530         lboBusinessLanguages->DeleteItem(longSelected);
531     
532         DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
533                 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
534                 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
535                 &ContactEditorData.BusinessLanguageListPref);
536     
539 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
542         // Bring up the window for adding a timezone.
543     
544         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
545         frameCETZ->SetEditorMode(FALSE, CE_WORK);
546         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
547                 &ContactEditorData.BusinessTZListAltID,
548                 &ContactEditorData.BusinessTZListPID,
549                 &ContactEditorData.BusinessTZListType,
550                 &ContactEditorData.BusinessTZListTokens,
551                 &ContactEditorData.BusinessTZListMediatype,
552                 &ContactEditorData.BusinessTZListPref,
553                 lboBusinessTimezones,
554                 (intValueSeek));
555         frameCETZ->ShowModal();
556         delete frameCETZ;
557         frameCETZ = NULL;
558         
561 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
564         // Bring up the window for modifying a timezone.
566         long longSelected = -1;
567         int intSelectedData = 0;
568     
569         if (lboBusinessTimezones->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTimezones,
570                 &longSelected,
571                 &intSelectedData)){
572                 
573                 return;
574                 
575         }
576     
577         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
578         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
579                 &ContactEditorData.BusinessTZListAltID,
580                 &ContactEditorData.BusinessTZListPID,
581                 &ContactEditorData.BusinessTZListType,
582                 &ContactEditorData.BusinessTZListTokens,
583                 &ContactEditorData.BusinessTZListMediatype,
584                 &ContactEditorData.BusinessTZListPref,
585                 lboBusinessTimezones,
586                 intSelectedData);
587         frameCETZ->SetEditorMode(TRUE, CE_WORK);
588         frameCETZ->ShowModal();
589         delete frameCETZ;
590         frameCETZ = NULL;
591         
594 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
597         // Bring up the window for deleting a timezone.
599         long longSelected = -1;
600         int intSelectedData = 0;
601     
602         if (lboBusinessTimezones->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTimezones,
603                 &longSelected,
604                 &intSelectedData)){
605                 
606                 return;
607                 
608         }
609     
610         lboBusinessTimezones->DeleteItem(longSelected);
611     
612         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
613                 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
614                 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
615                 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
616     
619 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
622         // Bring up the window for adding a geoposition location.
623     
624         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
625         frameCEGeo->SetEditorMode(FALSE, CE_WORK);
626         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
627                 &ContactEditorData.BusinessGeographyListAltID,
628                 &ContactEditorData.BusinessGeographyListPID,
629                 &ContactEditorData.BusinessGeographyListType,
630                 &ContactEditorData.BusinessGeographyListDataType,
631                 &ContactEditorData.BusinessGeographyListTokens,
632                 &ContactEditorData.BusinessGeographyListMediatype,
633                 &ContactEditorData.BusinessGeographyListPref,
634                 lboBusinessGeoposition,
635                 (intValueSeek));
636         frameCEGeo->ShowModal();
637         delete frameCEGeo;
638         frameCEGeo = NULL;
639         
642 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
645         // Bring up the window for editing a geoposition location.
647         long longSelected = -1;
648         int intSelectedData = 0;
649     
650         if (lboBusinessGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboBusinessGeoposition,
651                 &longSelected,
652                 &intSelectedData)){
653                 
654                 return;
655                 
656         }
657     
658         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
659         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
660                 &ContactEditorData.BusinessGeographyListAltID,
661                 &ContactEditorData.BusinessGeographyListPID,
662                 &ContactEditorData.BusinessGeographyListType,
663                 &ContactEditorData.BusinessGeographyListDataType,
664                 &ContactEditorData.BusinessGeographyListTokens,
665                 &ContactEditorData.BusinessGeographyListMediatype,
666                 &ContactEditorData.BusinessGeographyListPref,
667                 lboBusinessGeoposition,
668                 intSelectedData);
669         frameCEGeo->SetEditorMode(TRUE, CE_WORK);
670         frameCEGeo->ShowModal();
671         delete frameCEGeo;
672         frameCEGeo = NULL;
673         
676 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
679         // Bring up the window for deleting a geoposition location.
681         long longSelected = -1;
682         int intSelectedData = 0;
683     
684         if (lboBusinessGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboBusinessGeoposition,
685                 &longSelected,
686                 &intSelectedData)){
687                 
688                 return;
689                 
690         }
691     
692         lboBusinessGeoposition->DeleteItem(longSelected);
693     
694         DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
695                 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
696                 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
697                 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype, 
698                 &ContactEditorData.BusinessGeographyListPref);
702 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
705         // Bring up the window for adding a website.
706     
707         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
708         frameCEWeb->SetEditorMode(FALSE, CE_WORK);
709         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
710                 &ContactEditorData.BusinessWebsiteListAltID,
711                 &ContactEditorData.BusinessWebsiteListPID,
712                 &ContactEditorData.BusinessWebsiteListType,
713                 &ContactEditorData.BusinessWebsiteListTokens,
714                 &ContactEditorData.BusinessWebsiteListMediatype,
715                 &ContactEditorData.BusinessWebsiteListPref,
716                 lboBusinessWebsites,
717                 (intValueSeek));
718         frameCEWeb->ShowModal();
719         delete frameCEWeb;
720         frameCEWeb = NULL;
721         
724 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
727         // Bring up a window for editing a website.
729         long longSelected = -1;
730         int intSelectedData = 0;
731     
732         if (lboBusinessWebsites->GetItemCount() == 0 || !GetSelectedItem(lboBusinessWebsites,
733                 &longSelected,
734                 &intSelectedData)){
735                 
736                 return;
737                 
738         }
739     
740         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
741         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
742                 &ContactEditorData.BusinessWebsiteListAltID,
743                 &ContactEditorData.BusinessWebsiteListPID,
744                 &ContactEditorData.BusinessWebsiteListType,
745                 &ContactEditorData.BusinessWebsiteListTokens,
746                 &ContactEditorData.BusinessWebsiteListMediatype,
747                 &ContactEditorData.BusinessWebsiteListPref,
748                 lboBusinessWebsites,
749                 intSelectedData);
750         frameCEWeb->SetEditorMode(TRUE, CE_WORK);
751         frameCEWeb->ShowModal();
752         delete frameCEWeb;
753         frameCEWeb = NULL;
754         
757 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
760         // Bring up the window for deleting a website.
762         long longSelected = -1;
763         int intSelectedData = 0;
764     
765         if (lboBusinessWebsites->GetItemCount() == 0 || !GetSelectedItem(lboBusinessWebsites,
766                 &longSelected,
767                 &intSelectedData)){
768                 
769                 return;
770                 
771         }
772     
773         lboBusinessWebsites->DeleteItem(longSelected);
774     
775         DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
776                 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
777                 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
778                 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
779     
782 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
785         // Bring up the window for adding a title.
786     
787         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
788         frameCETitle->SetEditorMode(FALSE, CE_WORK);
789         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
790                 &ContactEditorData.BusinessTitleListLanguage,
791                 &ContactEditorData.BusinessTitleListAltID,
792                 &ContactEditorData.BusinessTitleListPID,
793                 &ContactEditorData.BusinessTitleListType,
794                 &ContactEditorData.BusinessTitleListTokens,
795                 &ContactEditorData.BusinessTitleListPref,
796                 lboBusinessTitles,
797                 (intValueSeek));
798         frameCETitle->ShowModal();
799         delete frameCETitle;
800         frameCETitle = NULL;
801         
804 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
807         // Bring up the window for editing a title.
809         long longSelected = -1;
810         int intSelectedData = 0;
811     
812         if (lboBusinessTitles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTitles,
813                 &longSelected,
814                 &intSelectedData)){
815                          
816                 return;
817                 
818         }
819     
820         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
821         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
822                 &ContactEditorData.BusinessTitleListLanguage,
823                 &ContactEditorData.BusinessTitleListAltID,
824                 &ContactEditorData.BusinessTitleListPID,
825                 &ContactEditorData.BusinessTitleListType,
826                 &ContactEditorData.BusinessTitleListTokens,
827                 &ContactEditorData.BusinessTitleListPref,
828                 lboBusinessTitles,
829                 intSelectedData);
830         frameCETitle->SetEditorMode(TRUE, CE_WORK);
831         frameCETitle->ShowModal();
832         delete frameCETitle;
833         frameCETitle = NULL;
834         
837 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
840         // Bring up the window to delete the title.
842         long longSelected = -1;
843         int intSelectedData = 0;
844     
845         if (lboBusinessTitles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTitles,
846                 &longSelected,
847                 &intSelectedData)){
848                 
849                 return;
850     
851         }
852     
853         lboBusinessTitles->DeleteItem(longSelected);
854     
855         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
856                 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
857                 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
858                 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
862 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
865         // Bring up the window to add a role.
866     
867         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
868         frameCERole->SetEditorMode(FALSE, CE_WORK);
869         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
870                 &ContactEditorData.BusinessRoleListLanguage,
871                 &ContactEditorData.BusinessRoleListAltID,
872                 &ContactEditorData.BusinessRoleListPID,
873                 &ContactEditorData.BusinessRoleListType,
874                 &ContactEditorData.BusinessRoleListTokens,
875                 &ContactEditorData.BusinessRoleListPref,
876                 lboBusinessRoles,
877                 (intValueSeek));
878         frameCERole->ShowModal();
879         delete frameCERole;
880         frameCERole = NULL;
881         
884 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
887         // Bring up the window for editing a role.
889         long longSelected = -1;
890         int intSelectedData = 0;
891     
892         if (lboBusinessRoles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessRoles,
893                 &longSelected,
894                 &intSelectedData)){
895                 
896                 return;
897                 
898         }
899     
900         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
901         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
902                 &ContactEditorData.BusinessRoleListLanguage,
903                 &ContactEditorData.BusinessRoleListAltID,
904                 &ContactEditorData.BusinessRoleListPID,
905                 &ContactEditorData.BusinessRoleListType,
906                 &ContactEditorData.BusinessRoleListTokens,
907                 &ContactEditorData.BusinessRoleListPref,
908                 lboBusinessRoles,
909                 intSelectedData);
910         frameCERole->SetEditorMode(TRUE, CE_WORK);
911         frameCERole->ShowModal();
912         delete frameCERole;
913         frameCERole = NULL;
914         
917 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
920         // Bring up the window to delete a role.
922         long longSelected = -1;
923         int intSelectedData = 0;
924     
925         if (lboBusinessRoles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessRoles,
926                 &longSelected,
927                 &intSelectedData)){
928                 
929                 return;
930                 
931         }
932     
933         lboBusinessRoles->DeleteItem(longSelected);
934     
935         DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
936                 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
937                 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
938                 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
939     
942 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
945         // Bring up the window to add an organisation.
947         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
948         frameCEOrg->SetEditorMode(FALSE, CE_WORK);
949         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
950                 &ContactEditorData.BusinessOrganisationsListLanguage,
951                 &ContactEditorData.BusinessOrganisationsListSortAs,
952                 &ContactEditorData.BusinessOrganisationsListAltID,
953                 &ContactEditorData.BusinessOrganisationsListPID,
954                 &ContactEditorData.BusinessOrganisationsListType,
955                 &ContactEditorData.BusinessOrganisationsListTokens,
956                 &ContactEditorData.BusinessOrganisationsListPref,
957                 lboBusinessOrganisations,
958                 (intValueSeek));
959         frameCEOrg->ShowModal();
960         delete frameCEOrg;
961         frameCEOrg = NULL;
962         
965 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
968         // Bring up the window to edit an organisation.
970         long longSelected = -1;
971         int intSelectedData = 0;
972     
973         if (lboBusinessOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboBusinessOrganisations,
974                 &longSelected,
975                 &intSelectedData)){
976                 
977                 return;
978                 
979         }
980     
981         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
982         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
983                 &ContactEditorData.BusinessOrganisationsListLanguage,
984                 &ContactEditorData.BusinessOrganisationsListSortAs,
985                 &ContactEditorData.BusinessOrganisationsListAltID,
986                 &ContactEditorData.BusinessOrganisationsListPID,
987                 &ContactEditorData.BusinessOrganisationsListType,
988                 &ContactEditorData.BusinessOrganisationsListTokens,
989                 &ContactEditorData.BusinessOrganisationsListPref,
990                 lboBusinessOrganisations,
991                 intSelectedData);
992         frameCEOrg->SetEditorMode(TRUE, CE_WORK);
993         frameCEOrg->ShowModal();
994         delete frameCEOrg;
995         frameCEOrg = NULL;
996         
999 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
1002         // Bring up the window to delete a organisation.
1004         long longSelected = -1;
1005         int intSelectedData = 0;
1006     
1007         if (lboBusinessOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboBusinessOrganisations,
1008                 &longSelected,
1009                 &intSelectedData)){
1010                 
1011                 return;
1012                 
1013         }
1014     
1015         lboBusinessOrganisations->DeleteItem(longSelected);
1016     
1017         DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
1018                 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
1019                 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
1020                 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
1021                 &ContactEditorData.BusinessOrganisationsListPref);
1022     
1025 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
1028         // Bring up the window to add a note.
1029     
1030         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1031         frameCENote->SetEditorMode(FALSE, CE_WORK);
1032         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1033                 &ContactEditorData.BusinessNoteListLanguage,
1034                 &ContactEditorData.BusinessNoteListAltID,
1035                 &ContactEditorData.BusinessNoteListPID,
1036                 &ContactEditorData.BusinessNoteListType,
1037                 &ContactEditorData.BusinessNoteListTokens,
1038                 &ContactEditorData.BusinessNoteListPref,
1039                 lboBusinessNotes,
1040                 (intValueSeek));
1041         frameCENote->ShowModal();
1042         delete frameCENote;
1043         frameCENote = NULL;
1044         
1047 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1050         // Bring up the window to edit a note.
1052         long longSelected = -1;
1053         int intSelectedData = 0;
1054     
1055         if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNotes,
1056                 &longSelected,
1057                 &intSelectedData)){
1058                 
1059                 return;
1060                 
1061         }
1062     
1063         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1064         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1065                 &ContactEditorData.BusinessNoteListLanguage,
1066                 &ContactEditorData.BusinessNoteListAltID,
1067                 &ContactEditorData.BusinessNoteListPID,
1068                 &ContactEditorData.BusinessNoteListType,
1069                 &ContactEditorData.BusinessNoteListTokens,
1070                 &ContactEditorData.BusinessNoteListPref,
1071                 lboBusinessNotes,
1072                 intSelectedData);
1073         frameCENote->SetEditorMode(TRUE, CE_WORK);
1074         frameCENote->ShowModal();
1075         delete frameCENote;
1076         frameCENote = NULL;
1077         
1080 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1083         // Bring up the window to delete a note.
1085         long longSelected = -1;
1086         int intSelectedData = 0;
1087     
1088         if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNotes,
1089                 &longSelected,
1090                 &intSelectedData)){
1091                 
1092                 return;
1093                 
1094         }
1095     
1096         lboBusinessNotes->DeleteItem(longSelected);
1097     
1098         DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1099                 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1100                 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1101                 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);
1102     
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy