public BusLocator(Company company, Email[] eMail, Telephone[] phone, BusAddress[] address) { this.company = company; this.eMail = eMail; this.phone = phone; this.address = address; }
private CidPerson create_CID_object(DataRow single_person) { #region CidPerson hpCust //new CidPerson(string personIdentifier, Person person, Password password, ContactPref[] contactPreferences, PersLocator[] persLocators, BusLocator[] busLocators) string personIdentifier = ""; #region Person person //new Person(string titleName, string givenName, string initialsName, string familyName, string suffixName, string generationQualifierName, string residenceCountryCode, string preferredLanguageCode, _Date currentAsOfDate, IsolationStatus isolationStatus) string titleName = ""; string givenName = single_person[constants.COL_PROF_FIRST_NAME].ToString(); string initialsName = ""; string familyName = single_person[constants.COL_PROF_LAST_NAME].ToString(); string suffixName = ""; string generationQualifierName = ""; string residenceCountryCode = single_person[constants.COL_PROF_COUNTRY_CODE].ToString(); string preferredLanguageCode = single_person[constants.COL_PROF_LANGUAGE_CODE].ToString(); #region _Date currentAsOfDate //new _Date(int year, int month, int day, int hour, int minute, int second); DateTime response_time = DateTime.Parse(single_person[constants.COL_RESPONSE_TIME].ToString()); int year = response_time.Year; int month = response_time.Month; int day = response_time.Day; int hour = response_time.Hour; int minute = response_time.Minute; int second = response_time.Second; _Date currentAsOfDate = new _Date(year, month, day, hour, minute, second); #endregion #region IsolationStatus isolationStatus //new IsolationStatus(string isolationStatusCode, currentAsOfDate); string isolationStatusCode = ""; IsolationStatus isolationStatus = new IsolationStatus(isolationStatusCode, currentAsOfDate); #endregion Person person = new Person(titleName, givenName, initialsName, familyName, suffixName, generationQualifierName, residenceCountryCode, preferredLanguageCode, currentAsOfDate, isolationStatus); //Person person = new Person(null, givenName, null, familyName, null, null, residenceCountryCode, preferredLanguageCode, currentAsOfDate, isolationStatus); //doesn't work with null's!! #endregion #region Password password //new Password(string loginName, string passwordCode, string pinNr) string loginName = ""; string passwordCode = ""; string pinNr = ""; Password password = new Password(loginName, passwordCode, pinNr); #endregion #region ContactPref[] contactPreferences //new ContactPref[] {ContactPref contactPreference_email, ContactPref contactPreference_phone, ContactPref contactPreference_post} convert_contact_prefs(single_person); int number = -1; #region ContactPref contactPreference_email //new ContactPref(char contactTypeCode, char contactPrefCode, currentAsOfDate); ContactPref contactPreference_email = new ContactPref(' ', ' ', currentAsOfDate); if (email_pref_type != "") { number += 1; contactPreference_email.contactTypeCode = email_pref_type.ToCharArray()[0]; contactPreference_email.contactPrefCode = email_pref_code.ToCharArray()[0]; } #endregion #region ContactPref contactPreference_phone //new ContactPref(char contactTypeCode, char contactPrefCode, currentAsOfDate); ContactPref contactPreference_phone = new ContactPref(' ', ' ', currentAsOfDate); if (phone_pref_type != "") { number += 2; contactPreference_phone.contactTypeCode = phone_pref_type.ToCharArray()[0]; contactPreference_phone.contactPrefCode = phone_pref_code.ToCharArray()[0]; } #endregion #region ContactPref contactPreference_post //new ContactPref(char contactTypeCode, char contactPrefCode, currentAsOfDate); ContactPref contactPreference_post = new ContactPref(' ', ' ', currentAsOfDate); if (mail_pref_type != "") { number += 4; contactPreference_post.contactTypeCode = mail_pref_type.ToCharArray()[0]; contactPreference_post.contactPrefCode = mail_pref_code.ToCharArray()[0]; } #endregion //TODO: cid: definition von array in AP 2.9 nachschlagen: The order of the Contact Preference entries in the Contact Preference array need not be passed to CID-Person in a fixed order. The array should, however, contain each and every contact type code (E, T, M P and F) and only one instance of each contact type code. //dynamisches array erstellen!!! wenn email_pref_type == "" dann nix mit email, etc. ContactPref[] contactPreferences0 = new ContactPref[] {contactPreference_email}; ContactPref[] contactPreferences1 = new ContactPref[] {contactPreference_phone}; ContactPref[] contactPreferences2 = new ContactPref[] {contactPreference_email, contactPreference_phone}; ContactPref[] contactPreferences3 = new ContactPref[] {contactPreference_post}; ContactPref[] contactPreferences4 = new ContactPref[] {contactPreference_email, contactPreference_post}; ContactPref[] contactPreferences5 = new ContactPref[] {contactPreference_phone, contactPreference_post}; ContactPref[] contactPreferences6 = new ContactPref[] {contactPreference_email, contactPreference_phone, contactPreference_post}; object[] ContactPrefs = new object[] {contactPreferences0, contactPreferences1, contactPreferences2, contactPreferences3, contactPreferences4, contactPreferences5, contactPreferences6}; ContactPref[] contactPreferences = (ContactPref[])ContactPrefs[number]; #endregion #region PersLocator[] persLocators //new PersLocator[] {PersLocator persLocator} #region PersLocator persLocator //new PersLocator(Email[] eMails, Telephone[] phones, Address[] addresses) #region Email[] eMails //new Email[]{Email eMail} #region Email eMail //new Email(string eMailAddressName, currentAsOfDate); string eMailAddressName = single_person[constants.COL_PROF_EMAIL_ADDRESS].ToString(); Email eMail = new Email(eMailAddressName, currentAsOfDate); #endregion Email[] eMails = new Email[]{eMail}; #endregion #region Telephone[] phones /* //new Telephone[] {Telephone phone} #region Telephone phone //new Telephone(string countryAccessCode, string cityCode, string localNumber, string extensionCode, char typeCode, currentAsOfDate); //dependant on the user's country... must be derived from the country_code string countryAccessCode = ""; //only mandatory when countryAccessCode = "1" = "Northern America" //string cityCode = ""; string localNumber = single_person[constants.COL_PROF_TELEPHONE].ToString(); //string extensionCode = ""; //can be 'V'=Voice, 'F'=Fax, 'M'=Mobile char typeCode = 'V'; //will be set to voice by default //Telephone phone = new Telephone(countryAccessCode, cityCode, localNumber, extensionCode, typeCode, currentAsOfDate); Telephone phone = new Telephone(countryAccessCode, null, localNumber, null, typeCode, currentAsOfDate); #endregion Telephone[] phones = new Telephone[] {phone}; */ Telephone[] phones = new Telephone[] {}; #endregion #region Address[] addresses -- address details will be delivered in busLocator! //new Address[] {Address address}; #region Address address //new Address(bool isHybrid, bool stdOverideFlag, string buildingName, string cityAreaName, string cityName, string citySubAreaName, string geoSubAreaName, string geoAreaAbbrName, string geoAreaName, string postBoxNumber, string postAddressName, string postalCode, string streetAddressName, string streetDesignatorName, string countryCode, currentAsOfDate, AddressHyb addressHyb, AddressInformation addrInfo); bool isHybrid = true; bool stdOverideFlag = true; string buildingName = ""; string cityAreaName = ""; string cityName = single_person[constants.COL_PROF_TOWN].ToString(); string citySubAreaName = ""; string geoSubAreaName = ""; string geoAreaAbbrName = ""; string geoAreaName = single_person[constants.COL_PROF_COUNTY].ToString(); string postBoxNumber = ""; string postAddressName = ""; string postalCode = single_person[constants.COL_PROF_POSTCODE].ToString(); string streetAddressName = ""; string streetDesignatorName = ""; string countryCode = single_person[constants.COL_PROF_COUNTRY].ToString(); #region AddressHyb addressHyb //new AddressHyb(bool stdOverrideFlag, string addressLine1, string addressLine2, string addressLine3, string cityName, string cityAreaName, string geoAreaName, string postalCode, string countryCode, currentAsOfDate); bool stdOverrideFlag = true; string addressLine1 = single_person[constants.COL_PROF_ADDRESS1].ToString(); string addressLine2 = single_person[constants.COL_PROF_ADDRESS2].ToString(); string addressLine3 = single_person[constants.COL_PROF_ADDRESS3].ToString(); //string cityName = single_person[constants.COL_PROF_TOWN].ToString(); // string cityAreaName = ""; //string geoAreaName = single_person[constants.COL_PROF_COUNTY].ToString(); //string postalCode = single_person[constants.COL_PROF_POSTCODE].ToString(); //string countryCode = single_person[constants.COL_PROF_COUNTRY].ToString(); AddressHyb addressHyb = new AddressHyb(stdOverrideFlag, addressLine1, addressLine2, addressLine3, cityName, cityAreaName, countryCode, geoAreaName, postalCode, currentAsOfDate); //old idl AddressHyb addressHyb = new AddressHyb(stdOverrideFlag, addressLine1, addressLine2, addressLine3, cityName, cityAreaName, geoAreaName, postalCode, countryCode, currentAsOfDate); //AddressHyb addressHyb = new AddressHyb(stdOverrideFlag, addressLine1, addressLine2, addressLine3, cityName, null, geoAreaName, postalCode, countryCode, currentAsOfDate); #endregion #region AddressInformation addrInfo //new AddressInformation(string addressId, string faultCode, char stdCode, bool addrFlag, string extraAddress, string statusCode, string assignmentType, string addressType, string matchPotential, string matchLevel); string addressId = ""; //string faultCode = ""; char stdCode = '\0'; bool addrFlag = true; string extraAddress = ""; string statusCode = ""; string assignmentType = ""; string addressType = ""; string matchPotential = ""; string matchLevel = ""; AddressInformation addrInfo = new AddressInformation(stdCode, addrFlag, addressId, addressType, assignmentType, extraAddress, //faultCode, matchLevel, matchPotential, statusCode); //old idl AddressInformation addrInfo = new AddressInformation(addressId, faultCode, stdCode, addrFlag, extraAddress, statusCode, assignmentType, addressType, matchPotential, matchLevel); #endregion Address address = new Address(isHybrid, stdOverideFlag, buildingName, cityAreaName, cityName, citySubAreaName, countryCode, geoSubAreaName, geoAreaAbbrName, geoAreaName, postBoxNumber, postAddressName, postalCode, streetAddressName, streetDesignatorName, currentAsOfDate, addressHyb, addrInfo); //old id Address address = new Address(isHybrid, stdOverideFlag, buildingName, cityAreaName, cityName, citySubAreaName, geoSubAreaName, geoAreaAbbrName, geoAreaName, postBoxNumber, postAddressName, postalCode, streetAddressName, streetDesignatorName, countryCode, currentAsOfDate, addressHyb, addrInfo); //Address address = new Address(isHybrid, stdOverideFlag, null, null, null, null, null, null, null, null, null, null, null, null, null, currentAsOfDate, addressHyb, addrInfo); #endregion Address[] addresses = new Address[] {address}; //Address[] addresses = new Address[] {}; #endregion PersLocator persLocator = new PersLocator(eMails, phones, addresses); #endregion PersLocator[] persLocators = new PersLocator[] {persLocator}; #endregion #region BusLocator[] busLocators //new BusLocator[] {BusLocator busLocators} #region BusLocator busLocator //new BusLocator(Company company, Email[] eMails, Telephone[] phones, BusAddress[] bus_addresses); #region Company company //new Company(string organizationName); string organizationName = single_person[constants.COL_PROF_COMPANY_NAME].ToString(); Company company = new Company(organizationName); #endregion #region Email[] eMails -- use from above //new Email[]{Email eMail} #region Email eMail //new Email(string eMailAddressName, currentAsOfDate); // string eMailAddressName = ""; // Email eMail = new Email(eMailAddressName, currentAsOfDate); #endregion // Email[] eMails = new Email[]{eMail}; #endregion #region Telephone[] phones -- use from above //new Telephone[] {Telephone phone} #region Telephone phone //new Telephone(string countryAccessCode, string cityCode, string localNumber, string extensionCode, char typeCode, currentAsOfDate); // string countryAccessCode = ""; // string cityCode = ""; // string localNumber = ""; // string extensionCode = ""; // char typeCode = ' '; // // Telephone phone = new Telephone(countryAccessCode, cityCode, localNumber, extensionCode, typeCode, currentAsOfDate); #endregion // Telephone[] phones = new Telephone[] {phone}; #endregion #region BusAddress[] bus_addresses //new BusAddress[] {BusAddress bus_address}; #region BusAddress bus_address //new BusAddress(Address bus_address_a, string mailStop); #region Address bus_address_a //new Address(bool isHybrid, bool stdOverideFlag, string buildingName, string cityAreaName, string cityName, string citySubAreaName, string geoSubAreaName, string geoAreaAbbrName, string geoAreaName, string postBoxNumber, string postAddressName, string postalCode, string streetAddressName, string streetDesignatorName, string countryCode, currentAsOfDate, AddressHyb addressHyb, AddressInformation addrInfo); // bool isHybrid = true; // bool stdOverideFlag = true; // string buildingName = ""; // string cityAreaName = ""; // string cityName = ""; // string citySubAreaName = ""; // string geoSubAreaName = ""; // string geoAreaAbbrName = ""; // string geoAreaName = ""; // string postBoxNumber = ""; // string postAddressName = ""; // string postalCode = ""; // string streetAddressName = ""; // string streetDesignatorName = ""; // string countryCode = ""; #region AddressHyb addressHyb //new AddressHyb(bool stdOverrideFlag, string addressLine1, string addressLine2, string addressLine3, string cityName, string cityAreaName, string geoAreaName, string postalCode, string countryCode, currentAsOfDate); // bool stdOverrideFlag = true; // string addressLine1 = ""; // string addressLine2 = ""; // string addressLine3 = ""; // string cityName = ""; // string cityAreaName = ""; // string geoAreaName = ""; // string postalCode = ""; // string countryCode = ""; // AddressHyb addressHyb = new AddressHyb(stdOverrideFlag, addressLine1, addressLine2, addressLine3, cityName, cityAreaName, geoAreaName, postalCode, countryCode, currentAsOfDate); #endregion #region AddressInformation addrInfo //new AddressInformation(string addressId, string faultCode, char stdCode, bool addrFlag, string extraAddress, string statusCode, string assignmentType, string addressType, string matchPotential, string matchLevel); // string addressId = ""; // string faultCode = ""; // char stdCode = ' '; // bool addrFlag = true; // string extraAddress = ""; // string statusCode = ""; // string assignmentType = ""; // string addressType = ""; // string matchPotential = ""; // string matchLevel = ""; // // AddressInformation addrInfo = new AddressInformation(addressId, faultCode, stdCode, addrFlag, extraAddress, statusCode, assignmentType, addressType, matchPotential, matchLevel); #endregion Address bus_address_a = new Address(isHybrid, stdOverideFlag, buildingName, cityAreaName, cityName, citySubAreaName, geoSubAreaName, geoAreaAbbrName, geoAreaName, postBoxNumber, postAddressName, postalCode, streetAddressName, streetDesignatorName, countryCode, currentAsOfDate, addressHyb, addrInfo); //Address bus_address_a = new Address(isHybrid, stdOverideFlag, null, null, null, null, null, null, null, null, null, null, null, null, null, currentAsOfDate, addressHyb, addrInfo); #endregion string mailStop = ""; BusAddress bus_address = new BusAddress(bus_address_a, mailStop); //BusAddress bus_address = new BusAddress(bus_address_a, null); #endregion BusAddress[] bus_addresses = new BusAddress[] {bus_address}; //BusAddress[] bus_addresses = new BusAddress[] {}; #endregion BusLocator busLocator = new BusLocator(company, eMails, phones, bus_addresses); #endregion BusLocator[] busLocators = new BusLocator[] {busLocator}; #endregion CidPerson hpCust = new CidPerson(personIdentifier, person, password, contactPreferences, persLocators, busLocators); return hpCust; #endregion }