コード例 #1
0
        /// <summary>
        /// Convert a nettiers collection to the ws proxy collection.
        /// </summary>
        public static VIndividualCustomer Convert(WsProxy.VIndividualCustomer item)
        {
            VIndividualCustomer outItem = new VIndividualCustomer();

            outItem.CustomerId        = item.CustomerId;
            outItem.Title             = item.Title;
            outItem.FirstName         = item.FirstName;
            outItem.MiddleName        = item.MiddleName;
            outItem.LastName          = item.LastName;
            outItem.Suffix            = item.Suffix;
            outItem.Phone             = item.Phone;
            outItem.EmailAddress      = item.EmailAddress;
            outItem.EmailPromotion    = item.EmailPromotion;
            outItem.AddressType       = item.AddressType;
            outItem.AddressLine1      = item.AddressLine1;
            outItem.AddressLine2      = item.AddressLine2;
            outItem.City              = item.City;
            outItem.StateProvinceName = item.StateProvinceName;
            outItem.PostalCode        = item.PostalCode;
            outItem.CountryRegionName = item.CountryRegionName;
            outItem.Demographics      = item.Demographics;

            outItem.AcceptChanges();
            return(outItem);
        }
		/// <summary>
		/// Convert a nettiers entity to the ws proxy entity.
		/// </summary>
		public static WsProxy.VIndividualCustomer Convert(VIndividualCustomer item)
		{			
			WsProxy.VIndividualCustomer outItem = new WsProxy.VIndividualCustomer();			
			outItem.CustomerId = item.CustomerId;
			outItem.Title = item.Title;
			outItem.FirstName = item.FirstName;
			outItem.MiddleName = item.MiddleName;
			outItem.LastName = item.LastName;
			outItem.Suffix = item.Suffix;
			outItem.Phone = item.Phone;
			outItem.EmailAddress = item.EmailAddress;
			outItem.EmailPromotion = item.EmailPromotion;
			outItem.AddressType = item.AddressType;
			outItem.AddressLine1 = item.AddressLine1;
			outItem.AddressLine2 = item.AddressLine2;
			outItem.City = item.City;
			outItem.StateProvinceName = item.StateProvinceName;
			outItem.PostalCode = item.PostalCode;
			outItem.CountryRegionName = item.CountryRegionName;
			outItem.Demographics = item.Demographics;
							
			return outItem;
		}