+}
+
+void ContactDataObject::SaveOrganisation(map<int, wxString> *OrganisationList, map<int, wxString> *OrganisationListAltID,
+ map<int, wxString> *OrganisationListPID, map<int, wxString> *OrganisationListLanguage,
+ map<int, wxString> *OrganisationListSortAs, map<int, wxString> *OrganisationListType,
+ map<int, int> *OrganisationListPref, map<int, wxString> *OrganisationListTokens,
+ wxString *SaveData, wxString DataType){
+
+ wxString ProcessData = "";
+
+ for (std::map<int, wxString>::iterator OrganisationIter = OrganisationList->begin();
+ OrganisationIter != OrganisationList->end(); OrganisationIter++){
+
+ ProcessData.Append("ORG");
+
+ // Check if there is a value for TYPE.
+
+ if (DataType.size() > 0){
+
+ ProcessData.Append(";TYPE=");
+ ProcessData.Append(DataType);
+
+ }
+
+ // Check if there is a value for ALTID.
+
+ if ((*OrganisationListAltID)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";ALTID=");
+ ProcessData.Append((*OrganisationListAltID)[OrganisationIter->first]);
+
+ }
+
+ // Check if there is a value for LANGUAGE.
+
+ if ((*OrganisationListLanguage)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";LANGUAGE=");
+ ProcessData.Append((*OrganisationListLanguage)[OrganisationIter->first]);
+
+ }
+
+ // Check if there is a value for PID.
+
+ if ((*OrganisationListPID)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";PID=");
+ ProcessData.Append((*OrganisationListPID)[OrganisationIter->first]);
+
+ }
+
+ // Check if there is a value for PREF.
+
+ if ((*OrganisationListPref)[OrganisationIter->first] > 0){
+
+ ProcessData.Append(";PREF=");
+ ProcessData.Append(wxString::Format("%i", (*OrganisationListPref)[OrganisationIter->first]));
+
+ }
+
+ // Check if there is a value for SORT-AS.
+
+ if ((*OrganisationListSortAs)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";SORT-AS=\"");
+ ProcessData.Append((*OrganisationListSortAs)[OrganisationIter->first]);
+ ProcessData.Append("\"");
+
+ }
+
+ // Check if there is a value for tokens.
+
+ if ((*OrganisationListTokens)[OrganisationIter->first].size() > 0){
+
+ ProcessData.Append(";");
+ ProcessData.Append((*OrganisationListTokens)[OrganisationIter->first]);
+
+ }
+
+ ProcessData.Append(":");
+ ProcessData.Append(OrganisationIter->second);
+ ProcessData.Append("\n");
+
+ ProcessData = OutputText(&ProcessData);
+
+ SaveData->Append(ProcessData);
+ ProcessData.clear();
+
+ }
+