コード例 #1
0
ファイル: Customer.cs プロジェクト: koty/HighLandirect
        //private string ValidateEmail(object objectInstance, string memberName)
        //{
        //    if (!string.IsNullOrEmpty(Email))
        //    {
        //        if (Email.Length > 100)
        //        {
        //            return string.Format(CultureInfo.CurrentCulture, Resources.EmailMaxLength, 100);
        //        }
        //        if (!emailValidationRegex.IsMatch(Email))
        //        {
        //            return Resources.EmailInvalid;
        //        }
        //    }
        //    return "";
        //}

        public void SetAddress(PostalCDGetter postalConverter)
        {
            this.PrefectureName = postalConverter.Prefecture;
            //this.CityName = postalConverter.City;
            this.Address1 = postalConverter.City;
            this.Address2 = postalConverter.Address;
        }
コード例 #2
0
ファイル: Customer.cs プロジェクト: koty/HighLandirect
 //private string ValidateEmail(object objectInstance, string memberName)
 //{
 //    if (!string.IsNullOrEmpty(Email))
 //    {
 //        if (Email.Length > 100)
 //        {
 //            return string.Format(CultureInfo.CurrentCulture, Resources.EmailMaxLength, 100);
 //        }
 //        if (!emailValidationRegex.IsMatch(Email))
 //        {
 //            return Resources.EmailInvalid;
 //        }
 //    }
 //    return "";
 //}
 public void SetAddress(PostalCDGetter postalConverter)
 {
     this.PrefectureName = postalConverter.Prefecture;
     //this.CityName = postalConverter.City;
     this.Address1 = postalConverter.City;
     this.Address2 = postalConverter.Address;
 }
コード例 #3
0
 private void SetJusho(string PostalCD)
 {
     var postalConverter = new PostalCDGetter();
     postalConverter.GetAddress(PostalCD);
     customer.SetAddress(postalConverter);
 }