Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly 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         int intResult = 0;
40     
41         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
42         frameCENickname->SetEditorMode(FALSE, CE_WORK);
43         intResult = GetLastInt(&ContactEditorData.BusinessNicknamesList);
44         frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
45                 &ContactEditorData.BusinessNicknamesListAltID,
46                 &ContactEditorData.BusinessNicknamesListPID,
47                 &ContactEditorData.BusinessNicknamesListType,
48                 &ContactEditorData.BusinessNicknamesListLanguage,
49                 &ContactEditorData.BusinessNicknamesListTokens,
50                 &ContactEditorData.BusinessNicknamesListPref,
51                 lboBusinessNicknames,
52                 (intValueSeek));
53         frameCENickname->ShowModal();
54         delete frameCENickname;
55         frameCENickname = NULL;
56         
57 }
59 void frmContactEditor::ModifyBusinessNickname( wxCommandEvent& event )
60 {
62         long longSelected = -1;
63         int intSelectedData = 0;
64     
65         if (!GetSelectedItem(lboBusinessNicknames,
66                 &longSelected,
67                 &intSelectedData)){
68                 
69                 return;
70                 
71         }
72     
73         frmContactEditorNickname *frameCENickname = new frmContactEditorNickname ( this );
74         frameCENickname->SetupPointers(&ContactEditorData.BusinessNicknamesList,
75                 &ContactEditorData.BusinessNicknamesListAltID,
76                 &ContactEditorData.BusinessNicknamesListPID,
77                 &ContactEditorData.BusinessNicknamesListType,
78                 &ContactEditorData.BusinessNicknamesListLanguage,
79                 &ContactEditorData.BusinessNicknamesListTokens,
80                 &ContactEditorData.BusinessNicknamesListPref,
81                 lboBusinessNicknames,
82                 intSelectedData);
83         frameCENickname->SetEditorMode(TRUE, CE_WORK);
84         frameCENickname->ShowModal();
85         delete frameCENickname;
86         frameCENickname = NULL;
87         
88 }
90 void frmContactEditor::DeleteBusinessNickname( wxCommandEvent& event )
91 {
93         long longSelected = -1;
94         int intSelectedData = 0;
95     
96         if (!GetSelectedItem(lboBusinessNicknames,
97                 &longSelected,
98                 &intSelectedData)){
99                 
100                 return;
101                 
102         }
103     
104         lboBusinessNicknames->DeleteItem(longSelected);
105     
106         DeleteMapData(intSelectedData,
107                 &ContactEditorData.BusinessNicknamesList,
108                 &ContactEditorData.BusinessNicknamesListLanguage,
109                 &ContactEditorData.BusinessNicknamesListAltID,
110                 &ContactEditorData.BusinessNicknamesListPID,
111                 &ContactEditorData.BusinessNicknamesListTokens,
112                 &ContactEditorData.BusinessNicknamesListType,
113                 &ContactEditorData.BusinessNicknamesListPref);
117 void frmContactEditor::AddBusinessAddress( wxCommandEvent& event )
120         int intResult = 0;
121     
122         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
123         frameCEAddress->SetEditorMode(FALSE, CE_WORK);
124         intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
125         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
126                 &ContactEditorData.BusinessAddressListTown,
127                 &ContactEditorData.BusinessAddressListCounty,
128                 &ContactEditorData.BusinessAddressListPostCode,
129                 &ContactEditorData.BusinessAddressListCountry,
130                 &ContactEditorData.BusinessAddressListLabel,
131                 &ContactEditorData.BusinessAddressListLang,
132                 &ContactEditorData.BusinessAddressListAltID,
133                 &ContactEditorData.BusinessAddressListPID,
134                 &ContactEditorData.BusinessAddressListTokens,
135                 &ContactEditorData.BusinessAddressListGeo,
136                 &ContactEditorData.BusinessAddressListTimezone,
137                 &ContactEditorData.BusinessAddressListType,
138                 &ContactEditorData.BusinessAddressListMediatype,
139                 &ContactEditorData.BusinessAddressListPref,
140                 lboBusinessAddresses,
141                 (intValueSeek));
142         frameCEAddress->ShowModal();
143         delete frameCEAddress;
144         frameCEAddress = NULL;
145         
148 void frmContactEditor::ModifyBusinessAddress( wxCommandEvent& event )
151         long longSelected = -1;
152         int intSelectedData = 0;
153     
154         if (!GetSelectedItem(lboBusinessAddresses,
155                 &longSelected,
156                 &intSelectedData)){
157                 
158                 return;
159                 
160         }
161     
162         frmContactEditorAddress *frameCEAddress = new frmContactEditorAddress ( this );
163         frameCEAddress->SetupPointers(&ContactEditorData.BusinessAddressList,
164                 &ContactEditorData.BusinessAddressListTown,
165                 &ContactEditorData.BusinessAddressListCounty,
166                 &ContactEditorData.BusinessAddressListPostCode,
167                 &ContactEditorData.BusinessAddressListCountry,
168                 &ContactEditorData.BusinessAddressListLabel,
169                 &ContactEditorData.BusinessAddressListLang,
170                 &ContactEditorData.BusinessAddressListAltID,
171                 &ContactEditorData.BusinessAddressListPID,
172                 &ContactEditorData.BusinessAddressListTokens,
173                 &ContactEditorData.BusinessAddressListGeo,
174                 &ContactEditorData.BusinessAddressListTimezone,
175                 &ContactEditorData.BusinessAddressListType,
176                 &ContactEditorData.BusinessAddressListMediatype,
177                 &ContactEditorData.BusinessAddressListPref,
178                 lboBusinessAddresses,
179                 intSelectedData);
180         frameCEAddress->SetEditorMode(TRUE, CE_WORK);
181         frameCEAddress->ShowModal();
182         delete frameCEAddress;
183         frameCEAddress = NULL;
184         
187 void frmContactEditor::DeleteBusinessAddress( wxCommandEvent& event )
190         long longSelected = -1;
191         int intSelectedData = 0;
192     
193         if (!GetSelectedItem(lboBusinessAddresses,
194                 &longSelected,
195                 &intSelectedData)){
196                 
197                 return;
198                 
199         }
200     
201         lboBusinessAddresses->DeleteItem(longSelected);
202         DeleteMapData(intSelectedData, &ContactEditorData.BusinessAddressList,
203                 &ContactEditorData.BusinessAddressListTown, &ContactEditorData.BusinessAddressListCounty,
204                 &ContactEditorData.BusinessAddressListPostCode, &ContactEditorData.BusinessAddressListCountry,
205                 &ContactEditorData.BusinessAddressList, &ContactEditorData.BusinessAddressListLabel,
206                 &ContactEditorData.BusinessAddressListLang, &ContactEditorData.BusinessAddressListAltID,
207                 &ContactEditorData.BusinessAddressListPID, &ContactEditorData.BusinessAddressListTokens,
208                 &ContactEditorData.BusinessAddressListGeo, &ContactEditorData.BusinessAddressListTimezone,
209                 &ContactEditorData.BusinessAddressListType, &ContactEditorData.BusinessAddressListMediatype,
210                 &ContactEditorData.BusinessAddressListPref);
211     
214 void frmContactEditor::AddBusinessEmail( wxCommandEvent& event )
217         int intResult = 0;
218     
219         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
220         frameCEEmail->SetEditorMode(FALSE, CE_WORK);
221         intResult = GetLastInt(&ContactEditorData.BusinessAddressList);
222         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
223                 &ContactEditorData.BusinessEmailListAltID,
224                 &ContactEditorData.BusinessEmailListPID,
225                 &ContactEditorData.BusinessEmailListType,
226                 &ContactEditorData.BusinessEmailListTokens,
227                 &ContactEditorData.BusinessEmailListPref,
228                 lboBusinessEmail,
229                 (intValueSeek));
230         frameCEEmail->ShowModal();
231         delete frameCEEmail;
232         frameCEEmail = NULL;
233         
236 void frmContactEditor::ModifyBusinessEmail( wxCommandEvent& event )
239         long longSelected = -1;
240         int intSelectedData = 0;
241     
242         if (!GetSelectedItem(lboBusinessEmail,
243                 &longSelected,
244                 &intSelectedData)){
245                 
246                 return;
247                 
248         }
249     
250         frmContactEditorEmail *frameCEEmail = new frmContactEditorEmail ( this );
251         frameCEEmail->SetupPointers(&ContactEditorData.BusinessEmailList,
252                 &ContactEditorData.BusinessEmailListAltID,
253                 &ContactEditorData.BusinessEmailListPID,
254                 &ContactEditorData.BusinessEmailListType,
255                 &ContactEditorData.BusinessEmailListTokens,
256                 &ContactEditorData.BusinessEmailListPref,
257                 lboBusinessEmail,
258                 intSelectedData);
259         frameCEEmail->SetEditorMode(TRUE, CE_WORK);
260         frameCEEmail->ShowModal();
261         delete frameCEEmail;
262         frameCEEmail = NULL;
263         
266 void frmContactEditor::DeleteBusinessEmail( wxCommandEvent& event )
269         long longSelected = -1;
270         int intSelectedData = 0;
271     
272         if (!GetSelectedItem(lboBusinessEmail,
273                          &longSelected,
274                          &intSelectedData)){
275                          
276                 return;
277                 
278         }
279     
280         lboBusinessEmail->DeleteItem(longSelected);
281     
282         DeleteMapData(intSelectedData, &ContactEditorData.BusinessEmailList,
283                 &ContactEditorData.BusinessEmailListAltID, &ContactEditorData.BusinessEmailListPID,
284                 &ContactEditorData.BusinessEmailListType, &ContactEditorData.BusinessEmailListTokens,
285                 &ContactEditorData.BusinessEmailListPref);
286     
289 void frmContactEditor::AddBusinessIM( wxCommandEvent& event )
292         int intResult = 0;
293     
294         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
295         frameCEIM->SetEditorMode(FALSE, CE_WORK);
296         intResult = GetLastInt(&ContactEditorData.BusinessIMList);
297         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
298                 &ContactEditorData.BusinessIMListAltID,
299                 &ContactEditorData.BusinessIMListPID,
300                 &ContactEditorData.BusinessIMListType,
301                 &ContactEditorData.BusinessIMListTypeInfo,
302                 &ContactEditorData.BusinessIMListTokens,
303                 &ContactEditorData.BusinessIMListMediatype,
304                 &ContactEditorData.BusinessIMListPref,
305                 lboBusinessIM,
306                 (intValueSeek));
307         frameCEIM->ShowModal();
308         delete frameCEIM;
309         frameCEIM = NULL;
310         
313 void frmContactEditor::ModifyBusinessIM( wxCommandEvent& event )
316         long longSelected = -1;
317         int intSelectedData = 0;
318     
319         if (!GetSelectedItem(lboBusinessIM,
320                 &longSelected,
321                 &intSelectedData)){
322                 
323                 return;
324                 
325         }
326     
327         frmContactEditorIM *frameCEIM = new frmContactEditorIM ( this );
328         frameCEIM->SetupPointers(&ContactEditorData.BusinessIMList,
329                 &ContactEditorData.BusinessIMListAltID,
330                 &ContactEditorData.BusinessIMListPID,
331                 &ContactEditorData.BusinessIMListType,
332                 &ContactEditorData.BusinessIMListTypeInfo,
333                 &ContactEditorData.BusinessIMListTokens,
334                 &ContactEditorData.BusinessIMListMediatype,
335                 &ContactEditorData.BusinessIMListPref,
336                 lboBusinessIM,
337                 intSelectedData);
338         frameCEIM->SetEditorMode(TRUE, CE_WORK);
339         frameCEIM->ShowModal();
340         delete frameCEIM;
341         frameCEIM = NULL;
342         
345 void frmContactEditor::DeleteBusinessIM( wxCommandEvent& event )
348         long longSelected = -1;
349         int intSelectedData = 0;
350     
351         if (!GetSelectedItem(lboBusinessIM,
352                 &longSelected,
353                 &intSelectedData)){
354                 
355                 return;
356                 
357         }
358     
359         lboBusinessIM->DeleteItem(longSelected);
360     
361         DeleteMapData(intSelectedData, &ContactEditorData.BusinessIMList,
362                 &ContactEditorData.BusinessIMListAltID, &ContactEditorData.BusinessIMListPID,
363                 &ContactEditorData.BusinessIMListType, &ContactEditorData.BusinessIMListTypeInfo,
364                 &ContactEditorData.BusinessIMListTokens, &ContactEditorData.BusinessIMListMediatype, 
365                 &ContactEditorData.BusinessIMListPref);
366     
369 void frmContactEditor::AddBusinessTelephone( wxCommandEvent& event )
372         int intResult = 0;
373     
374         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
375         frameCETel->SetEditorMode(FALSE, CE_WORK);
376         intResult = GetLastInt(&ContactEditorData.BusinessTelephoneList);
377         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
378                 &ContactEditorData.BusinessTelephoneListAltID,
379                 &ContactEditorData.BusinessTelephoneListPID,
380                 &ContactEditorData.BusinessTelephoneListType,
381                 &ContactEditorData.BusinessTelephoneListTypeInfo,
382                 &ContactEditorData.BusinessTelephoneListTokens,
383                 &ContactEditorData.BusinessTelephoneListPref,
384                 lboBusinessTelephone,
385                 (intValueSeek));
386         frameCETel->ShowModal();
387         delete frameCETel;
388         frameCETel = NULL;
389         
392 void frmContactEditor::ModifyBusinessTelephone( wxCommandEvent& event )
395         long longSelected = -1;
396         int intSelectedData = 0;
397     
398         if (!GetSelectedItem(lboBusinessTelephone,
399                 &longSelected,
400                 &intSelectedData)){
401                 
402                 return;
403                 
404         }
405     
406         frmContactEditorTelephone *frameCETel = new frmContactEditorTelephone ( this );
407         frameCETel->SetupPointers(&ContactEditorData.BusinessTelephoneList,
408                 &ContactEditorData.BusinessTelephoneListAltID,
409                 &ContactEditorData.BusinessTelephoneListPID,
410                 &ContactEditorData.BusinessTelephoneListType,
411                 &ContactEditorData.BusinessTelephoneListTypeInfo,
412                 &ContactEditorData.BusinessTelephoneListTokens,
413                 &ContactEditorData.BusinessTelephoneListPref,
414                 lboBusinessTelephone,
415                 intSelectedData);
416         frameCETel->SetEditorMode(TRUE, CE_WORK);
417         frameCETel->ShowModal();
418         delete frameCETel;
419         frameCETel = NULL;
420         
423 void frmContactEditor::DeleteBusinessTelephone( wxCommandEvent& event )
426         long longSelected = -1;
427         int intSelectedData = 0;
428     
429         if (!GetSelectedItem(lboBusinessTelephone,
430                 &longSelected,
431                 &intSelectedData)){
432                 
433                 return;
434         
435         }
436     
437         lboBusinessTelephone->DeleteItem(longSelected);
438     
439         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTelephoneList,
440                 &ContactEditorData.BusinessTelephoneListAltID, &ContactEditorData.BusinessTelephoneListPID,
441                 &ContactEditorData.BusinessTelephoneListType, &ContactEditorData.BusinessTelephoneListTypeInfo,
442                 &ContactEditorData.BusinessTelephoneListTokens, &ContactEditorData.BusinessTelephoneListPref);
443     
446 void frmContactEditor::AddBusinessLanguage( wxCommandEvent& event )
449         int intResult = 0;
450     
451         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
452         frameCELang->SetEditorMode(FALSE, CE_WORK);
453         intResult = GetLastInt(&ContactEditorData.BusinessLanguageList);
454         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
455                 &ContactEditorData.BusinessLanguageListAltID,
456                 &ContactEditorData.BusinessLanguageListPID,
457                 &ContactEditorData.BusinessLanguageListType,
458                 &ContactEditorData.BusinessLanguageListTokens,
459                 &ContactEditorData.BusinessLanguageListPref,
460                 lboBusinessLanguages,
461                 (intValueSeek));
462         frameCELang->ShowModal();
463         delete frameCELang;
464         frameCELang = NULL;
465         
468 void frmContactEditor::ModifyBusinessLanguage( wxCommandEvent& event )
471         long longSelected = -1;
472         int intSelectedData = 0;
473     
474         if (!GetSelectedItem(lboBusinessLanguages,
475                 &longSelected,
476                 &intSelectedData)){
477                 
478                 return;
479                 
480         }
481     
482         frmContactEditorLanguages *frameCELang = new frmContactEditorLanguages ( this );
483         frameCELang->SetupPointers(&ContactEditorData.BusinessLanguageList,
484                 &ContactEditorData.BusinessLanguageListAltID,
485                 &ContactEditorData.BusinessLanguageListPID,
486                 &ContactEditorData.BusinessLanguageListType,
487                 &ContactEditorData.BusinessLanguageListTokens,
488                 &ContactEditorData.BusinessLanguageListPref,
489                 lboBusinessLanguages,
490                 intSelectedData);
491         frameCELang->SetEditorMode(TRUE, CE_WORK);
492         frameCELang->ShowModal();
493         delete frameCELang;
494         frameCELang = NULL;
495         
498 void frmContactEditor::DeleteBusinessLanguage( wxCommandEvent& event )
501         long longSelected = -1;
502         int intSelectedData = 0;
503     
504         if (!GetSelectedItem(lboBusinessLanguages,
505                 &longSelected,
506                 &intSelectedData)){
507                          
508                 return;
509                 
510         }
511     
512         lboBusinessLanguages->DeleteItem(longSelected);
513     
514         DeleteMapData(intSelectedData, &ContactEditorData.BusinessLanguageList,
515                 &ContactEditorData.BusinessLanguageListAltID, &ContactEditorData.BusinessLanguageListPID,
516                 &ContactEditorData.BusinessLanguageListType, &ContactEditorData.BusinessLanguageListTokens,
517                 &ContactEditorData.BusinessLanguageListPref);
518     
521 void frmContactEditor::AddBusinessTimezone( wxCommandEvent& event )
524         int intResult = 0;
525     
526         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
527         frameCETZ->SetEditorMode(FALSE, CE_WORK);
528         intResult = GetLastInt(&ContactEditorData.BusinessTZList);
529         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
530                 &ContactEditorData.BusinessTZListAltID,
531                 &ContactEditorData.BusinessTZListPID,
532                 &ContactEditorData.BusinessTZListType,
533                 &ContactEditorData.BusinessTZListTokens,
534                 &ContactEditorData.BusinessTZListMediatype,
535                 &ContactEditorData.BusinessTZListPref,
536                 lboBusinessTimezones,
537                 (intValueSeek));
538         frameCETZ->ShowModal();
539         delete frameCETZ;
540         frameCETZ = NULL;
541         
544 void frmContactEditor::ModifyBusinessTimezone( wxCommandEvent& event )
547         long longSelected = -1;
548         int intSelectedData = 0;
549     
550         if (!GetSelectedItem(lboBusinessTimezones,
551                 &longSelected,
552                 &intSelectedData)){
553                 
554                 return;
555                 
556         }
557     
558         frmContactEditorTimezones *frameCETZ = new frmContactEditorTimezones ( this );
559         frameCETZ->SetupPointers(&ContactEditorData.BusinessTZList,
560                 &ContactEditorData.BusinessTZListAltID,
561                 &ContactEditorData.BusinessTZListPID,
562                 &ContactEditorData.BusinessTZListType,
563                 &ContactEditorData.BusinessTZListTokens,
564                 &ContactEditorData.BusinessTZListMediatype,
565                 &ContactEditorData.BusinessTZListPref,
566                 lboBusinessTimezones,
567                 intSelectedData);
568         frameCETZ->SetEditorMode(TRUE, CE_WORK);
569         frameCETZ->ShowModal();
570         delete frameCETZ;
571         frameCETZ = NULL;
572         
575 void frmContactEditor::DeleteBusinessTimezone( wxCommandEvent& event )
578         long longSelected = -1;
579         int intSelectedData = 0;
580     
581         if (!GetSelectedItem(lboBusinessTimezones,
582                 &longSelected,
583                 &intSelectedData)){
584                 
585                 return;
586                 
587         }
588     
589         lboBusinessTimezones->DeleteItem(longSelected);
590     
591         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTZList,
592                 &ContactEditorData.BusinessTZListAltID, &ContactEditorData.BusinessTZListPID,
593                 &ContactEditorData.BusinessTZListType, &ContactEditorData.BusinessTZListTokens,
594                 &ContactEditorData.BusinessTZListMediatype, &ContactEditorData.BusinessTZListPref);
595     
598 void frmContactEditor::AddBusinessGeoposition( wxCommandEvent& event )
601         int intResult = 0;
602     
603         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
604         frameCEGeo->SetEditorMode(FALSE, CE_WORK);
605         intResult = GetLastInt(&ContactEditorData.BusinessGeographyList);
606         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
607                 &ContactEditorData.BusinessGeographyListAltID,
608                 &ContactEditorData.BusinessGeographyListPID,
609                 &ContactEditorData.BusinessGeographyListType,
610                 &ContactEditorData.BusinessGeographyListDataType,
611                 &ContactEditorData.BusinessGeographyListTokens,
612                 &ContactEditorData.BusinessGeographyListMediatype,
613                 &ContactEditorData.BusinessGeographyListPref,
614                 lboBusinessGeoposition,
615                 (intValueSeek));
616         frameCEGeo->ShowModal();
617         delete frameCEGeo;
618         frameCEGeo = NULL;
619         
622 void frmContactEditor::ModifyBusinessGeoposition( wxCommandEvent& event )
625         long longSelected = -1;
626         int intSelectedData = 0;
627     
628         if (!GetSelectedItem(lboBusinessGeoposition,
629                 &longSelected,
630                 &intSelectedData)){
631                 
632                 return;
633                 
634         }
635     
636         frmContactEditorGeoposition *frameCEGeo = new frmContactEditorGeoposition ( this );
637         frameCEGeo->SetupPointers(&ContactEditorData.BusinessGeographyList,
638                 &ContactEditorData.BusinessGeographyListAltID,
639                 &ContactEditorData.BusinessGeographyListPID,
640                 &ContactEditorData.BusinessGeographyListType,
641                 &ContactEditorData.BusinessGeographyListDataType,
642                 &ContactEditorData.BusinessGeographyListTokens,
643                 &ContactEditorData.BusinessGeographyListMediatype,
644                 &ContactEditorData.BusinessGeographyListPref,
645                 lboBusinessGeoposition,
646                 intSelectedData);
647         frameCEGeo->SetEditorMode(TRUE, CE_WORK);
648         frameCEGeo->ShowModal();
649         delete frameCEGeo;
650         frameCEGeo = NULL;
651         
654 void frmContactEditor::DeleteBusinessGeoposition( wxCommandEvent& event )
657         long longSelected = -1;
658         int intSelectedData = 0;
659     
660         if (!GetSelectedItem(lboBusinessGeoposition,
661                 &longSelected,
662                 &intSelectedData)){
663                 
664                 return;
665                 
666         }
667     
668         lboBusinessGeoposition->DeleteItem(longSelected);
669     
670         DeleteMapData(intSelectedData, &ContactEditorData.BusinessGeographyList,
671                 &ContactEditorData.BusinessGeographyListAltID, &ContactEditorData.BusinessGeographyListPID,
672                 &ContactEditorData.BusinessGeographyListType, &ContactEditorData.BusinessGeographyListDataType,
673                 &ContactEditorData.BusinessGeographyListTokens, &ContactEditorData.BusinessGeographyListMediatype, 
674                 &ContactEditorData.BusinessGeographyListPref);
678 void frmContactEditor::AddBusinessWebsite( wxCommandEvent& event )
681         int intResult = 0;
682     
683         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
684         frameCEWeb->SetEditorMode(FALSE, CE_WORK);
685         intResult = GetLastInt(&ContactEditorData.BusinessWebsiteList);
686         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
687                 &ContactEditorData.BusinessWebsiteListAltID,
688                 &ContactEditorData.BusinessWebsiteListPID,
689                 &ContactEditorData.BusinessWebsiteListType,
690                 &ContactEditorData.BusinessWebsiteListTokens,
691                 &ContactEditorData.BusinessWebsiteListMediatype,
692                 &ContactEditorData.BusinessWebsiteListPref,
693                 lboBusinessWebsites,
694                 (intValueSeek));
695         frameCEWeb->ShowModal();
696         delete frameCEWeb;
697         frameCEWeb = NULL;
698         
701 void frmContactEditor::ModifyBusinessWebsite( wxCommandEvent& event )
704         long longSelected = -1;
705         int intSelectedData = 0;
706     
707         if (!GetSelectedItem(lboBusinessWebsites,
708                 &longSelected,
709                 &intSelectedData)){
710                 
711                 return;
712                 
713         }
714     
715         frmContactEditorWebsites *frameCEWeb = new frmContactEditorWebsites ( this );
716         frameCEWeb->SetupPointers(&ContactEditorData.BusinessWebsiteList,
717                 &ContactEditorData.BusinessWebsiteListAltID,
718                 &ContactEditorData.BusinessWebsiteListPID,
719                 &ContactEditorData.BusinessWebsiteListType,
720                 &ContactEditorData.BusinessWebsiteListTokens,
721                 &ContactEditorData.BusinessWebsiteListMediatype,
722                 &ContactEditorData.BusinessWebsiteListPref,
723                 lboBusinessWebsites,
724                 intSelectedData);
725         frameCEWeb->SetEditorMode(TRUE, CE_WORK);
726         frameCEWeb->ShowModal();
727         delete frameCEWeb;
728         frameCEWeb = NULL;
729         
732 void frmContactEditor::DeleteBusinessWebsite( wxCommandEvent& event )
735         long longSelected = -1;
736         int intSelectedData = 0;
737     
738         if (!GetSelectedItem(lboBusinessWebsites,
739                 &longSelected,
740                 &intSelectedData)){
741                 
742                 return;
743                 
744         }
745     
746         lboBusinessWebsites->DeleteItem(longSelected);
747     
748         DeleteMapData(intSelectedData, &ContactEditorData.BusinessWebsiteList,
749                 &ContactEditorData.BusinessWebsiteListAltID, &ContactEditorData.BusinessWebsiteListPID,
750                 &ContactEditorData.BusinessWebsiteListType, &ContactEditorData.BusinessWebsiteListTokens,
751                 &ContactEditorData.BusinessWebsiteListMediatype, &ContactEditorData.BusinessWebsiteListPref);
752     
755 void frmContactEditor::AddBusinessTitle( wxCommandEvent& event )
758         int intResult = 0;
759     
760         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
761         frameCETitle->SetEditorMode(FALSE, CE_WORK);
762         intResult = GetLastInt(&ContactEditorData.BusinessTitleList);
763         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
764                 &ContactEditorData.BusinessTitleListLanguage,
765                 &ContactEditorData.BusinessTitleListAltID,
766                 &ContactEditorData.BusinessTitleListPID,
767                 &ContactEditorData.BusinessTitleListType,
768                 &ContactEditorData.BusinessTitleListTokens,
769                 &ContactEditorData.BusinessTitleListPref,
770                 lboBusinessTitles,
771                 (intValueSeek));
772         frameCETitle->ShowModal();
773         delete frameCETitle;
774         frameCETitle = NULL;
775         
778 void frmContactEditor::ModifyBusinessTitle( wxCommandEvent& event )
781         long longSelected = -1;
782         int intSelectedData = 0;
783     
784         if (!GetSelectedItem(lboBusinessTitles,
785                 &longSelected,
786                 &intSelectedData)){
787                          
788                 return;
789                 
790         }
791     
792         frmContactEditorTitles *frameCETitle = new frmContactEditorTitles ( this );
793         frameCETitle->SetupPointers(&ContactEditorData.BusinessTitleList,
794                 &ContactEditorData.BusinessTitleListLanguage,
795                 &ContactEditorData.BusinessTitleListAltID,
796                 &ContactEditorData.BusinessTitleListPID,
797                 &ContactEditorData.BusinessTitleListType,
798                 &ContactEditorData.BusinessTitleListTokens,
799                 &ContactEditorData.BusinessTitleListPref,
800                 lboBusinessTitles,
801                 intSelectedData);
802         frameCETitle->SetEditorMode(TRUE, CE_WORK);
803         frameCETitle->ShowModal();
804         delete frameCETitle;
805         frameCETitle = NULL;
806         
809 void frmContactEditor::DeleteBusinessTitle( wxCommandEvent& event )
812         long longSelected = -1;
813         int intSelectedData = 0;
814     
815         if (!GetSelectedItem(lboBusinessTitles,
816                 &longSelected,
817                 &intSelectedData)){
818                 
819                 return;
820     
821         }
822     
823         lboTitles->DeleteItem(longSelected);
824     
825         DeleteMapData(intSelectedData, &ContactEditorData.BusinessTitleList,
826                 &ContactEditorData.BusinessTitleListLanguage, &ContactEditorData.BusinessTitleListAltID,
827                 &ContactEditorData.BusinessTitleListPID, &ContactEditorData.BusinessTitleListType,
828                 &ContactEditorData.BusinessTitleListTokens, &ContactEditorData.BusinessTitleListPref);
832 void frmContactEditor::AddBusinessRole( wxCommandEvent& event )
835         int intResult = 0;
836     
837         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
838         frameCERole->SetEditorMode(FALSE, CE_WORK);
839         intResult = GetLastInt(&ContactEditorData.BusinessRoleList);
840         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
841                 &ContactEditorData.BusinessRoleListLanguage,
842                 &ContactEditorData.BusinessRoleListAltID,
843                 &ContactEditorData.BusinessRoleListPID,
844                 &ContactEditorData.BusinessRoleListType,
845                 &ContactEditorData.BusinessRoleListTokens,
846                 &ContactEditorData.BusinessRoleListPref,
847                 lboBusinessRoles,
848                 (intValueSeek));
849         frameCERole->ShowModal();
850         delete frameCERole;
851         frameCERole = NULL;
852         
855 void frmContactEditor::ModifyBusinessRole( wxCommandEvent& event )
858         long longSelected = -1;
859         int intSelectedData = 0;
860     
861         if (!GetSelectedItem(lboBusinessRoles,
862                 &longSelected,
863                 &intSelectedData)){
864                 
865                 return;
866                 
867         }
868     
869         frmContactEditorRoles *frameCERole = new frmContactEditorRoles ( this );
870         frameCERole->SetupPointers(&ContactEditorData.BusinessRoleList,
871                 &ContactEditorData.BusinessRoleListLanguage,
872                 &ContactEditorData.BusinessRoleListAltID,
873                 &ContactEditorData.BusinessRoleListPID,
874                 &ContactEditorData.BusinessRoleListType,
875                 &ContactEditorData.BusinessRoleListTokens,
876                 &ContactEditorData.BusinessRoleListPref,
877                 lboBusinessRoles,
878                 intSelectedData);
879         frameCERole->SetEditorMode(TRUE, CE_WORK);
880         frameCERole->ShowModal();
881         delete frameCERole;
882         frameCERole = NULL;
883         
886 void frmContactEditor::DeleteBusinessRole( wxCommandEvent& event )
889         long longSelected = -1;
890         int intSelectedData = 0;
891     
892         if (!GetSelectedItem(lboBusinessRoles,
893                 &longSelected,
894                 &intSelectedData)){
895                 
896                 return;
897                 
898         }
899     
900         lboBusinessRoles->DeleteItem(longSelected);
901     
902         DeleteMapData(intSelectedData, &ContactEditorData.BusinessRoleList,
903                 &ContactEditorData.BusinessRoleListLanguage, &ContactEditorData.BusinessRoleListAltID,
904                 &ContactEditorData.BusinessRoleListPID, &ContactEditorData.BusinessRoleListType,
905                 &ContactEditorData.BusinessRoleListTokens, &ContactEditorData.BusinessRoleListPref);
906     
909 void frmContactEditor::AddBusinessOrganisation( wxCommandEvent& event )
912         int intResult = 0;
913     
914         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
915         frameCEOrg->SetEditorMode(FALSE, CE_WORK);
916         intResult = GetLastInt(&ContactEditorData.BusinessOrganisationsList);
917         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
918                 &ContactEditorData.BusinessOrganisationsListLanguage,
919                 &ContactEditorData.BusinessOrganisationsListSortAs,
920                 &ContactEditorData.BusinessOrganisationsListAltID,
921                 &ContactEditorData.BusinessOrganisationsListPID,
922                 &ContactEditorData.BusinessOrganisationsListType,
923                 &ContactEditorData.BusinessOrganisationsListTokens,
924                 &ContactEditorData.BusinessOrganisationsListPref,
925                 lboBusinessOrganisations,
926                 (intValueSeek));
927         frameCEOrg->ShowModal();
928         delete frameCEOrg;
929         frameCEOrg = NULL;
930         
933 void frmContactEditor::ModifyBusinessOrganisation( wxCommandEvent& event )
936         long longSelected = -1;
937         int intSelectedData = 0;
938     
939         if (!GetSelectedItem(lboBusinessOrganisations,
940                 &longSelected,
941                 &intSelectedData)){
942                 
943                 return;
944                 
945         }
946     
947         frmContactEditorOrganisations *frameCEOrg = new frmContactEditorOrganisations ( this );
948         frameCEOrg->SetupPointers(&ContactEditorData.BusinessOrganisationsList,
949                 &ContactEditorData.BusinessOrganisationsListLanguage,
950                 &ContactEditorData.BusinessOrganisationsListSortAs,
951                 &ContactEditorData.BusinessOrganisationsListAltID,
952                 &ContactEditorData.BusinessOrganisationsListPID,
953                 &ContactEditorData.BusinessOrganisationsListType,
954                 &ContactEditorData.BusinessOrganisationsListTokens,
955                 &ContactEditorData.BusinessOrganisationsListPref,
956                 lboBusinessOrganisations,
957                 intSelectedData);
958         frameCEOrg->SetEditorMode(TRUE, CE_WORK);
959         frameCEOrg->ShowModal();
960         delete frameCEOrg;
961         frameCEOrg = NULL;
962         
965 void frmContactEditor::DeleteBusinessOrganisation( wxCommandEvent& event )
968         long longSelected = -1;
969         int intSelectedData = 0;
970     
971         if (!GetSelectedItem(lboBusinessOrganisations,
972                 &longSelected,
973                 &intSelectedData)){
974                 
975                 return;
976                 
977         }
978     
979         lboBusinessOrganisations->DeleteItem(longSelected);
980     
981         DeleteMapData(intSelectedData, &ContactEditorData.BusinessOrganisationsList,
982                 &ContactEditorData.BusinessOrganisationsListLanguage, &ContactEditorData.BusinessOrganisationsListSortAs,
983                 &ContactEditorData.BusinessOrganisationsListAltID, &ContactEditorData.BusinessOrganisationsListPID,
984                 &ContactEditorData.BusinessOrganisationsListType, &ContactEditorData.BusinessOrganisationsListTokens,
985                 &ContactEditorData.BusinessOrganisationsListPref);
986     
989 void frmContactEditor::AddBusinessNote( wxCommandEvent& event )
992         int intResult = 0;
993     
994         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
995         frameCENote->SetEditorMode(FALSE, CE_WORK);
996         intResult = GetLastInt(&ContactEditorData.BusinessNoteList);
997         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
998                 &ContactEditorData.BusinessNoteListLanguage,
999                 &ContactEditorData.BusinessNoteListAltID,
1000                 &ContactEditorData.BusinessNoteListPID,
1001                 &ContactEditorData.BusinessNoteListType,
1002                 &ContactEditorData.BusinessNoteListTokens,
1003                 &ContactEditorData.BusinessNoteListPref,
1004                 lboBusinessNotes,
1005                 (intValueSeek));
1006         frameCENote->ShowModal();
1007         delete frameCENote;
1008         frameCENote = NULL;
1009         
1012 void frmContactEditor::ModifyBusinessNote( wxCommandEvent& event )
1015         long longSelected = -1;
1016         int intSelectedData = 0;
1017     
1018         if (!GetSelectedItem(lboBusinessNotes,
1019                 &longSelected,
1020                 &intSelectedData)){
1021                 
1022                 return;
1023                 
1024         }
1025     
1026         frmContactEditorNotes *frameCENote = new frmContactEditorNotes ( this );
1027         frameCENote->SetupPointers(&ContactEditorData.BusinessNoteList,
1028                 &ContactEditorData.BusinessNoteListLanguage,
1029                 &ContactEditorData.BusinessNoteListAltID,
1030                 &ContactEditorData.BusinessNoteListPID,
1031                 &ContactEditorData.BusinessNoteListType,
1032                 &ContactEditorData.BusinessNoteListTokens,
1033                 &ContactEditorData.BusinessNoteListPref,
1034                 lboBusinessNotes,
1035                 intSelectedData);
1036         frameCENote->SetEditorMode(TRUE, CE_WORK);
1037         frameCENote->ShowModal();
1038         delete frameCENote;
1039         frameCENote = NULL;
1040         
1043 void frmContactEditor::DeleteBusinessNote( wxCommandEvent& event )
1046         long longSelected = -1;
1047         int intSelectedData = 0;
1048     
1049         if (!GetSelectedItem(lboBusinessNotes,
1050                 &longSelected,
1051                 &intSelectedData)){
1052                 
1053                 return;
1054                 
1055         }
1056     
1057         lboBusinessNotes->DeleteItem(longSelected);
1058     
1059         DeleteMapData(intSelectedData, &ContactEditorData.BusinessNoteList,
1060                 &ContactEditorData.BusinessNoteListLanguage, &ContactEditorData.BusinessNoteListAltID,
1061                 &ContactEditorData.BusinessNoteListPID, &ContactEditorData.BusinessNoteListType,
1062                 &ContactEditorData.BusinessNoteListTokens, &ContactEditorData.BusinessNoteListPref);
1063     
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