Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added comments to describe functions in contacteditor/frmContactEditor-Business.cpp
[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.
41         int intResult = 0;
42     
43         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
44         frameCENickname->SetEditorMode(FALSE, CE_WORK);
45         intResult = GetLastInt(&ContactEditorData.BusinessNicknamesList);
46         frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
47                 &ContactEditorData.BusinessNicknamesListAltID,
48                 &ContactEditorData.BusinessNicknamesListPID,
49                 &ContactEditorData.BusinessNicknamesListType,
50                 &ContactEditorData.BusinessNicknamesListLanguage,
51                 &ContactEditorData.BusinessNicknamesListTokens,
52                 &ContactEditorData.BusinessNicknamesListPref,
53                 lboBusinessNicknames,
54                 (intValueSeek));
55         frameCENickname->ShowModal();
56         delete frameCENickname;
57         frameCENickname = NULL;
58         
59 }
61 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
62 {
64         // Bring up the window for modifying a nickname.
66         long longSelected = -1;
67         int intSelectedData = 0;
68     
69         if (!GetSelectedItem(lboBusinessNicknames,
70                 &longSelected,
71                 &intSelectedData)){
72                 
73                 return;
74                 
75         }
76     
77         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
78         frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
79                 &ContactEditorData.BusinessNicknamesListAltID,
80                 &ContactEditorData.BusinessNicknamesListPID,
81                 &ContactEditorData.BusinessNicknamesListType,
82                 &ContactEditorData.BusinessNicknamesListLanguage,
83                 &ContactEditorData.BusinessNicknamesListTokens,
84                 &ContactEditorData.BusinessNicknamesListPref,
85                 lboBusinessNicknames,
86                 intSelectedData);
87         frameCENickname->SetEditorMode(TRUE, CE_WORK);
88         frameCENickname->ShowModal();
89         delete frameCENickname;
90         frameCENickname = NULL;
91         
92 }
94 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
95 {
97         // Bring up the window to delete the nickname.
99         long longSelected = -1;
100         int intSelectedData = 0;
101     
102         if (!GetSelectedItem(lboBusinessNicknames,
103                 &longSelected,
104                 &intSelectedData)){
105                 
106                 return;
107                 
108         }
109     
110         lboBusinessNicknames->DeleteItem(longSelected);
111     
112         DeleteMapData(intSelectedData,
113                 &ContactEditorData.BusinessNicknamesList,
114                 &ContactEditorData.BusinessNicknamesListLanguage,
115                 &ContactEditorData.BusinessNicknamesListAltID,
116                 &ContactEditorData.BusinessNicknamesListPID,
117                 &ContactEditorData.BusinessNicknamesListTokens,
118                 &ContactEditorData.BusinessNicknamesListType,
119                 &ContactEditorData.BusinessNicknamesListPref);
123 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
126         // Bring up the window for adding an address.
128         int intResult = 0;
129     
130         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
131         frameCEAddress->SetEditorMode(FALSE, CE_WORK);
132         intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
133         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
134                 &ContactEditorData.BusinessAddressListTown,
135                 &ContactEditorData.BusinessAddressListCounty,
136                 &ContactEditorData.BusinessAddressListPostCode,
137                 &ContactEditorData.BusinessAddressListCountry,
138                 &ContactEditorData.BusinessAddressListLabel,
139                 &ContactEditorData.BusinessAddressListLang,
140                 &ContactEditorData.BusinessAddressListAltID,
141                 &ContactEditorData.BusinessAddressListPID,
142                 &ContactEditorData.BusinessAddressListTokens,
143                 &ContactEditorData.BusinessAddressListGeo,
144                 &ContactEditorData.BusinessAddressListTimezone,
145                 &ContactEditorData.BusinessAddressListType,
146                 &ContactEditorData.BusinessAddressListMediatype,
147                 &ContactEditorData.BusinessAddressListPref,
148                 lboBusinessAddresses,
149                 (intValueSeek));
150         frameCEAddress->ShowModal();
151         delete frameCEAddress;
152         frameCEAddress = NULL;
153         
156 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
159         // Bring up a window for editing an address.
161         long longSelected = -1;
162         int intSelectedData = 0;
163     
164         if (!GetSelectedItem(lboBusinessAddresses,
165                 &longSelected,
166                 &intSelectedData)){
167                 
168                 return;
169                 
170         }
171     
172         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
173         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
174                 &ContactEditorData.BusinessAddressListTown,
175                 &ContactEditorData.BusinessAddressListCounty,
176                 &ContactEditorData.BusinessAddressListPostCode,
177                 &ContactEditorData.BusinessAddressListCountry,
178                 &ContactEditorData.BusinessAddressListLabel,
179                 &ContactEditorData.BusinessAddressListLang,
180                 &ContactEditorData.BusinessAddressListAltID,
181                 &ContactEditorData.BusinessAddressListPID,
182                 &ContactEditorData.BusinessAddressListTokens,
183                 &ContactEditorData.BusinessAddressListGeo,
184                 &ContactEditorData.BusinessAddressListTimezone,
185                 &ContactEditorData.BusinessAddressListType,
186                 &ContactEditorData.BusinessAddressListMediatype,
187                 &ContactEditorData.BusinessAddressListPref,
188                 lboBusinessAddresses,
189                 intSelectedData);
190         frameCEAddress->SetEditorMode(TRUE, CE_WORK);
191         frameCEAddress->ShowModal();
192         delete frameCEAddress;
193         frameCEAddress = NULL;
194         
197 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
200         // Bring up the window for deleting the address.
202         long longSelected = -1;
203         int intSelectedData = 0;
204     
205         if (!GetSelectedItem(lboBusinessAddresses,
206                 &longSelected,
207                 &intSelectedData)){
208                 
209                 return;
210                 
211         }
212     
213         lboBusinessAddresses->DeleteItem(longSelected);
214         DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
215                 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
216                 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
217                 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
218                 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
219                 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
220                 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
221                 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
222                 &ContactEditorData.BusinessAddressListPref);
223     
226 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
229         // Bring up the window for adding an email address.
231         int intResult = 0;
232     
233         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
234         frameCEEmail->SetEditorMode(FALSE, CE_WORK);
235         intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
236         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
237                 &ContactEditorData.BusinessEmailListAltID,
238                 &ContactEditorData.BusinessEmailListPID,
239                 &ContactEditorData.BusinessEmailListType,
240                 &ContactEditorData.BusinessEmailListTokens,
241                 &ContactEditorData.BusinessEmailListPref,
242                 lboBusinessEmail,
243                 (intValueSeek));
244         frameCEEmail->ShowModal();
245         delete frameCEEmail;
246         frameCEEmail = NULL;
247         
250 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
253         // Bring up the window for modifying the email address.
255         long longSelected = -1;
256         int intSelectedData = 0;
257     
258         if (!GetSelectedItem(lboBusinessEmail,
259                 &longSelected,
260                 &intSelectedData)){
261                 
262                 return;
263                 
264         }
265     
266         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
267         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
268                 &ContactEditorData.BusinessEmailListAltID,
269                 &ContactEditorData.BusinessEmailListPID,
270                 &ContactEditorData.BusinessEmailListType,
271                 &ContactEditorData.BusinessEmailListTokens,
272                 &ContactEditorData.BusinessEmailListPref,
273                 lboBusinessEmail,
274                 intSelectedData);
275         frameCEEmail->SetEditorMode(TRUE, CE_WORK);
276         frameCEEmail->ShowModal();
277         delete frameCEEmail;
278         frameCEEmail = NULL;
279         
282 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
285         // Bring up the window to delete the email address.
287         long longSelected = -1;
288         int intSelectedData = 0;
289     
290         if (!GetSelectedItem(lboBusinessEmail,
291                          &longSelected,
292                          &intSelectedData)){
293                          
294                 return;
295                 
296         }
297     
298         lboBusinessEmail->DeleteItem(longSelected);
299     
300         DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
301                 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
302                 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
303                 &ContactEditorData.BusinessEmailListPref);
304     
307 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
310         // Bring up the window for adding an IM address.
312         int intResult = 0;
313     
314         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
315         frameCEIM->SetEditorMode(FALSE, CE_WORK);
316         intResult = GetLastInt(&ContactEditorData.BusinessIMList);
317         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
318                 &ContactEditorData.BusinessIMListAltID,
319                 &ContactEditorData.BusinessIMListPID,
320                 &ContactEditorData.BusinessIMListType,
321                 &ContactEditorData.BusinessIMListTypeInfo,
322                 &ContactEditorData.BusinessIMListTokens,
323                 &ContactEditorData.BusinessIMListMediatype,
324                 &ContactEditorData.BusinessIMListPref,
325                 lboBusinessIM,
326                 (intValueSeek));
327         frameCEIM->ShowModal();
328         delete frameCEIM;
329         frameCEIM = NULL;
330         
333 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
336         // Bring up the window for editing an IM address.
338         long longSelected = -1;
339         int intSelectedData = 0;
340     
341         if (!GetSelectedItem(lboBusinessIM,
342                 &longSelected,
343                 &intSelectedData)){
344                 
345                 return;
346                 
347         }
348     
349         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
350         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
351                 &ContactEditorData.BusinessIMListAltID,
352                 &ContactEditorData.BusinessIMListPID,
353                 &ContactEditorData.BusinessIMListType,
354                 &ContactEditorData.BusinessIMListTypeInfo,
355                 &ContactEditorData.BusinessIMListTokens,
356                 &ContactEditorData.BusinessIMListMediatype,
357                 &ContactEditorData.BusinessIMListPref,
358                 lboBusinessIM,
359                 intSelectedData);
360         frameCEIM->SetEditorMode(TRUE, CE_WORK);
361         frameCEIM->ShowModal();
362         delete frameCEIM;
363         frameCEIM = NULL;
364         
367 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
370         // Bring up the window for deleting an IM address.
372         long longSelected = -1;
373         int intSelectedData = 0;
374     
375         if (!GetSelectedItem(lboBusinessIM,
376                 &longSelected,
377                 &intSelectedData)){
378                 
379                 return;
380                 
381         }
382     
383         lboBusinessIM->DeleteItem(longSelected);
384     
385         DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
386                 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
387                 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
388                 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype, 
389                 &ContactEditorData.BusinessIMListPref);
390     
393 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
396         // Bring up the window for adding a telephone number.
398         int intResult = 0;
399     
400         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
401         frameCETel->SetEditorMode(FALSE, CE_WORK);
402         intResult = GetLastInt(&ContactEditorData.BusinessTelephoneList);
403         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
404                 &ContactEditorData.BusinessTelephoneListAltID,
405                 &ContactEditorData.BusinessTelephoneListPID,
406                 &ContactEditorData.BusinessTelephoneListType,
407                 &ContactEditorData.BusinessTelephoneListTypeInfo,
408                 &ContactEditorData.BusinessTelephoneListTokens,
409                 &ContactEditorData.BusinessTelephoneListPref,
410                 lboBusinessTelephone,
411                 (intValueSeek));
412         frameCETel->ShowModal();
413         delete frameCETel;
414         frameCETel = NULL;
415         
418 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
421         // Bring up the address for editing a telephone number.
423         long longSelected = -1;
424         int intSelectedData = 0;
425     
426         if (!GetSelectedItem(lboBusinessTelephone,
427                 &longSelected,
428                 &intSelectedData)){
429                 
430                 return;
431                 
432         }
433     
434         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
435         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
436                 &ContactEditorData.BusinessTelephoneListAltID,
437                 &ContactEditorData.BusinessTelephoneListPID,
438                 &ContactEditorData.BusinessTelephoneListType,
439                 &ContactEditorData.BusinessTelephoneListTypeInfo,
440                 &ContactEditorData.BusinessTelephoneListTokens,
441                 &ContactEditorData.BusinessTelephoneListPref,
442                 lboBusinessTelephone,
443                 intSelectedData);
444         frameCETel->SetEditorMode(TRUE, CE_WORK);
445         frameCETel->ShowModal();
446         delete frameCETel;
447         frameCETel = NULL;
448         
451 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
454         // Bring up the window for deleting a telephone number.
456         long longSelected = -1;
457         int intSelectedData = 0;
458     
459         if (!GetSelectedItem(lboBusinessTelephone,
460                 &longSelected,
461                 &intSelectedData)){
462                 
463                 return;
464         
465         }
466     
467         lboBusinessTelephone->DeleteItem(longSelected);
468     
469         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
470                 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
471                 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
472                 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
473     
476 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
479         // Bring up the window for adding a language.
481         int intResult = 0;
482     
483         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
484         frameCELang->SetEditorMode(FALSE, CE_WORK);
485         intResult = GetLastInt(&ContactEditorData.BusinessLanguageList);
486         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
487                 &ContactEditorData.BusinessLanguageListAltID,
488                 &ContactEditorData.BusinessLanguageListPID,
489                 &ContactEditorData.BusinessLanguageListType,
490                 &ContactEditorData.BusinessLanguageListTokens,
491                 &ContactEditorData.BusinessLanguageListPref,
492                 lboBusinessLanguages,
493                 (intValueSeek));
494         frameCELang->ShowModal();
495         delete frameCELang;
496         frameCELang = NULL;
497         
500 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
503         // Bring up the window for editing a language.
505         long longSelected = -1;
506         int intSelectedData = 0;
507     
508         if (!GetSelectedItem(lboBusinessLanguages,
509                 &longSelected,
510                 &intSelectedData)){
511                 
512                 return;
513                 
514         }
515     
516         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
517         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
518                 &ContactEditorData.BusinessLanguageListAltID,
519                 &ContactEditorData.BusinessLanguageListPID,
520                 &ContactEditorData.BusinessLanguageListType,
521                 &ContactEditorData.BusinessLanguageListTokens,
522                 &ContactEditorData.BusinessLanguageListPref,
523                 lboBusinessLanguages,
524                 intSelectedData);
525         frameCELang->SetEditorMode(TRUE, CE_WORK);
526         frameCELang->ShowModal();
527         delete frameCELang;
528         frameCELang = NULL;
529         
532 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
535         // Bring up the window for deleting a language.
537         long longSelected = -1;
538         int intSelectedData = 0;
539     
540         if (!GetSelectedItem(lboBusinessLanguages,
541                 &longSelected,
542                 &intSelectedData)){
543                          
544                 return;
545                 
546         }
547     
548         lboBusinessLanguages->DeleteItem(longSelected);
549     
550         DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
551                 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
552                 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
553                 &ContactEditorData.BusinessLanguageListPref);
554     
557 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
560         // Bring up the window for adding a timezone.
562         int intResult = 0;
563     
564         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
565         frameCETZ->SetEditorMode(FALSE, CE_WORK);
566         intResult = GetLastInt(&ContactEditorData.BusinessTZList);
567         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
568                 &ContactEditorData.BusinessTZListAltID,
569                 &ContactEditorData.BusinessTZListPID,
570                 &ContactEditorData.BusinessTZListType,
571                 &ContactEditorData.BusinessTZListTokens,
572                 &ContactEditorData.BusinessTZListMediatype,
573                 &ContactEditorData.BusinessTZListPref,
574                 lboBusinessTimezones,
575                 (intValueSeek));
576         frameCETZ->ShowModal();
577         delete frameCETZ;
578         frameCETZ = NULL;
579         
582 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
585         // Bring up the window for modifying a timezone.
587         long longSelected = -1;
588         int intSelectedData = 0;
589     
590         if (!GetSelectedItem(lboBusinessTimezones,
591                 &longSelected,
592                 &intSelectedData)){
593                 
594                 return;
595                 
596         }
597     
598         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
599         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
600                 &ContactEditorData.BusinessTZListAltID,
601                 &ContactEditorData.BusinessTZListPID,
602                 &ContactEditorData.BusinessTZListType,
603                 &ContactEditorData.BusinessTZListTokens,
604                 &ContactEditorData.BusinessTZListMediatype,
605                 &ContactEditorData.BusinessTZListPref,
606                 lboBusinessTimezones,
607                 intSelectedData);
608         frameCETZ->SetEditorMode(TRUE, CE_WORK);
609         frameCETZ->ShowModal();
610         delete frameCETZ;
611         frameCETZ = NULL;
612         
615 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
618         // Bring up the window for deleting a timezone.
620         long longSelected = -1;
621         int intSelectedData = 0;
622     
623         if (!GetSelectedItem(lboBusinessTimezones,
624                 &longSelected,
625                 &intSelectedData)){
626                 
627                 return;
628                 
629         }
630     
631         lboBusinessTimezones->DeleteItem(longSelected);
632     
633         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
634                 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
635                 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
636                 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
637     
640 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
643         // Bring up the window for adding a geoposition location.
645         int intResult = 0;
646     
647         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
648         frameCEGeo->SetEditorMode(FALSE, CE_WORK);
649         intResult = GetLastInt(&ContactEditorData.BusinessGeographyList);
650         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
651                 &ContactEditorData.BusinessGeographyListAltID,
652                 &ContactEditorData.BusinessGeographyListPID,
653                 &ContactEditorData.BusinessGeographyListType,
654                 &ContactEditorData.BusinessGeographyListDataType,
655                 &ContactEditorData.BusinessGeographyListTokens,
656                 &ContactEditorData.BusinessGeographyListMediatype,
657                 &ContactEditorData.BusinessGeographyListPref,
658                 lboBusinessGeoposition,
659                 (intValueSeek));
660         frameCEGeo->ShowModal();
661         delete frameCEGeo;
662         frameCEGeo = NULL;
663         
666 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
669         // Bring up the window for editing a geoposition location.
671         long longSelected = -1;
672         int intSelectedData = 0;
673     
674         if (!GetSelectedItem(lboBusinessGeoposition,
675                 &longSelected,
676                 &intSelectedData)){
677                 
678                 return;
679                 
680         }
681     
682         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
683         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
684                 &ContactEditorData.BusinessGeographyListAltID,
685                 &ContactEditorData.BusinessGeographyListPID,
686                 &ContactEditorData.BusinessGeographyListType,
687                 &ContactEditorData.BusinessGeographyListDataType,
688                 &ContactEditorData.BusinessGeographyListTokens,
689                 &ContactEditorData.BusinessGeographyListMediatype,
690                 &ContactEditorData.BusinessGeographyListPref,
691                 lboBusinessGeoposition,
692                 intSelectedData);
693         frameCEGeo->SetEditorMode(TRUE, CE_WORK);
694         frameCEGeo->ShowModal();
695         delete frameCEGeo;
696         frameCEGeo = NULL;
697         
700 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
703         // Bring up the window for deleting a geoposition location.
705         long longSelected = -1;
706         int intSelectedData = 0;
707     
708         if (!GetSelectedItem(lboBusinessGeoposition,
709                 &longSelected,
710                 &intSelectedData)){
711                 
712                 return;
713                 
714         }
715     
716         lboBusinessGeoposition->DeleteItem(longSelected);
717     
718         DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
719                 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
720                 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
721                 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype, 
722                 &ContactEditorData.BusinessGeographyListPref);
726 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
729         // Bring up the window for adding a website.
731         int intResult = 0;
732     
733         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
734         frameCEWeb->SetEditorMode(FALSE, CE_WORK);
735         intResult = GetLastInt(&ContactEditorData.BusinessWebsiteList);
736         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
737                 &ContactEditorData.BusinessWebsiteListAltID,
738                 &ContactEditorData.BusinessWebsiteListPID,
739                 &ContactEditorData.BusinessWebsiteListType,
740                 &ContactEditorData.BusinessWebsiteListTokens,
741                 &ContactEditorData.BusinessWebsiteListMediatype,
742                 &ContactEditorData.BusinessWebsiteListPref,
743                 lboBusinessWebsites,
744                 (intValueSeek));
745         frameCEWeb->ShowModal();
746         delete frameCEWeb;
747         frameCEWeb = NULL;
748         
751 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
754         // Bring up a window for editing a website.
756         long longSelected = -1;
757         int intSelectedData = 0;
758     
759         if (!GetSelectedItem(lboBusinessWebsites,
760                 &longSelected,
761                 &intSelectedData)){
762                 
763                 return;
764                 
765         }
766     
767         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
768         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
769                 &ContactEditorData.BusinessWebsiteListAltID,
770                 &ContactEditorData.BusinessWebsiteListPID,
771                 &ContactEditorData.BusinessWebsiteListType,
772                 &ContactEditorData.BusinessWebsiteListTokens,
773                 &ContactEditorData.BusinessWebsiteListMediatype,
774                 &ContactEditorData.BusinessWebsiteListPref,
775                 lboBusinessWebsites,
776                 intSelectedData);
777         frameCEWeb->SetEditorMode(TRUE, CE_WORK);
778         frameCEWeb->ShowModal();
779         delete frameCEWeb;
780         frameCEWeb = NULL;
781         
784 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
787         // Bring up the window for deleting a website.
789         long longSelected = -1;
790         int intSelectedData = 0;
791     
792         if (!GetSelectedItem(lboBusinessWebsites,
793                 &longSelected,
794                 &intSelectedData)){
795                 
796                 return;
797                 
798         }
799     
800         lboBusinessWebsites->DeleteItem(longSelected);
801     
802         DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
803                 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
804                 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
805                 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
806     
809 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
812         // Bring up the window for adding a title.
814         int intResult = 0;
815     
816         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
817         frameCETitle->SetEditorMode(FALSE, CE_WORK);
818         intResult = GetLastInt(&ContactEditorData.BusinessTitleList);
819         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
820                 &ContactEditorData.BusinessTitleListLanguage,
821                 &ContactEditorData.BusinessTitleListAltID,
822                 &ContactEditorData.BusinessTitleListPID,
823                 &ContactEditorData.BusinessTitleListType,
824                 &ContactEditorData.BusinessTitleListTokens,
825                 &ContactEditorData.BusinessTitleListPref,
826                 lboBusinessTitles,
827                 (intValueSeek));
828         frameCETitle->ShowModal();
829         delete frameCETitle;
830         frameCETitle = NULL;
831         
834 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
837         // Bring up the window for editing a title.
839         long longSelected = -1;
840         int intSelectedData = 0;
841     
842         if (!GetSelectedItem(lboBusinessTitles,
843                 &longSelected,
844                 &intSelectedData)){
845                          
846                 return;
847                 
848         }
849     
850         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
851         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
852                 &ContactEditorData.BusinessTitleListLanguage,
853                 &ContactEditorData.BusinessTitleListAltID,
854                 &ContactEditorData.BusinessTitleListPID,
855                 &ContactEditorData.BusinessTitleListType,
856                 &ContactEditorData.BusinessTitleListTokens,
857                 &ContactEditorData.BusinessTitleListPref,
858                 lboBusinessTitles,
859                 intSelectedData);
860         frameCETitle->SetEditorMode(TRUE, CE_WORK);
861         frameCETitle->ShowModal();
862         delete frameCETitle;
863         frameCETitle = NULL;
864         
867 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
870         // Bring up the window to delete the title.
872         long longSelected = -1;
873         int intSelectedData = 0;
874     
875         if (!GetSelectedItem(lboBusinessTitles,
876                 &longSelected,
877                 &intSelectedData)){
878                 
879                 return;
880     
881         }
882     
883         lboTitles->DeleteItem(longSelected);
884     
885         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
886                 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
887                 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
888                 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
892 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
895         // Bring up the window to add a role.
897         int intResult = 0;
898     
899         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
900         frameCERole->SetEditorMode(FALSE, CE_WORK);
901         intResult = GetLastInt(&ContactEditorData.BusinessRoleList);
902         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
903                 &ContactEditorData.BusinessRoleListLanguage,
904                 &ContactEditorData.BusinessRoleListAltID,
905                 &ContactEditorData.BusinessRoleListPID,
906                 &ContactEditorData.BusinessRoleListType,
907                 &ContactEditorData.BusinessRoleListTokens,
908                 &ContactEditorData.BusinessRoleListPref,
909                 lboBusinessRoles,
910                 (intValueSeek));
911         frameCERole->ShowModal();
912         delete frameCERole;
913         frameCERole = NULL;
914         
917 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
920         // Bring up the window for editing a role.
922         long longSelected = -1;
923         int intSelectedData = 0;
924     
925         if (!GetSelectedItem(lboBusinessRoles,
926                 &longSelected,
927                 &intSelectedData)){
928                 
929                 return;
930                 
931         }
932     
933         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
934         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
935                 &ContactEditorData.BusinessRoleListLanguage,
936                 &ContactEditorData.BusinessRoleListAltID,
937                 &ContactEditorData.BusinessRoleListPID,
938                 &ContactEditorData.BusinessRoleListType,
939                 &ContactEditorData.BusinessRoleListTokens,
940                 &ContactEditorData.BusinessRoleListPref,
941                 lboBusinessRoles,
942                 intSelectedData);
943         frameCERole->SetEditorMode(TRUE, CE_WORK);
944         frameCERole->ShowModal();
945         delete frameCERole;
946         frameCERole = NULL;
947         
950 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
953         // Bring up the window to delete a role.
955         long longSelected = -1;
956         int intSelectedData = 0;
957     
958         if (!GetSelectedItem(lboBusinessRoles,
959                 &longSelected,
960                 &intSelectedData)){
961                 
962                 return;
963                 
964         }
965     
966         lboBusinessRoles->DeleteItem(longSelected);
967     
968         DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
969                 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
970                 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
971                 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
972     
975 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
978         // Bring up the window to add an organisation.
980         int intResult = 0;
981     
982         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
983         frameCEOrg->SetEditorMode(FALSE, CE_WORK);
984         intResult = GetLastInt(&ContactEditorData.BusinessOrganisationsList);
985         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
986                 &ContactEditorData.BusinessOrganisationsListLanguage,
987                 &ContactEditorData.BusinessOrganisationsListSortAs,
988                 &ContactEditorData.BusinessOrganisationsListAltID,
989                 &ContactEditorData.BusinessOrganisationsListPID,
990                 &ContactEditorData.BusinessOrganisationsListType,
991                 &ContactEditorData.BusinessOrganisationsListTokens,
992                 &ContactEditorData.BusinessOrganisationsListPref,
993                 lboBusinessOrganisations,
994                 (intValueSeek));
995         frameCEOrg->ShowModal();
996         delete frameCEOrg;
997         frameCEOrg = NULL;
998         
1001 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
1004         // Bring up the window to edit an organisation.
1006         long longSelected = -1;
1007         int intSelectedData = 0;
1008     
1009         if (!GetSelectedItem(lboBusinessOrganisations,
1010                 &longSelected,
1011                 &intSelectedData)){
1012                 
1013                 return;
1014                 
1015         }
1016     
1017         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
1018         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
1019                 &ContactEditorData.BusinessOrganisationsListLanguage,
1020                 &ContactEditorData.BusinessOrganisationsListSortAs,
1021                 &ContactEditorData.BusinessOrganisationsListAltID,
1022                 &ContactEditorData.BusinessOrganisationsListPID,
1023                 &ContactEditorData.BusinessOrganisationsListType,
1024                 &ContactEditorData.BusinessOrganisationsListTokens,
1025                 &ContactEditorData.BusinessOrganisationsListPref,
1026                 lboBusinessOrganisations,
1027                 intSelectedData);
1028         frameCEOrg->SetEditorMode(TRUE, CE_WORK);
1029         frameCEOrg->ShowModal();
1030         delete frameCEOrg;
1031         frameCEOrg = NULL;
1032         
1035 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
1038         // Bring up the window to delete a organisation.
1040         long longSelected = -1;
1041         int intSelectedData = 0;
1042     
1043         if (!GetSelectedItem(lboBusinessOrganisations,
1044                 &longSelected,
1045                 &intSelectedData)){
1046                 
1047                 return;
1048                 
1049         }
1050     
1051         lboBusinessOrganisations->DeleteItem(longSelected);
1052     
1053         DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
1054                 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
1055                 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
1056                 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
1057                 &ContactEditorData.BusinessOrganisationsListPref);
1058     
1061 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
1064         // Bring up the window to add a note.
1066         int intResult = 0;
1067     
1068         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1069         frameCENote->SetEditorMode(FALSE, CE_WORK);
1070         intResult = GetLastInt(&ContactEditorData.BusinessNoteList);
1071         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1072                 &ContactEditorData.BusinessNoteListLanguage,
1073                 &ContactEditorData.BusinessNoteListAltID,
1074                 &ContactEditorData.BusinessNoteListPID,
1075                 &ContactEditorData.BusinessNoteListType,
1076                 &ContactEditorData.BusinessNoteListTokens,
1077                 &ContactEditorData.BusinessNoteListPref,
1078                 lboBusinessNotes,
1079                 (intValueSeek));
1080         frameCENote->ShowModal();
1081         delete frameCENote;
1082         frameCENote = NULL;
1083         
1086 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1089         // Bring up the window to edit a note.
1091         long longSelected = -1;
1092         int intSelectedData = 0;
1093     
1094         if (!GetSelectedItem(lboBusinessNotes,
1095                 &longSelected,
1096                 &intSelectedData)){
1097                 
1098                 return;
1099                 
1100         }
1101     
1102         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1103         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1104                 &ContactEditorData.BusinessNoteListLanguage,
1105                 &ContactEditorData.BusinessNoteListAltID,
1106                 &ContactEditorData.BusinessNoteListPID,
1107                 &ContactEditorData.BusinessNoteListType,
1108                 &ContactEditorData.BusinessNoteListTokens,
1109                 &ContactEditorData.BusinessNoteListPref,
1110                 lboBusinessNotes,
1111                 intSelectedData);
1112         frameCENote->SetEditorMode(TRUE, CE_WORK);
1113         frameCENote->ShowModal();
1114         delete frameCENote;
1115         frameCENote = NULL;
1116         
1119 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1122         // Bring up the window to delete a note.
1124         long longSelected = -1;
1125         int intSelectedData = 0;
1126     
1127         if (!GetSelectedItem(lboBusinessNotes,
1128                 &longSelected,
1129                 &intSelectedData)){
1130                 
1131                 return;
1132                 
1133         }
1134     
1135         lboBusinessNotes->DeleteItem(longSelected);
1136     
1137         DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1138                 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1139                 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1140                 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);
1141     
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