Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
frmContactEditor: Fix issue with intValueSeek not being incremented properly
[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     intValueSeek++;
57 }
59 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
60 {
62         // Bring up the window for modifying a nickname.
64         long longSelected = -1;
65         int intSelectedData = 0;
66     
67         if (lboBusinessNicknames->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNicknames,
68                 &longSelected,
69                 &intSelectedData)){
70                 
71                 return;
72                 
73         }
74     
75         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
76         frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
77                 &ContactEditorData.BusinessNicknamesListAltID,
78                 &ContactEditorData.BusinessNicknamesListPID,
79                 &ContactEditorData.BusinessNicknamesListType,
80                 &ContactEditorData.BusinessNicknamesListLanguage,
81                 &ContactEditorData.BusinessNicknamesListTokens,
82                 &ContactEditorData.BusinessNicknamesListPref,
83                 lboBusinessNicknames,
84                 intSelectedData);
85         frameCENickname->SetEditorMode(TRUE, CE_WORK);
86         frameCENickname->ShowModal();
87         delete frameCENickname;
88         frameCENickname = NULL;
89         
90 }
92 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
93 {
95         // Bring up the window to delete the nickname.
97         long longSelected = -1;
98         int intSelectedData = 0;
99     
100         if (lboBusinessNicknames->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNicknames,
101                 &longSelected,
102                 &intSelectedData)){
103                 
104                 return;
105                 
106         }
107     
108         lboBusinessNicknames->DeleteItem(longSelected);
109     
110         DeleteMapData(intSelectedData,
111                 &ContactEditorData.BusinessNicknamesList,
112                 &ContactEditorData.BusinessNicknamesListLanguage,
113                 &ContactEditorData.BusinessNicknamesListAltID,
114                 &ContactEditorData.BusinessNicknamesListPID,
115                 &ContactEditorData.BusinessNicknamesListTokens,
116                 &ContactEditorData.BusinessNicknamesListType,
117                 &ContactEditorData.BusinessNicknamesListPref);
121 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
124         // Bring up the window for adding an address.
125     
126         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
127         frameCEAddress->SetEditorMode(FALSE, CE_WORK);
128         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
129                 &ContactEditorData.BusinessAddressListTown,
130                 &ContactEditorData.BusinessAddressListCounty,
131                 &ContactEditorData.BusinessAddressListPostCode,
132                 &ContactEditorData.BusinessAddressListCountry,
133                 &ContactEditorData.BusinessAddressListLabel,
134                 &ContactEditorData.BusinessAddressListLang,
135                 &ContactEditorData.BusinessAddressListAltID,
136                 &ContactEditorData.BusinessAddressListPID,
137                 &ContactEditorData.BusinessAddressListTokens,
138                 &ContactEditorData.BusinessAddressListGeo,
139                 &ContactEditorData.BusinessAddressListTimezone,
140                 &ContactEditorData.BusinessAddressListType,
141                 &ContactEditorData.BusinessAddressListMediatype,
142                 &ContactEditorData.BusinessAddressListPref,
143                 lboBusinessAddresses,
144                 (intValueSeek));
145         frameCEAddress->ShowModal();
146         delete frameCEAddress;
147         frameCEAddress = NULL;
148     intValueSeek++;
152 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
155         // Bring up a window for editing an address.
157         long longSelected = -1;
158         int intSelectedData = 0;
159     
160         if (lboBusinessAddresses->GetItemCount() == 0 || !GetSelectedItem(lboBusinessAddresses,
161                 &longSelected,
162                 &intSelectedData)){
163                 
164                 return;
165                 
166         }
167     
168         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
169         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
170                 &ContactEditorData.BusinessAddressListTown,
171                 &ContactEditorData.BusinessAddressListCounty,
172                 &ContactEditorData.BusinessAddressListPostCode,
173                 &ContactEditorData.BusinessAddressListCountry,
174                 &ContactEditorData.BusinessAddressListLabel,
175                 &ContactEditorData.BusinessAddressListLang,
176                 &ContactEditorData.BusinessAddressListAltID,
177                 &ContactEditorData.BusinessAddressListPID,
178                 &ContactEditorData.BusinessAddressListTokens,
179                 &ContactEditorData.BusinessAddressListGeo,
180                 &ContactEditorData.BusinessAddressListTimezone,
181                 &ContactEditorData.BusinessAddressListType,
182                 &ContactEditorData.BusinessAddressListMediatype,
183                 &ContactEditorData.BusinessAddressListPref,
184                 lboBusinessAddresses,
185                 intSelectedData);
186         frameCEAddress->SetEditorMode(TRUE, CE_WORK);
187         frameCEAddress->ShowModal();
188         delete frameCEAddress;
189         frameCEAddress = NULL;
190         
193 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
196         // Bring up the window for deleting the address.
198         long longSelected = -1;
199         int intSelectedData = 0;
200     
201         if (lboBusinessAddresses->GetItemCount() == 0 || !GetSelectedItem(lboBusinessAddresses,
202                 &longSelected,
203                 &intSelectedData)){
204                 
205                 return;
206                 
207         }
208     
209         lboBusinessAddresses->DeleteItem(longSelected);
210         DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
211                 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
212                 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
213                 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
214                 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
215                 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
216                 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
217                 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
218                 &ContactEditorData.BusinessAddressListPref);
219     
222 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
225         // Bring up the window for adding an email address.
226     
227         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
228         frameCEEmail->SetEditorMode(FALSE, CE_WORK);
229         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
230                 &ContactEditorData.BusinessEmailListAltID,
231                 &ContactEditorData.BusinessEmailListPID,
232                 &ContactEditorData.BusinessEmailListType,
233                 &ContactEditorData.BusinessEmailListTokens,
234                 &ContactEditorData.BusinessEmailListPref,
235                 lboBusinessEmail,
236                 (intValueSeek));
237         frameCEEmail->ShowModal();
238         delete frameCEEmail;
239         frameCEEmail = NULL;
240     intValueSeek++;
244 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
247         // Bring up the window for modifying the email address.
249         long longSelected = -1;
250         int intSelectedData = 0;
251     
252         if (lboBusinessEmail->GetItemCount() == 0 || !GetSelectedItem(lboBusinessEmail,
253                 &longSelected,
254                 &intSelectedData)){
255                 
256                 return;
257                 
258         }
259     
260         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
261         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
262                 &ContactEditorData.BusinessEmailListAltID,
263                 &ContactEditorData.BusinessEmailListPID,
264                 &ContactEditorData.BusinessEmailListType,
265                 &ContactEditorData.BusinessEmailListTokens,
266                 &ContactEditorData.BusinessEmailListPref,
267                 lboBusinessEmail,
268                 intSelectedData);
269         frameCEEmail->SetEditorMode(TRUE, CE_WORK);
270         frameCEEmail->ShowModal();
271         delete frameCEEmail;
272         frameCEEmail = NULL;
273         
276 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
279         // Bring up the window to delete the email address.
281         long longSelected = -1;
282         int intSelectedData = 0;
283     
284         if (lboBusinessEmail->GetItemCount() == 0 || !GetSelectedItem(lboBusinessEmail,
285                          &longSelected,
286                          &intSelectedData)){
287                          
288                 return;
289                 
290         }
291     
292         lboBusinessEmail->DeleteItem(longSelected);
293     
294         DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
295                 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
296                 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
297                 &ContactEditorData.BusinessEmailListPref);
298     
301 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
304         // Bring up the window for adding an IM address.
305     
306         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
307         frameCEIM->SetEditorMode(FALSE, CE_WORK);
308         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
309                 &ContactEditorData.BusinessIMListAltID,
310                 &ContactEditorData.BusinessIMListPID,
311                 &ContactEditorData.BusinessIMListType,
312                 &ContactEditorData.BusinessIMListTypeInfo,
313                 &ContactEditorData.BusinessIMListTokens,
314                 &ContactEditorData.BusinessIMListMediatype,
315                 &ContactEditorData.BusinessIMListPref,
316                 lboBusinessIM,
317                 (intValueSeek));
318         frameCEIM->ShowModal();
319         delete frameCEIM;
320         frameCEIM = NULL;
321     intValueSeek++;
325 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
328         // Bring up the window for editing an IM address.
330         long longSelected = -1;
331         int intSelectedData = 0;
332     
333         if (lboBusinessIM->GetItemCount() == 0 || !GetSelectedItem(lboBusinessIM,
334                 &longSelected,
335                 &intSelectedData)){
336                 
337                 return;
338                 
339         }
340     
341         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
342         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
343                 &ContactEditorData.BusinessIMListAltID,
344                 &ContactEditorData.BusinessIMListPID,
345                 &ContactEditorData.BusinessIMListType,
346                 &ContactEditorData.BusinessIMListTypeInfo,
347                 &ContactEditorData.BusinessIMListTokens,
348                 &ContactEditorData.BusinessIMListMediatype,
349                 &ContactEditorData.BusinessIMListPref,
350                 lboBusinessIM,
351                 intSelectedData);
352         frameCEIM->SetEditorMode(TRUE, CE_WORK);
353         frameCEIM->ShowModal();
354         delete frameCEIM;
355         frameCEIM = NULL;
356         
359 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
362         // Bring up the window for deleting an IM address.
364         long longSelected = -1;
365         int intSelectedData = 0;
366     
367         if (lboBusinessIM->GetItemCount() == 0 || !GetSelectedItem(lboBusinessIM,
368                 &longSelected,
369                 &intSelectedData)){
370                 
371                 return;
372                 
373         }
374     
375         lboBusinessIM->DeleteItem(longSelected);
376     
377         DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
378                 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
379                 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
380                 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype, 
381                 &ContactEditorData.BusinessIMListPref);
382     
385 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
388         // Bring up the window for adding a telephone number.
389     
390         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
391         frameCETel->SetEditorMode(FALSE, CE_WORK);
392         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
393                 &ContactEditorData.BusinessTelephoneListAltID,
394                 &ContactEditorData.BusinessTelephoneListPID,
395                 &ContactEditorData.BusinessTelephoneListType,
396                 &ContactEditorData.BusinessTelephoneListTypeInfo,
397                 &ContactEditorData.BusinessTelephoneListTokens,
398                 &ContactEditorData.BusinessTelephoneListPref,
399                 lboBusinessTelephone,
400                 (intValueSeek));
401         frameCETel->ShowModal();
402         delete frameCETel;
403         frameCETel = NULL;
404     intValueSeek++;
408 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
411         // Bring up the address for editing a telephone number.
413         long longSelected = -1;
414         int intSelectedData = 0;
415     
416         if (lboBusinessTelephone->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTelephone,
417                 &longSelected,
418                 &intSelectedData)){
419                 
420                 return;
421                 
422         }
423     
424         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
425         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
426                 &ContactEditorData.BusinessTelephoneListAltID,
427                 &ContactEditorData.BusinessTelephoneListPID,
428                 &ContactEditorData.BusinessTelephoneListType,
429                 &ContactEditorData.BusinessTelephoneListTypeInfo,
430                 &ContactEditorData.BusinessTelephoneListTokens,
431                 &ContactEditorData.BusinessTelephoneListPref,
432                 lboBusinessTelephone,
433                 intSelectedData);
434         frameCETel->SetEditorMode(TRUE, CE_WORK);
435         frameCETel->ShowModal();
436         delete frameCETel;
437         frameCETel = NULL;
438         
441 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
444         // Bring up the window for deleting a telephone number.
446         long longSelected = -1;
447         int intSelectedData = 0;
448     
449         if (lboBusinessTelephone->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTelephone,
450                 &longSelected,
451                 &intSelectedData)){
452                 
453                 return;
454         
455         }
456     
457         lboBusinessTelephone->DeleteItem(longSelected);
458     
459         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
460                 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
461                 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
462                 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
463     
466 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
469         // Bring up the window for adding a language.
470     
471         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
472         frameCELang->SetEditorMode(FALSE, CE_WORK);
473         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
474                 &ContactEditorData.BusinessLanguageListAltID,
475                 &ContactEditorData.BusinessLanguageListPID,
476                 &ContactEditorData.BusinessLanguageListType,
477                 &ContactEditorData.BusinessLanguageListTokens,
478                 &ContactEditorData.BusinessLanguageListPref,
479                 lboBusinessLanguages,
480                 (intValueSeek));
481         frameCELang->ShowModal();
482         delete frameCELang;
483         frameCELang = NULL;
484     intValueSeek++;
488 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
491         // Bring up the window for editing a language.
493         long longSelected = -1;
494         int intSelectedData = 0;
495     
496         if (lboBusinessLanguages->GetItemCount() == 0 || !GetSelectedItem(lboBusinessLanguages,
497                 &longSelected,
498                 &intSelectedData)){
499                 
500                 return;
501                 
502         }
503     
504         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
505         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
506                 &ContactEditorData.BusinessLanguageListAltID,
507                 &ContactEditorData.BusinessLanguageListPID,
508                 &ContactEditorData.BusinessLanguageListType,
509                 &ContactEditorData.BusinessLanguageListTokens,
510                 &ContactEditorData.BusinessLanguageListPref,
511                 lboBusinessLanguages,
512                 intSelectedData);
513         frameCELang->SetEditorMode(TRUE, CE_WORK);
514         frameCELang->ShowModal();
515         delete frameCELang;
516         frameCELang = NULL;
517         
520 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
523         // Bring up the window for deleting a language.
525         long longSelected = -1;
526         int intSelectedData = 0;
527     
528         if (lboBusinessLanguages->GetItemCount() == 0 || !GetSelectedItem(lboBusinessLanguages,
529                 &longSelected,
530                 &intSelectedData)){
531                          
532                 return;
533                 
534         }
535     
536         lboBusinessLanguages->DeleteItem(longSelected);
537     
538         DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
539                 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
540                 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
541                 &ContactEditorData.BusinessLanguageListPref);
542     
545 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
548         // Bring up the window for adding a timezone.
549     
550         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
551         frameCETZ->SetEditorMode(FALSE, CE_WORK);
552         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
553                 &ContactEditorData.BusinessTZListAltID,
554                 &ContactEditorData.BusinessTZListPID,
555                 &ContactEditorData.BusinessTZListType,
556                 &ContactEditorData.BusinessTZListTokens,
557                 &ContactEditorData.BusinessTZListMediatype,
558                 &ContactEditorData.BusinessTZListPref,
559                 lboBusinessTimezones,
560                 (intValueSeek));
561         frameCETZ->ShowModal();
562         delete frameCETZ;
563         frameCETZ = NULL;
564     intValueSeek++;
568 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
571         // Bring up the window for modifying a timezone.
573         long longSelected = -1;
574         int intSelectedData = 0;
575     
576         if (lboBusinessTimezones->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTimezones,
577                 &longSelected,
578                 &intSelectedData)){
579                 
580                 return;
581                 
582         }
583     
584         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
585         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
586                 &ContactEditorData.BusinessTZListAltID,
587                 &ContactEditorData.BusinessTZListPID,
588                 &ContactEditorData.BusinessTZListType,
589                 &ContactEditorData.BusinessTZListTokens,
590                 &ContactEditorData.BusinessTZListMediatype,
591                 &ContactEditorData.BusinessTZListPref,
592                 lboBusinessTimezones,
593                 intSelectedData);
594         frameCETZ->SetEditorMode(TRUE, CE_WORK);
595         frameCETZ->ShowModal();
596         delete frameCETZ;
597         frameCETZ = NULL;
598         
601 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
604         // Bring up the window for deleting a timezone.
606         long longSelected = -1;
607         int intSelectedData = 0;
608     
609         if (lboBusinessTimezones->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTimezones,
610                 &longSelected,
611                 &intSelectedData)){
612                 
613                 return;
614                 
615         }
616     
617         lboBusinessTimezones->DeleteItem(longSelected);
618     
619         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
620                 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
621                 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
622                 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
623     
626 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
629         // Bring up the window for adding a geoposition location.
630     
631         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
632         frameCEGeo->SetEditorMode(FALSE, CE_WORK);
633         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
634                 &ContactEditorData.BusinessGeographyListAltID,
635                 &ContactEditorData.BusinessGeographyListPID,
636                 &ContactEditorData.BusinessGeographyListType,
637                 &ContactEditorData.BusinessGeographyListDataType,
638                 &ContactEditorData.BusinessGeographyListTokens,
639                 &ContactEditorData.BusinessGeographyListMediatype,
640                 &ContactEditorData.BusinessGeographyListPref,
641                 lboBusinessGeoposition,
642                 (intValueSeek));
643         frameCEGeo->ShowModal();
644         delete frameCEGeo;
645         frameCEGeo = NULL;
646     intValueSeek++;
650 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
653         // Bring up the window for editing a geoposition location.
655         long longSelected = -1;
656         int intSelectedData = 0;
657     
658         if (lboBusinessGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboBusinessGeoposition,
659                 &longSelected,
660                 &intSelectedData)){
661                 
662                 return;
663                 
664         }
665     
666         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
667         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
668                 &ContactEditorData.BusinessGeographyListAltID,
669                 &ContactEditorData.BusinessGeographyListPID,
670                 &ContactEditorData.BusinessGeographyListType,
671                 &ContactEditorData.BusinessGeographyListDataType,
672                 &ContactEditorData.BusinessGeographyListTokens,
673                 &ContactEditorData.BusinessGeographyListMediatype,
674                 &ContactEditorData.BusinessGeographyListPref,
675                 lboBusinessGeoposition,
676                 intSelectedData);
677         frameCEGeo->SetEditorMode(TRUE, CE_WORK);
678         frameCEGeo->ShowModal();
679         delete frameCEGeo;
680         frameCEGeo = NULL;
681         
684 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
687         // Bring up the window for deleting a geoposition location.
689         long longSelected = -1;
690         int intSelectedData = 0;
691     
692         if (lboBusinessGeoposition->GetItemCount() == 0 || !GetSelectedItem(lboBusinessGeoposition,
693                 &longSelected,
694                 &intSelectedData)){
695                 
696                 return;
697                 
698         }
699     
700         lboBusinessGeoposition->DeleteItem(longSelected);
701     
702         DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
703                 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
704                 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
705                 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype, 
706                 &ContactEditorData.BusinessGeographyListPref);
710 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
713         // Bring up the window for adding a website.
714     
715         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
716         frameCEWeb->SetEditorMode(FALSE, CE_WORK);
717         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
718                 &ContactEditorData.BusinessWebsiteListAltID,
719                 &ContactEditorData.BusinessWebsiteListPID,
720                 &ContactEditorData.BusinessWebsiteListType,
721                 &ContactEditorData.BusinessWebsiteListTokens,
722                 &ContactEditorData.BusinessWebsiteListMediatype,
723                 &ContactEditorData.BusinessWebsiteListPref,
724                 lboBusinessWebsites,
725                 (intValueSeek));
726         frameCEWeb->ShowModal();
727         delete frameCEWeb;
728         frameCEWeb = NULL;
729     intValueSeek++;
733 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
736         // Bring up a window for editing a website.
738         long longSelected = -1;
739         int intSelectedData = 0;
740     
741         if (lboBusinessWebsites->GetItemCount() == 0 || !GetSelectedItem(lboBusinessWebsites,
742                 &longSelected,
743                 &intSelectedData)){
744                 
745                 return;
746                 
747         }
748     
749         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
750         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
751                 &ContactEditorData.BusinessWebsiteListAltID,
752                 &ContactEditorData.BusinessWebsiteListPID,
753                 &ContactEditorData.BusinessWebsiteListType,
754                 &ContactEditorData.BusinessWebsiteListTokens,
755                 &ContactEditorData.BusinessWebsiteListMediatype,
756                 &ContactEditorData.BusinessWebsiteListPref,
757                 lboBusinessWebsites,
758                 intSelectedData);
759         frameCEWeb->SetEditorMode(TRUE, CE_WORK);
760         frameCEWeb->ShowModal();
761         delete frameCEWeb;
762         frameCEWeb = NULL;
763         
766 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
769         // Bring up the window for deleting a website.
771         long longSelected = -1;
772         int intSelectedData = 0;
773     
774         if (lboBusinessWebsites->GetItemCount() == 0 || !GetSelectedItem(lboBusinessWebsites,
775                 &longSelected,
776                 &intSelectedData)){
777                 
778                 return;
779                 
780         }
781     
782         lboBusinessWebsites->DeleteItem(longSelected);
783     
784         DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
785                 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
786                 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
787                 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
788     
791 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
794         // Bring up the window for adding a title.
795     
796         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
797         frameCETitle->SetEditorMode(FALSE, CE_WORK);
798         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
799                 &ContactEditorData.BusinessTitleListLanguage,
800                 &ContactEditorData.BusinessTitleListAltID,
801                 &ContactEditorData.BusinessTitleListPID,
802                 &ContactEditorData.BusinessTitleListType,
803                 &ContactEditorData.BusinessTitleListTokens,
804                 &ContactEditorData.BusinessTitleListPref,
805                 lboBusinessTitles,
806                 (intValueSeek));
807         frameCETitle->ShowModal();
808         delete frameCETitle;
809         frameCETitle = NULL;
810     intValueSeek++;
814 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
817         // Bring up the window for editing a title.
819         long longSelected = -1;
820         int intSelectedData = 0;
821     
822         if (lboBusinessTitles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTitles,
823                 &longSelected,
824                 &intSelectedData)){
825                          
826                 return;
827                 
828         }
829     
830         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
831         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
832                 &ContactEditorData.BusinessTitleListLanguage,
833                 &ContactEditorData.BusinessTitleListAltID,
834                 &ContactEditorData.BusinessTitleListPID,
835                 &ContactEditorData.BusinessTitleListType,
836                 &ContactEditorData.BusinessTitleListTokens,
837                 &ContactEditorData.BusinessTitleListPref,
838                 lboBusinessTitles,
839                 intSelectedData);
840         frameCETitle->SetEditorMode(TRUE, CE_WORK);
841         frameCETitle->ShowModal();
842         delete frameCETitle;
843         frameCETitle = NULL;
844         
847 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
850         // Bring up the window to delete the title.
852         long longSelected = -1;
853         int intSelectedData = 0;
854     
855         if (lboBusinessTitles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessTitles,
856                 &longSelected,
857                 &intSelectedData)){
858                 
859                 return;
860     
861         }
862     
863         lboBusinessTitles->DeleteItem(longSelected);
864     
865         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
866                 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
867                 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
868                 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
872 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
875         // Bring up the window to add a role.
876     
877         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
878         frameCERole->SetEditorMode(FALSE, CE_WORK);
879         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
880                 &ContactEditorData.BusinessRoleListLanguage,
881                 &ContactEditorData.BusinessRoleListAltID,
882                 &ContactEditorData.BusinessRoleListPID,
883                 &ContactEditorData.BusinessRoleListType,
884                 &ContactEditorData.BusinessRoleListTokens,
885                 &ContactEditorData.BusinessRoleListPref,
886                 lboBusinessRoles,
887                 (intValueSeek));
888         frameCERole->ShowModal();
889         delete frameCERole;
890         frameCERole = NULL;
891     intValueSeek++;
895 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
898         // Bring up the window for editing a role.
900         long longSelected = -1;
901         int intSelectedData = 0;
902     
903         if (lboBusinessRoles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessRoles,
904                 &longSelected,
905                 &intSelectedData)){
906                 
907                 return;
908                 
909         }
910     
911         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
912         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
913                 &ContactEditorData.BusinessRoleListLanguage,
914                 &ContactEditorData.BusinessRoleListAltID,
915                 &ContactEditorData.BusinessRoleListPID,
916                 &ContactEditorData.BusinessRoleListType,
917                 &ContactEditorData.BusinessRoleListTokens,
918                 &ContactEditorData.BusinessRoleListPref,
919                 lboBusinessRoles,
920                 intSelectedData);
921         frameCERole->SetEditorMode(TRUE, CE_WORK);
922         frameCERole->ShowModal();
923         delete frameCERole;
924         frameCERole = NULL;
925         
928 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
931         // Bring up the window to delete a role.
933         long longSelected = -1;
934         int intSelectedData = 0;
935     
936         if (lboBusinessRoles->GetItemCount() == 0 || !GetSelectedItem(lboBusinessRoles,
937                 &longSelected,
938                 &intSelectedData)){
939                 
940                 return;
941                 
942         }
943     
944         lboBusinessRoles->DeleteItem(longSelected);
945     
946         DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
947                 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
948                 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
949                 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
950     
953 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
956         // Bring up the window to add an organisation.
958         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
959         frameCEOrg->SetEditorMode(FALSE, CE_WORK);
960         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
961                 &ContactEditorData.BusinessOrganisationsListLanguage,
962                 &ContactEditorData.BusinessOrganisationsListSortAs,
963                 &ContactEditorData.BusinessOrganisationsListAltID,
964                 &ContactEditorData.BusinessOrganisationsListPID,
965                 &ContactEditorData.BusinessOrganisationsListType,
966                 &ContactEditorData.BusinessOrganisationsListTokens,
967                 &ContactEditorData.BusinessOrganisationsListPref,
968                 lboBusinessOrganisations,
969                 (intValueSeek));
970         frameCEOrg->ShowModal();
971         delete frameCEOrg;
972         frameCEOrg = NULL;
973     intValueSeek++;
977 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
980         // Bring up the window to edit an organisation.
982         long longSelected = -1;
983         int intSelectedData = 0;
984     
985         if (lboBusinessOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboBusinessOrganisations,
986                 &longSelected,
987                 &intSelectedData)){
988                 
989                 return;
990                 
991         }
992     
993         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
994         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
995                 &ContactEditorData.BusinessOrganisationsListLanguage,
996                 &ContactEditorData.BusinessOrganisationsListSortAs,
997                 &ContactEditorData.BusinessOrganisationsListAltID,
998                 &ContactEditorData.BusinessOrganisationsListPID,
999                 &ContactEditorData.BusinessOrganisationsListType,
1000                 &ContactEditorData.BusinessOrganisationsListTokens,
1001                 &ContactEditorData.BusinessOrganisationsListPref,
1002                 lboBusinessOrganisations,
1003                 intSelectedData);
1004         frameCEOrg->SetEditorMode(TRUE, CE_WORK);
1005         frameCEOrg->ShowModal();
1006         delete frameCEOrg;
1007         frameCEOrg = NULL;
1008         
1011 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
1014         // Bring up the window to delete a organisation.
1016         long longSelected = -1;
1017         int intSelectedData = 0;
1018     
1019         if (lboBusinessOrganisations->GetItemCount() == 0 || !GetSelectedItem(lboBusinessOrganisations,
1020                 &longSelected,
1021                 &intSelectedData)){
1022                 
1023                 return;
1024                 
1025         }
1026     
1027         lboBusinessOrganisations->DeleteItem(longSelected);
1028     
1029         DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
1030                 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
1031                 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
1032                 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
1033                 &ContactEditorData.BusinessOrganisationsListPref);
1034     
1037 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
1040         // Bring up the window to add a note.
1041     
1042         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1043         frameCENote->SetEditorMode(FALSE, CE_WORK);
1044         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1045                 &ContactEditorData.BusinessNoteListLanguage,
1046                 &ContactEditorData.BusinessNoteListAltID,
1047                 &ContactEditorData.BusinessNoteListPID,
1048                 &ContactEditorData.BusinessNoteListType,
1049                 &ContactEditorData.BusinessNoteListTokens,
1050                 &ContactEditorData.BusinessNoteListPref,
1051                 lboBusinessNotes,
1052                 (intValueSeek));
1053         frameCENote->ShowModal();
1054         delete frameCENote;
1055         frameCENote = NULL;
1056     intValueSeek++;
1060 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1063         // Bring up the window to edit a note.
1065         long longSelected = -1;
1066         int intSelectedData = 0;
1067     
1068         if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNotes,
1069                 &longSelected,
1070                 &intSelectedData)){
1071                 
1072                 return;
1073                 
1074         }
1075     
1076         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1077         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1078                 &ContactEditorData.BusinessNoteListLanguage,
1079                 &ContactEditorData.BusinessNoteListAltID,
1080                 &ContactEditorData.BusinessNoteListPID,
1081                 &ContactEditorData.BusinessNoteListType,
1082                 &ContactEditorData.BusinessNoteListTokens,
1083                 &ContactEditorData.BusinessNoteListPref,
1084                 lboBusinessNotes,
1085                 intSelectedData);
1086         frameCENote->SetEditorMode(TRUE, CE_WORK);
1087         frameCENote->ShowModal();
1088         delete frameCENote;
1089         frameCENote = NULL;
1090         
1093 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1096         // Bring up the window to delete a note.
1098         long longSelected = -1;
1099         int intSelectedData = 0;
1100     
1101         if (lboBusinessNotes->GetItemCount() == 0 || !GetSelectedItem(lboBusinessNotes,
1102                 &longSelected,
1103                 &intSelectedData)){
1104                 
1105                 return;
1106                 
1107         }
1108     
1109         lboBusinessNotes->DeleteItem(longSelected);
1110     
1111         DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1112                 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1113                 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1114                 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);
1115     
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