internal static IEnumerable<string> Addresses(Address_Type[] addresses, string module) { List<string> errors = new List<string>(); foreach (var address in addresses) { errors.AddRange(Address(address, module)); } return errors; }
internal static IEnumerable<string> Address(Address_Type address, string module) { List<string> errors = new List<string>(); if (LUObjNotValid(address.AddressTypeCode)) { errors.Add(module + " addressTypeCode"); } if (string.IsNullOrWhiteSpace(address.Line1)) { errors.Add(module + " address line1"); } if (string.IsNullOrWhiteSpace(address.Line2)) { errors.Add(module + " address line2"); } if (string.IsNullOrWhiteSpace(address.City)) { errors.Add(module + " address city"); } if (LUObjNotValid(address.AddressStateTC)) { errors.Add(module + " addressStateTC"); } if (LUObjNotValid(address.AddressCountryTC)) { errors.Add(module + " AddressCountryTC"); } if (string.IsNullOrWhiteSpace(address.Zip)) { errors.Add(module + " address zip"); } return errors; }
/// <summary> /// Link_Class constructor. /// </summary> /// <param name="Address_type">The address type, chosen from the enum.</param> /// <param name="address_value">The ddress value.</param> public Link_Addr(Address_Type Address_type, string address_value) { this.Address_type = Address_type; this.Address_value = address_value; }