public bool Equals(IXLStyle other) { return (Font.Equals(other.Font) && Fill.Equals(other.Fill) && Border.Equals(other.Border) && NumberFormat.Equals(other.NumberFormat) && Alignment.Equals(other.Alignment) && Protection.Equals(other.Protection) ); }
public RegisterOplysningType ToRegisterOplysningType(WS_AS78205.EnglishAS78205Response addressResponse) { var ret = new RegisterOplysningType() { Item = null, Virkning = VirkningType.Create(null, null) }; // TODO: Always return CprBorgerType !!!! if (string.Equals(NationalityCode, Constants.DanishNationalityCode)) { ret.Item = new CprBorgerType() { PersonCivilRegistrationIdentifier = PNR, PersonNationalityCode = Schemas.Part.CountryIdentificationCodeType.Create(CprBroker.Schemas.Part._CountryIdentificationSchemeType.imk, NationalityCode), FolkeregisterAdresse = addressResponse.ToAdresseType(), // Research protection ForskerBeskyttelseIndikator = Protection.Equals(Constants.ResearchProtection), // Name and address protection NavneAdresseBeskyttelseIndikator = Protection.Equals(Constants.AddressProtection), // Church membership // TODO: Shall this be ChurchRelationship = 'F'? FolkekirkeMedlemIndikator = ChurchRelationship.Length > 0, // No address note AdresseNoteTekst = null, //PNR validity status // TODO: Shall this be set as other providers, false if status is 30,50,60 ? PersonNummerGyldighedStatusIndikator = int.Parse(ReturnCode) < 10, // TODO: Check if this is correct TelefonNummerBeskyttelseIndikator = Protection.Equals(Constants.AddressProtection), }; ret.Virkning.FraTidspunkt = TidspunktType.Create(Utilities.GetMaxDate(AddressDate, RelocationDate, ImmigrationDate)); } else if (!string.IsNullOrEmpty(NationalityCode)) { // TODO: Validate all data in this structure ret.Item = new UdenlandskBorgerType() { // Birth country.Not in KMD FoedselslandKode = null, // TODO: What is that? PersonIdentifikator = "", // Languages. Not implemented here SprogKode = new CprBroker.Schemas.Part.CountryIdentificationCodeType[0], // Citizenships PersonNationalityCode = new CprBroker.Schemas.Part.CountryIdentificationCodeType[] { CprBroker.Schemas.Part.CountryIdentificationCodeType.Create(CprBroker.Schemas.Part._CountryIdentificationSchemeType.imk, NationalityCode) }, PersonCivilRegistrationReplacementIdentifier = PNR, }; ret.Virkning.FraTidspunkt = TidspunktType.Create(Utilities.GetMaxDate(ImmigrationDate, AbroadDate)); } else { // TODO: Validate all data in this structure ret.Item = new UkendtBorgerType() { PersonCivilRegistrationReplacementIdentifier = PNR, }; ret.Virkning.FraTidspunkt = TidspunktType.Create(Utilities.GetMaxDate(AbroadDate, AddressDate, DisempowermentDate, ImmigrationDate, PaternityDate, RelocationDate, StatusDate)); } return(ret); }