コード例 #1
0
        void WalkCustomerRet(ICustomerRet CustomerRet)
        {
            if (CustomerRet == null)
            {
                return;
            }
            if (CustomerRet.ShipToAddressList == null)
            {
                return;
            }
            //Go through all the elements of ICustomerRetList
            //Get value of ListID
            string ListID5 = (string)CustomerRet.ListID.GetValue();
            //Get value of TimeCreated
            DateTime TimeCreated6 = (DateTime)CustomerRet.TimeCreated.GetValue();
            //Get value of TimeModified
            DateTime TimeModified7 = (DateTime)CustomerRet.TimeModified.GetValue();
            //Get value of EditSequence
            string EditSequence8 = (string)CustomerRet.EditSequence.GetValue();
            //Get value of Name
            string Name9 = (string)CustomerRet.Name.GetValue();
            //Get value of FullName
            string FullName10 = (string)CustomerRet.FullName.GetValue();

            //Get value of IsActive

            if (CustomerRet.IsActive != null)
            {
                bool IsActive11 = (bool)CustomerRet.IsActive.GetValue();
            }
            if (CustomerRet.ClassRef != null)
            {
                //Get value of ListID
                if (CustomerRet.ClassRef.ListID != null)
                {
                    string ListID12 = (string)CustomerRet.ClassRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.ClassRef.FullName != null)
                {
                    string FullName13 = (string)CustomerRet.ClassRef.FullName.GetValue();
                }
            }
            if (CustomerRet.ParentRef != null)
            {
                //Get value of ListID
                if (CustomerRet.ParentRef.ListID != null)
                {
                    string ListID14 = (string)CustomerRet.ParentRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.ParentRef.FullName != null)
                {
                    string FullName15 = (string)CustomerRet.ParentRef.FullName.GetValue();
                }
            }
            //Get value of Sublevel
            int Sublevel16 = (int)CustomerRet.Sublevel.GetValue();

            //Get value of CompanyName
            if (CustomerRet.CompanyName != null)
            {
                string CompanyName17 = (string)CustomerRet.CompanyName.GetValue();
            }
            //Get value of Salutation
            if (CustomerRet.Salutation != null)
            {
                string Salutation18 = (string)CustomerRet.Salutation.GetValue();
            }
            //Get value of FirstName
            if (CustomerRet.FirstName != null)
            {
                string FirstName19 = (string)CustomerRet.FirstName.GetValue();
            }
            //Get value of MiddleName
            if (CustomerRet.MiddleName != null)
            {
                string MiddleName20 = (string)CustomerRet.MiddleName.GetValue();
            }
            //Get value of LastName
            if (CustomerRet.LastName != null)
            {
                string LastName21 = (string)CustomerRet.LastName.GetValue();
            }
            //Get value of JobTitle
            if (CustomerRet.JobTitle != null)
            {
                string JobTitle22 = (string)CustomerRet.JobTitle.GetValue();
            }
            if (CustomerRet.BillAddress != null)
            {
                //Get value of Addr1
                if (CustomerRet.BillAddress.Addr1 != null)
                {
                    string Addr123 = (string)CustomerRet.BillAddress.Addr1.GetValue();
                }
                //Get value of Addr2
                if (CustomerRet.BillAddress.Addr2 != null)
                {
                    string Addr224 = (string)CustomerRet.BillAddress.Addr2.GetValue();
                }
                //Get value of Addr3
                if (CustomerRet.BillAddress.Addr3 != null)
                {
                    string Addr325 = (string)CustomerRet.BillAddress.Addr3.GetValue();
                }
                //Get value of Addr4
                if (CustomerRet.BillAddress.Addr4 != null)
                {
                    string Addr426 = (string)CustomerRet.BillAddress.Addr4.GetValue();
                }
                //Get value of Addr5
                if (CustomerRet.BillAddress.Addr5 != null)
                {
                    string Addr527 = (string)CustomerRet.BillAddress.Addr5.GetValue();
                }
                //Get value of City
                if (CustomerRet.BillAddress.City != null)
                {
                    string City28 = (string)CustomerRet.BillAddress.City.GetValue();
                }
                //Get value of State
                if (CustomerRet.BillAddress.State != null)
                {
                    string State29 = (string)CustomerRet.BillAddress.State.GetValue();
                }
                //Get value of PostalCode
                if (CustomerRet.BillAddress.PostalCode != null)
                {
                    string PostalCode30 = (string)CustomerRet.BillAddress.PostalCode.GetValue();
                }
                //Get value of Country
                if (CustomerRet.BillAddress.Country != null)
                {
                    string Country31 = (string)CustomerRet.BillAddress.Country.GetValue();
                }
                //Get value of Note
                if (CustomerRet.BillAddress.Note != null)
                {
                    string Note32 = (string)CustomerRet.BillAddress.Note.GetValue();
                }
            }
            if (CustomerRet.BillAddressBlock != null)
            {
                //Get value of Addr1
                if (CustomerRet.BillAddressBlock.Addr1 != null)
                {
                    string Addr133 = (string)CustomerRet.BillAddressBlock.Addr1.GetValue();
                }
                //Get value of Addr2
                if (CustomerRet.BillAddressBlock.Addr2 != null)
                {
                    string Addr234 = (string)CustomerRet.BillAddressBlock.Addr2.GetValue();
                }
                //Get value of Addr3
                if (CustomerRet.BillAddressBlock.Addr3 != null)
                {
                    string Addr335 = (string)CustomerRet.BillAddressBlock.Addr3.GetValue();
                }
                //Get value of Addr4
                if (CustomerRet.BillAddressBlock.Addr4 != null)
                {
                    string Addr436 = (string)CustomerRet.BillAddressBlock.Addr4.GetValue();
                }
                //Get value of Addr5
                if (CustomerRet.BillAddressBlock.Addr5 != null)
                {
                    string Addr537 = (string)CustomerRet.BillAddressBlock.Addr5.GetValue();
                }
            }
            if (CustomerRet.ShipAddress != null)
            {
                //Get value of Addr1
                if (CustomerRet.ShipAddress.Addr1 != null)
                {
                    string Addr138 = (string)CustomerRet.ShipAddress.Addr1.GetValue();
                }
                //Get value of Addr2
                if (CustomerRet.ShipAddress.Addr2 != null)
                {
                    string Addr239 = (string)CustomerRet.ShipAddress.Addr2.GetValue();
                }
                //Get value of Addr3
                if (CustomerRet.ShipAddress.Addr3 != null)
                {
                    string Addr340 = (string)CustomerRet.ShipAddress.Addr3.GetValue();
                }
                //Get value of Addr4
                if (CustomerRet.ShipAddress.Addr4 != null)
                {
                    string Addr441 = (string)CustomerRet.ShipAddress.Addr4.GetValue();
                }
                //Get value of Addr5
                if (CustomerRet.ShipAddress.Addr5 != null)
                {
                    string Addr542 = (string)CustomerRet.ShipAddress.Addr5.GetValue();
                }
                //Get value of City
                if (CustomerRet.ShipAddress.City != null)
                {
                    string City43 = (string)CustomerRet.ShipAddress.City.GetValue();
                }
                //Get value of State
                if (CustomerRet.ShipAddress.State != null)
                {
                    string State44 = (string)CustomerRet.ShipAddress.State.GetValue();
                }
                //Get value of PostalCode
                if (CustomerRet.ShipAddress.PostalCode != null)
                {
                    string PostalCode45 = (string)CustomerRet.ShipAddress.PostalCode.GetValue();
                }
                //Get value of Country
                if (CustomerRet.ShipAddress.Country != null)
                {
                    string Country46 = (string)CustomerRet.ShipAddress.Country.GetValue();
                }
                //Get value of Note
                if (CustomerRet.ShipAddress.Note != null)
                {
                    string Note47 = (string)CustomerRet.ShipAddress.Note.GetValue();
                }
            }

            if (CustomerRet.ShipAddressBlock != null)
            {
                //Get value of Addr1
                if (CustomerRet.ShipAddressBlock.Addr1 != null)
                {
                    string Addr148 = (string)CustomerRet.ShipAddressBlock.Addr1.GetValue();
                }
                //Get value of Addr2
                if (CustomerRet.ShipAddressBlock.Addr2 != null)
                {
                    string Addr249 = (string)CustomerRet.ShipAddressBlock.Addr2.GetValue();
                }
                //Get value of Addr3
                if (CustomerRet.ShipAddressBlock.Addr3 != null)
                {
                    string Addr350 = (string)CustomerRet.ShipAddressBlock.Addr3.GetValue();
                }
                //Get value of Addr4
                if (CustomerRet.ShipAddressBlock.Addr4 != null)
                {
                    string Addr451 = (string)CustomerRet.ShipAddressBlock.Addr4.GetValue();
                }
                //Get value of Addr5
                if (CustomerRet.ShipAddressBlock.Addr5 != null)
                {
                    string Addr552 = (string)CustomerRet.ShipAddressBlock.Addr5.GetValue();
                }
            }
            if (CustomerRet.ShipToAddressList != null)
            {
                for (int i53 = 0; i53 < CustomerRet.ShipToAddressList.Count; i53++)
                {
                    IShipToAddress ShipToAddress = CustomerRet.ShipToAddressList.GetAt(i53);
                    //Get value of Name
                    string Name54 = (string)ShipToAddress.Name.GetValue();
                    //Get value of Addr1
                    if (ShipToAddress.Addr1 != null)
                    {
                        string Addr155 = (string)ShipToAddress.Addr1.GetValue();
                    }
                    //Get value of Addr2
                    if (ShipToAddress.Addr2 != null)
                    {
                        string Addr256 = (string)ShipToAddress.Addr2.GetValue();
                    }
                    //Get value of Addr3
                    if (ShipToAddress.Addr3 != null)
                    {
                        string Addr357 = (string)ShipToAddress.Addr3.GetValue();
                    }
                    //Get value of Addr4
                    if (ShipToAddress.Addr4 != null)
                    {
                        string Addr458 = (string)ShipToAddress.Addr4.GetValue();
                    }
                    //Get value of Addr5
                    if (ShipToAddress.Addr5 != null)
                    {
                        string Addr559 = (string)ShipToAddress.Addr5.GetValue();
                    }
                    //Get value of City
                    if (ShipToAddress.City != null)
                    {
                        string City60 = (string)ShipToAddress.City.GetValue();
                    }
                    //Get value of State
                    if (ShipToAddress.State != null)
                    {
                        string State61 = (string)ShipToAddress.State.GetValue();
                    }
                    //Get value of PostalCode
                    if (ShipToAddress.PostalCode != null)
                    {
                        string PostalCode62 = (string)ShipToAddress.PostalCode.GetValue();
                    }
                    //Get value of Country
                    if (ShipToAddress.Country != null)
                    {
                        string Country63 = (string)ShipToAddress.Country.GetValue();
                    }
                    //Get value of Note
                    if (ShipToAddress.Note != null)
                    {
                        string Note64 = (string)ShipToAddress.Note.GetValue();
                    }
                    //Get value of DefaultShipTo
                    if (ShipToAddress.DefaultShipTo != null)
                    {
                        bool DefaultShipTo65 = (bool)ShipToAddress.DefaultShipTo.GetValue();
                    }
                }
            }
            //Get value of Phone
            if (CustomerRet.Phone != null)
            {
                string Phone66 = (string)CustomerRet.Phone.GetValue();
            }
            //Get value of AltPhone
            if (CustomerRet.AltPhone != null)
            {
                string AltPhone67 = (string)CustomerRet.AltPhone.GetValue();
            }
            //Get value of Fax
            if (CustomerRet.Fax != null)
            {
                string Fax68 = (string)CustomerRet.Fax.GetValue();
            }
            //Get value of Email
            if (CustomerRet.Email != null)
            {
                string Email69 = (string)CustomerRet.Email.GetValue();
            }
            //Get value of Cc
            if (CustomerRet.Cc != null)
            {
                string Cc70 = (string)CustomerRet.Cc.GetValue();
            }
            //Get value of Contact
            if (CustomerRet.Contact != null)
            {
                string Contact71 = (string)CustomerRet.Contact.GetValue();
            }
            //Get value of AltContact
            if (CustomerRet.AltContact != null)
            {
                string AltContact72 = (string)CustomerRet.AltContact.GetValue();
            }

            if (CustomerRet.ContactsRetList != null)
            {
                for (int i76 = 0; i76 < CustomerRet.ContactsRetList.Count; i76++)
                {
                    IContactsRet ContactsRet = CustomerRet.ContactsRetList.GetAt(i76);
                    //Get value of ListID
                    string ListID77 = (string)ContactsRet.ListID.GetValue();
                    //Get value of TimeCreated
                    DateTime TimeCreated78 = (DateTime)ContactsRet.TimeCreated.GetValue();
                    //Get value of TimeModified
                    DateTime TimeModified79 = (DateTime)ContactsRet.TimeModified.GetValue();
                    //Get value of EditSequence
                    string EditSequence80 = (string)ContactsRet.EditSequence.GetValue();
                    //Get value of Contact
                    if (ContactsRet.Contact != null)
                    {
                        string Contact81 = (string)ContactsRet.Contact.GetValue();
                    }
                    //Get value of Salutation
                    if (ContactsRet.Salutation != null)
                    {
                        string Salutation82 = (string)ContactsRet.Salutation.GetValue();
                    }
                    //Get value of FirstName
                    string FirstName83 = (string)ContactsRet.FirstName.GetValue();
                    //Get value of MiddleName
                    if (ContactsRet.MiddleName != null)
                    {
                        string MiddleName84 = (string)ContactsRet.MiddleName.GetValue();
                    }
                    //Get value of LastName
                    if (ContactsRet.LastName != null)
                    {
                        string LastName85 = (string)ContactsRet.LastName.GetValue();
                    }
                    //Get value of JobTitle
                    if (ContactsRet.JobTitle != null)
                    {
                        string JobTitle86 = (string)ContactsRet.JobTitle.GetValue();
                    }
                    if (ContactsRet.AdditionalContactRefList != null)
                    {
                        for (int i87 = 0; i87 < ContactsRet.AdditionalContactRefList.Count; i87++)
                        {
                            IQBBaseRef QBBaseRef = ContactsRet.AdditionalContactRefList.GetAt(i87);
                            //Get value of ContactName
                            string ContactName88 = (string)QBBaseRef.FullName.GetValue();
                            //Get value of ContactValue
                            string ContactValue89 = (string)QBBaseRef.ListID.GetValue();
                        }
                    }
                }
            }
            if (CustomerRet.CustomerTypeRef != null)
            {
                //Get value of ListID
                if (CustomerRet.CustomerTypeRef.ListID != null)
                {
                    string ListID90 = (string)CustomerRet.CustomerTypeRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.CustomerTypeRef.FullName != null)
                {
                    string FullName91 = (string)CustomerRet.CustomerTypeRef.FullName.GetValue();
                }
            }
            if (CustomerRet.TermsRef != null)
            {
                //Get value of ListID
                if (CustomerRet.TermsRef.ListID != null)
                {
                    string ListID92 = (string)CustomerRet.TermsRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.TermsRef.FullName != null)
                {
                    string FullName93 = (string)CustomerRet.TermsRef.FullName.GetValue();
                }
            }
            if (CustomerRet.SalesRepRef != null)
            {
                //Get value of ListID
                if (CustomerRet.SalesRepRef.ListID != null)
                {
                    string ListID94 = (string)CustomerRet.SalesRepRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.SalesRepRef.FullName != null)
                {
                    string FullName95 = (string)CustomerRet.SalesRepRef.FullName.GetValue();
                }
            }
            //Get value of Balance
            if (CustomerRet.Balance != null)
            {
                double Balance96 = (double)CustomerRet.Balance.GetValue();
            }
            //Get value of TotalBalance
            if (CustomerRet.TotalBalance != null)
            {
                double TotalBalance97 = (double)CustomerRet.TotalBalance.GetValue();
            }
            if (CustomerRet.SalesTaxCodeRef != null)
            {
                //Get value of ListID
                if (CustomerRet.SalesTaxCodeRef.ListID != null)
                {
                    string ListID98 = (string)CustomerRet.SalesTaxCodeRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.SalesTaxCodeRef.FullName != null)
                {
                    string FullName99 = (string)CustomerRet.SalesTaxCodeRef.FullName.GetValue();
                }
            }
            if (CustomerRet.ItemSalesTaxRef != null)
            {
                //Get value of ListID
                if (CustomerRet.ItemSalesTaxRef.ListID != null)
                {
                    string ListID100 = (string)CustomerRet.ItemSalesTaxRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.ItemSalesTaxRef.FullName != null)
                {
                    string FullName101 = (string)CustomerRet.ItemSalesTaxRef.FullName.GetValue();
                }
            }
            //Get value of ResaleNumber
            if (CustomerRet.ResaleNumber != null)
            {
                string ResaleNumber102 = (string)CustomerRet.ResaleNumber.GetValue();
            }
            //Get value of AccountNumber
            if (CustomerRet.AccountNumber != null)
            {
                string AccountNumber103 = (string)CustomerRet.AccountNumber.GetValue();
            }
            //Get value of CreditLimit
            if (CustomerRet.CreditLimit != null)
            {
                double CreditLimit104 = (double)CustomerRet.CreditLimit.GetValue();
            }
            if (CustomerRet.PreferredPaymentMethodRef != null)
            {
                //Get value of ListID
                if (CustomerRet.PreferredPaymentMethodRef.ListID != null)
                {
                    string ListID105 = (string)CustomerRet.PreferredPaymentMethodRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.PreferredPaymentMethodRef.FullName != null)
                {
                    string FullName106 = (string)CustomerRet.PreferredPaymentMethodRef.FullName.GetValue();
                }
            }
            if (CustomerRet.CreditCardInfo != null)
            {
                //Get value of CreditCardNumber
                if (CustomerRet.CreditCardInfo.CreditCardNumber != null)
                {
                    string CreditCardNumber107 = (string)CustomerRet.CreditCardInfo.CreditCardNumber.GetValue();
                }
                //Get value of ExpirationMonth
                if (CustomerRet.CreditCardInfo.ExpirationMonth != null)
                {
                    int ExpirationMonth108 = (int)CustomerRet.CreditCardInfo.ExpirationMonth.GetValue();
                }
                //Get value of ExpirationYear
                if (CustomerRet.CreditCardInfo.ExpirationYear != null)
                {
                    int ExpirationYear109 = (int)CustomerRet.CreditCardInfo.ExpirationYear.GetValue();
                }
                //Get value of NameOnCard
                if (CustomerRet.CreditCardInfo.NameOnCard != null)
                {
                    string NameOnCard110 = (string)CustomerRet.CreditCardInfo.NameOnCard.GetValue();
                }
                //Get value of CreditCardAddress
                if (CustomerRet.CreditCardInfo.CreditCardAddress != null)
                {
                    string CreditCardAddress111 = (string)CustomerRet.CreditCardInfo.CreditCardAddress.GetValue();
                }
                //Get value of CreditCardPostalCode
                if (CustomerRet.CreditCardInfo.CreditCardPostalCode != null)
                {
                    string CreditCardPostalCode112 = (string)CustomerRet.CreditCardInfo.CreditCardPostalCode.GetValue();
                }
            }
            //Get value of JobStatus
            if (CustomerRet.JobStatus != null)
            {
                ENJobStatus JobStatus113 = (ENJobStatus)CustomerRet.JobStatus.GetValue();
            }
            //Get value of JobStartDate
            if (CustomerRet.JobStartDate != null)
            {
                DateTime JobStartDate114 = (DateTime)CustomerRet.JobStartDate.GetValue();
            }
            //Get value of JobProjectedEndDate
            if (CustomerRet.JobProjectedEndDate != null)
            {
                DateTime JobProjectedEndDate115 = (DateTime)CustomerRet.JobProjectedEndDate.GetValue();
            }
            //Get value of JobEndDate
            if (CustomerRet.JobEndDate != null)
            {
                DateTime JobEndDate116 = (DateTime)CustomerRet.JobEndDate.GetValue();
            }
            //Get value of JobDesc
            if (CustomerRet.JobDesc != null)
            {
                string JobDesc117 = (string)CustomerRet.JobDesc.GetValue();
            }
            if (CustomerRet.JobTypeRef != null)
            {
                //Get value of ListID
                if (CustomerRet.JobTypeRef.ListID != null)
                {
                    string ListID118 = (string)CustomerRet.JobTypeRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.JobTypeRef.FullName != null)
                {
                    string FullName119 = (string)CustomerRet.JobTypeRef.FullName.GetValue();
                }
            }
            //Get value of Notes
            if (CustomerRet.Notes != null)
            {
                string Notes120 = (string)CustomerRet.Notes.GetValue();
            }
            if (CustomerRet.AdditionalNotesRetList != null)
            {
                for (int i121 = 0; i121 < CustomerRet.AdditionalNotesRetList.Count; i121++)
                {
                    IAdditionalNotesRet AdditionalNotesRet = CustomerRet.AdditionalNotesRetList.GetAt(i121);
                    //Get value of NoteID
                    int NoteID122 = (int)AdditionalNotesRet.NoteID.GetValue();
                    //Get value of Date
                    DateTime Date123 = (DateTime)AdditionalNotesRet.Date.GetValue();
                    //Get value of Note
                    string Note124 = (string)AdditionalNotesRet.Note.GetValue();
                }
            }
            //Get value of PreferredDeliveryMethod
            if (CustomerRet.PreferredDeliveryMethod != null)
            {
                ENPreferredDeliveryMethod PreferredDeliveryMethod125 = (ENPreferredDeliveryMethod)CustomerRet.PreferredDeliveryMethod.GetValue();
            }
            if (CustomerRet.PriceLevelRef != null)
            {
                //Get value of ListID
                if (CustomerRet.PriceLevelRef.ListID != null)
                {
                    string ListID126 = (string)CustomerRet.PriceLevelRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.PriceLevelRef.FullName != null)
                {
                    string FullName127 = (string)CustomerRet.PriceLevelRef.FullName.GetValue();
                }
            }
            //Get value of ExternalGUID
            if (CustomerRet.ExternalGUID != null)
            {
                string ExternalGUID128 = (string)CustomerRet.ExternalGUID.GetValue();
            }
            if (CustomerRet.CurrencyRef != null)
            {
                //Get value of ListID
                if (CustomerRet.CurrencyRef.ListID != null)
                {
                    string ListID129 = (string)CustomerRet.CurrencyRef.ListID.GetValue();
                }
                //Get value of FullName
                if (CustomerRet.CurrencyRef.FullName != null)
                {
                    string FullName130 = (string)CustomerRet.CurrencyRef.FullName.GetValue();
                }
            }
            if (CustomerRet.DataExtRetList != null)
            {
                for (int i131 = 0; i131 < CustomerRet.DataExtRetList.Count; i131++)
                {
                    IDataExtRet DataExtRet = CustomerRet.DataExtRetList.GetAt(i131);
                    //Get value of OwnerID
                    if (DataExtRet.OwnerID != null)
                    {
                        string OwnerID132 = (string)DataExtRet.OwnerID.GetValue();
                    }
                    //Get value of DataExtName
                    string DataExtName133 = (string)DataExtRet.DataExtName.GetValue();
                    //Get value of DataExtType
                    ENDataExtType DataExtType134 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
                    //Get value of DataExtValue
                    string DataExtValue135 = (string)DataExtRet.DataExtValue.GetValue();
                }
            }
        }
コード例 #2
0
        customer FillCustomer(ICustomerRet customerRet)
        {
            var customerdal = new customer
            {
                //Go through all the elements of ICustomerRetList
                //Get value of ListID
                ID = (string)customerRet.ListID.GetValue(),
                //Get value of TimeCreated
                TimeCreated = (DateTime)customerRet.TimeCreated.GetValue(),
                //Get value of TimeModified
                TimeModified = (DateTime)customerRet.TimeModified.GetValue(),
                //Get value of EditSequence
                EditSequence = (string)customerRet.EditSequence.GetValue(),
                //Get value of Name
                Name = (string)customerRet.Name.GetValue(),
                //Get value of FullName
                FullName = (string)customerRet.FullName.GetValue()
            };

            //Get value of IsActive
            if (customerRet.IsActive != null)
            {
                customerdal.IsActive = (bool)customerRet.IsActive.GetValue();
            }
            if (customerRet.ClassRef != null)
            {
                //Get value of ListID
                if (customerRet.ClassRef.ListID != null)
                {
                    customerdal.ClassId = (string)customerRet.ClassRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.ClassRef.FullName != null)
                {
                    customerdal.ClassName = (string)customerRet.ClassRef.FullName.GetValue();
                }
            }
            if (customerRet.ParentRef != null)
            {
                //Get value of ListID
                if (customerRet.ParentRef.ListID != null)
                {
                    customerdal.ParentId = (string)customerRet.ParentRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.ParentRef.FullName != null)
                {
                    customerdal.ParentName = (string)customerRet.ParentRef.FullName.GetValue();
                }
            }
            //Get value of Sublevel
            customerdal.Sublevel = (int)customerRet.Sublevel.GetValue();
            //Get value of CompanyName
            if (customerRet.CompanyName != null)
            {
                customerdal.Company = (string)customerRet.CompanyName.GetValue();
            }
            //Get value of Salutation
            if (customerRet.Salutation != null)
            {
                customerdal.Salutation = (string)customerRet.Salutation.GetValue();
            }
            //Get value of FirstName
            if (customerRet.FirstName != null)
            {
                customerdal.FirstName = (string)customerRet.FirstName.GetValue();
            }
            //Get value of MiddleName
            if (customerRet.MiddleName != null)
            {
                customerdal.MiddleInitial = (string)customerRet.MiddleName.GetValue();
            }
            //Get value of LastName
            if (customerRet.LastName != null)
            {
                customerdal.LastName = (string)customerRet.LastName.GetValue();
            }
            ////Get value of JobTitle
            //if (customerRet.JobTitle != null)
            //{
            //    customerdal.JobTitle = (string)customerRet.JobTitle.GetValue();
            //}
            if (customerRet.BillAddress != null)
            {
                //Get value of Addr1
                if (customerRet.BillAddress.Addr1 != null)
                {
                    customerdal.BillingLine1 = (string)customerRet.BillAddress.Addr1.GetValue();
                }
                //Get value of Addr2
                if (customerRet.BillAddress.Addr2 != null)
                {
                    customerdal.BillingLine2 = (string)customerRet.BillAddress.Addr2.GetValue();
                }
                //Get value of Addr3
                if (customerRet.BillAddress.Addr3 != null)
                {
                    customerdal.BillingLine3 = (string)customerRet.BillAddress.Addr3.GetValue();
                }
                //Get value of Addr4
                if (customerRet.BillAddress.Addr4 != null)
                {
                    customerdal.BillingLine4 = (string)customerRet.BillAddress.Addr4.GetValue();
                }
                //Get value of Addr5
                if (customerRet.BillAddress.Addr5 != null)
                {
                    customerdal.BillingLine5 = (string)customerRet.BillAddress.Addr5.GetValue();
                }
                //Get value of City
                if (customerRet.BillAddress.City != null)
                {
                    customerdal.BillingCity = (string)customerRet.BillAddress.City.GetValue();
                }
                //Get value of State
                if (customerRet.BillAddress.State != null)
                {
                    customerdal.BillingState = (string)customerRet.BillAddress.State.GetValue();
                }
                //Get value of PostalCode
                if (customerRet.BillAddress.PostalCode != null)
                {
                    customerdal.BillingPostalCode = (string)customerRet.BillAddress.PostalCode.GetValue();
                }
                //Get value of Country
                if (customerRet.BillAddress.Country != null)
                {
                    customerdal.BillingCountry = (string)customerRet.BillAddress.Country.GetValue();
                }
                //Get value of Note
                if (customerRet.BillAddress.Note != null)
                {
                    customerdal.BillingNote = (string)customerRet.BillAddress.Note.GetValue();
                }
            }
            //if (customerRet.BillAddressBlock != null)
            //{
            //    //Get value of Addr1
            //    if (customerRet.BillAddressBlock.Addr1 != null)
            //    {
            //        customerdal.Addr1 = (string)customerRet.BillAddressBlock.Addr1.GetValue();
            //    }
            //    //Get value of Addr2
            //    if (customerRet.BillAddressBlock.Addr2 != null)
            //    {
            //        customerdal.Addr2 = (string)customerRet.BillAddressBlock.Addr2.GetValue();
            //    }
            //    //Get value of Addr3
            //    if (customerRet.BillAddressBlock.Addr3 != null)
            //    {
            //        customerdal.Addr3 = (string)customerRet.BillAddressBlock.Addr3.GetValue();
            //    }
            //    //Get value of Addr4
            //    if (customerRet.BillAddressBlock.Addr4 != null)
            //    {
            //        customerdal.Addr4 = (string)customerRet.BillAddressBlock.Addr4.GetValue();
            //    }
            //    //Get value of Addr5
            //    if (customerRet.BillAddressBlock.Addr5 != null)
            //    {
            //        customerdal.Addr5 = (string)customerRet.BillAddressBlock.Addr5.GetValue();
            //    }
            //}
            if (customerRet.ShipAddress != null)
            {
                //Get value of Addr1
                if (customerRet.ShipAddress.Addr1 != null)
                {
                    customerdal.ShippingLine1 = (string)customerRet.ShipAddress.Addr1.GetValue();
                }
                //Get value of Addr2
                if (customerRet.ShipAddress.Addr2 != null)
                {
                    customerdal.ShippingLine2 = (string)customerRet.ShipAddress.Addr2.GetValue();
                }
                //Get value of Addr3
                if (customerRet.ShipAddress.Addr3 != null)
                {
                    customerdal.ShippingLine3 = (string)customerRet.ShipAddress.Addr3.GetValue();
                }
                //Get value of Addr4
                if (customerRet.ShipAddress.Addr4 != null)
                {
                    customerdal.ShippingLine4 = (string)customerRet.ShipAddress.Addr4.GetValue();
                }
                //Get value of Addr5
                if (customerRet.ShipAddress.Addr5 != null)
                {
                    customerdal.ShippingLine5 = (string)customerRet.ShipAddress.Addr5.GetValue();
                }
                //Get value of City
                if (customerRet.ShipAddress.City != null)
                {
                    customerdal.ShippingCity = (string)customerRet.ShipAddress.City.GetValue();
                }
                //Get value of State
                if (customerRet.ShipAddress.State != null)
                {
                    customerdal.ShippingState = (string)customerRet.ShipAddress.State.GetValue();
                }
                //Get value of PostalCode
                if (customerRet.ShipAddress.PostalCode != null)
                {
                    customerdal.ShippingPostalCode = (string)customerRet.ShipAddress.PostalCode.GetValue();
                }
                //Get value of Country
                if (customerRet.ShipAddress.Country != null)
                {
                    customerdal.ShippingCountry = (string)customerRet.ShipAddress.Country.GetValue();
                }
                //Get value of Note
                if (customerRet.ShipAddress.Note != null)
                {
                    customerdal.ShippingNote = (string)customerRet.ShipAddress.Note.GetValue();
                }
            }
            //if (customerRet.ShipAddressBlock != null)
            //{
            //    //Get value of Addr1
            //    if (customerRet.ShipAddressBlock.Addr1 != null)
            //    {
            //        customerdal.Addr1 = (string)customerRet.ShipAddressBlock.Addr1.GetValue();
            //    }
            //    //Get value of Addr2
            //    if (customerRet.ShipAddressBlock.Addr2 != null)
            //    {
            //        customerdal.Addr2 = (string)customerRet.ShipAddressBlock.Addr2.GetValue();
            //    }
            //    //Get value of Addr3
            //    if (customerRet.ShipAddressBlock.Addr3 != null)
            //    {
            //        customerdal.Addr3 = (string)customerRet.ShipAddressBlock.Addr3.GetValue();
            //    }
            //    //Get value of Addr4
            //    if (customerRet.ShipAddressBlock.Addr4 != null)
            //    {
            //        customerdal.Addr4 = (string)customerRet.ShipAddressBlock.Addr4.GetValue();
            //    }
            //    //Get value of Addr5
            //    if (customerRet.ShipAddressBlock.Addr5 != null)
            //    {
            //        customerdal.Addr5 = (string)customerRet.ShipAddressBlock.Addr5.GetValue();
            //    }
            //}
            //if (customerRet.ShipToAddressList != null)
            //{
            //    for (int i = 0; i < customerRet.ShipToAddressList.Count; i++)
            //    {
            //        IShipToAddress ShipToAddress = customerRet.ShipToAddressList.GetAt(i);
            //        //Get value of Name
            //        customerdal.Name = (string)ShipToAddress.Name.GetValue();
            //        //Get value of Addr1
            //        if (ShipToAddress.Addr1 != null)
            //        {
            //            customerdal.ShippingLine1 = (string)ShipToAddress.Addr1.GetValue();
            //        }
            //        //Get value of Addr2
            //        if (ShipToAddress.Addr2 != null)
            //        {
            //            customerdal.ShippingLine2 = (string)ShipToAddress.Addr2.GetValue();
            //        }
            //        //Get value of Addr3
            //        if (ShipToAddress.Addr3 != null)
            //        {
            //            customerdal.ShippingLine3 = (string)ShipToAddress.Addr3.GetValue();
            //        }
            //        //Get value of Addr4
            //        if (ShipToAddress.Addr4 != null)
            //        {
            //            customerdal.ShippingLine4 = (string)ShipToAddress.Addr4.GetValue();
            //        }
            //        //Get value of Addr5
            //        if (ShipToAddress.Addr5 != null)
            //        {
            //            customerdal.ShippingLine5 = (string)ShipToAddress.Addr5.GetValue();
            //        }
            //        //Get value of City
            //        if (ShipToAddress.City != null)
            //        {
            //            customerdal.ShippingCity = (string)ShipToAddress.City.GetValue();
            //        }
            //        //Get value of State
            //        if (ShipToAddress.State != null)
            //        {
            //            customerdal.ShippingState = (string)ShipToAddress.State.GetValue();
            //        }
            //        //Get value of PostalCode
            //        if (ShipToAddress.PostalCode != null)
            //        {
            //            customerdal.ShippingPostalCode = (string)ShipToAddress.PostalCode.GetValue();
            //        }
            //        //Get value of Country
            //        if (ShipToAddress.Country != null)
            //        {
            //            customerdal.Country = (string)ShipToAddress.Country.GetValue();
            //        }
            //        //Get value of Note
            //        if (ShipToAddress.Note != null)
            //        {
            //            customerdal.ShippingNote = (string)ShipToAddress.Note.GetValue();
            //        }
            ////Get value of DefaultShipTo
            //if (ShipToAddress.DefaultShipTo != null)
            //{
            //    customerdal.DefaultShipTo = (bool)ShipToAddress.DefaultShipTo.GetValue();
            //}
            //}
            //}
            //Get value of Phone
            if (customerRet.Phone != null)
            {
                customerdal.Phone = (string)customerRet.Phone.GetValue();
            }
            //Get value of AltPhone
            if (customerRet.AltPhone != null)
            {
                customerdal.AlternatePhone = (string)customerRet.AltPhone.GetValue();
            }
            //Get value of Fax
            if (customerRet.Fax != null)
            {
                customerdal.Fax = (string)customerRet.Fax.GetValue();
            }
            //Get value of Email
            if (customerRet.Email != null)
            {
                customerdal.Email = (string)customerRet.Email.GetValue();
            }
            //Get value of Cc
            if (customerRet.Cc != null)
            {
                customerdal.Cc = (string)customerRet.Cc.GetValue();
            }
            //Get value of Contact
            if (customerRet.Contact != null)
            {
                customerdal.Contact = (string)customerRet.Contact.GetValue();
            }
            //Get value of AltContact
            if (customerRet.AltContact != null)
            {
                customerdal.AlternateContact = (string)customerRet.AltContact.GetValue();
            }
            //if (customerRet.AdditionalContactRefList != null)
            //{
            //    for (int i = 0; i < customerRet.AdditionalContactRefList.Count; i++)
            //    {
            //        IQBBaseRef QBBaseRef = customerRet.AdditionalContactRefList.GetAt(i);
            //        //Get value of ContactName
            //        customerdal.ContactName = (string)QBBaseRef.ContactName.GetValue();
            //        //Get value of ContactValue
            //        customerdal.ContactValue = (string)QBBaseRef.ContactValue.GetValue();
            //    }
            //}
            //if (customerRet.ContactsRetList != null)
            //{
            //    for (int i = 0; i < customerRet.ContactsRetList.Count; i++)
            //    {
            //        IContactsRet ContactsRet = customerRet.ContactsRetList.GetAt(i);
            //        //Get value of ListID
            //        customerdal.ListID = (string)ContactsRet.ListID.GetValue();
            //        //Get value of TimeCreated
            //        customerdal.TimeCreated = (DateTime)ContactsRet.TimeCreated.GetValue();
            //        //Get value of TimeModified
            //        customerdal.TimeModified = (DateTime)ContactsRet.TimeModified.GetValue();
            //        //Get value of EditSequence
            //        customerdal.EditSequence = (string)ContactsRet.EditSequence.GetValue();
            //        //Get value of Contact
            //        if (ContactsRet.Contact != null)
            //        {
            //            customerdal.Contact = (string)ContactsRet.Contact.GetValue();
            //        }
            //        //Get value of Salutation
            //        if (ContactsRet.Salutation != null)
            //        {
            //            customerdal.Salutation = (string)ContactsRet.Salutation.GetValue();
            //        }
            //        //Get value of FirstName
            //        customerdal.FirstName = (string)ContactsRet.FirstName.GetValue();
            //        //Get value of MiddleName
            //        if (ContactsRet.MiddleName != null)
            //        {
            //            customerdal.MiddleName = (string)ContactsRet.MiddleName.GetValue();
            //        }
            //        //Get value of LastName
            //        if (ContactsRet.LastName != null)
            //        {
            //            customerdal.LastName = (string)ContactsRet.LastName.GetValue();
            //        }
            //        ////Get value of JobTitle
            //        //if (ContactsRet.JobTitle != null)
            //        //{
            //        //    customerdal.JobTitle = (string)ContactsRet.JobTitle.GetValue();
            //        //}
            //        if (ContactsRet.AdditionalContactRefList != null)
            //        {
            //            for (int i = 0; i < ContactsRet.AdditionalContactRefList.Count; i++)
            //            {
            //                IQBBaseRef QBBaseRef = ContactsRet.AdditionalContactRefList.GetAt(i);
            //                //Get value of ContactName
            //                customerdal.ContactName = (string)QBBaseRef.ContactName.GetValue();
            //                //Get value of ContactValue
            //                customerdal.ContactValue = (string)QBBaseRef.ContactValue.GetValue();
            //            }
            //        }
            //    }
            //}
            if (customerRet.CustomerTypeRef != null)
            {
                //Get value of ListID
                if (customerRet.CustomerTypeRef.ListID != null)
                {
                    customerdal.TypeId = (string)customerRet.CustomerTypeRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.CustomerTypeRef.FullName != null)
                {
                    customerdal.Type = (string)customerRet.CustomerTypeRef.FullName.GetValue();
                }
            }
            if (customerRet.TermsRef != null)
            {
                //Get value of ListID
                if (customerRet.TermsRef.ListID != null)
                {
                    customerdal.TermsId = (string)customerRet.TermsRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.TermsRef.FullName != null)
                {
                    customerdal.Terms = (string)customerRet.TermsRef.FullName.GetValue();
                }
            }
            if (customerRet.SalesRepRef != null)
            {
                //Get value of ListID
                if (customerRet.SalesRepRef.ListID != null)
                {
                    customerdal.SalesRepId = (string)customerRet.SalesRepRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.SalesRepRef.FullName != null)
                {
                    customerdal.SalesRep = (string)customerRet.SalesRepRef.FullName.GetValue();
                }
            }
            //Get value of Balance
            if (customerRet.Balance != null)
            {
                customerdal.Balance = (double)customerRet.Balance.GetValue();
            }
            //Get value of TotalBalance
            //if (customerRet.TotalBalance != null)
            //{
            //    customerdal.TotalBalance = (double)customerRet.TotalBalance.GetValue();
            //}
            if (customerRet.SalesTaxCodeRef != null)
            {
                //Get value of ListID
                if (customerRet.SalesTaxCodeRef.ListID != null)
                {
                    customerdal.TaxCodeId = (string)customerRet.SalesTaxCodeRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.SalesTaxCodeRef.FullName != null)
                {
                    customerdal.TaxCode = (string)customerRet.SalesTaxCodeRef.FullName.GetValue();
                }
            }
            if (customerRet.ItemSalesTaxRef != null)
            {
                //Get value of ListID
                if (customerRet.ItemSalesTaxRef.ListID != null)
                {
                    customerdal.TaxItemId = (string)customerRet.ItemSalesTaxRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.ItemSalesTaxRef.FullName != null)
                {
                    customerdal.TaxItem = (string)customerRet.ItemSalesTaxRef.FullName.GetValue();
                }
            }
            //Get value of ResaleNumber
            if (customerRet.ResaleNumber != null)
            {
                customerdal.ResaleNumber = (string)customerRet.ResaleNumber.GetValue();
            }
            //Get value of AccountNumber
            if (customerRet.AccountNumber != null)
            {
                customerdal.AccountNumber = (string)customerRet.AccountNumber.GetValue();
            }
            //Get value of CreditLimit
            if (customerRet.CreditLimit != null)
            {
                customerdal.CreditLimit = (double)customerRet.CreditLimit.GetValue();
            }
            if (customerRet.PreferredPaymentMethodRef != null)
            {
                //Get value of ListID
                if (customerRet.PreferredPaymentMethodRef.ListID != null)
                {
                    customerdal.PreferredPaymentMethodId = (string)customerRet.PreferredPaymentMethodRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.PreferredPaymentMethodRef.FullName != null)
                {
                    customerdal.PreferredPaymentMethodName = (string)customerRet.PreferredPaymentMethodRef.FullName.GetValue();
                }
            }
            if (customerRet.CreditCardInfo != null)
            {
                //Get value of CreditCardNumber
                if (customerRet.CreditCardInfo.CreditCardNumber != null)
                {
                    customerdal.CreditCardNumber = (string)customerRet.CreditCardInfo.CreditCardNumber.GetValue();
                }
                //Get value of ExpirationMonth
                if (customerRet.CreditCardInfo.ExpirationMonth != null)
                {
                    customerdal.CreditCardExpMonth = (int)customerRet.CreditCardInfo.ExpirationMonth.GetValue();
                }
                //Get value of ExpirationYear
                if (customerRet.CreditCardInfo.ExpirationYear != null)
                {
                    customerdal.CreditCardExpYear = (int)customerRet.CreditCardInfo.ExpirationYear.GetValue();
                }
                //Get value of NameOnCard
                if (customerRet.CreditCardInfo.NameOnCard != null)
                {
                    customerdal.CreditCardNameOnCard = (string)customerRet.CreditCardInfo.NameOnCard.GetValue();
                }
                //Get value of CreditCardAddress
                if (customerRet.CreditCardInfo.CreditCardAddress != null)
                {
                    customerdal.CreditCardAddress = (string)customerRet.CreditCardInfo.CreditCardAddress.GetValue();
                }
                //Get value of CreditCardPostalCode
                if (customerRet.CreditCardInfo.CreditCardPostalCode != null)
                {
                    customerdal.CreditCardPostalCode = (string)customerRet.CreditCardInfo.CreditCardPostalCode.GetValue();
                }
            }
            //Get value of JobStatus
            if (customerRet.JobStatus != null)
            {
                ENJobStatus JobStatus = (ENJobStatus)customerRet.JobStatus.GetValue();
            }
            //Get value of JobStartDate
            if (customerRet.JobStartDate != null)
            {
                customerdal.JobStartDate = (DateTime)customerRet.JobStartDate.GetValue();
            }
            //Get value of JobProjectedEndDate
            if (customerRet.JobProjectedEndDate != null)
            {
                customerdal.JobProjectedEndDate = (DateTime)customerRet.JobProjectedEndDate.GetValue();
            }
            //Get value of JobEndDate
            if (customerRet.JobEndDate != null)
            {
                customerdal.JobEndDate = (DateTime)customerRet.JobEndDate.GetValue();
            }
            //Get value of JobDesc
            if (customerRet.JobDesc != null)
            {
                customerdal.JobDescription = (string)customerRet.JobDesc.GetValue();
            }
            if (customerRet.JobTypeRef != null)
            {
                //Get value of ListID
                if (customerRet.JobTypeRef.ListID != null)
                {
                    customerdal.JobTypeId = (string)customerRet.JobTypeRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.JobTypeRef.FullName != null)
                {
                    customerdal.JobType = (string)customerRet.JobTypeRef.FullName.GetValue();
                }
            }
            //Get value of Notes
            if (customerRet.Notes != null)
            {
                customerdal.Notes = (string)customerRet.Notes.GetValue();
            }
            //if (customerRet.AdditionalNotesRetList != null)
            //{
            //    for (int i = 0; i < customerRet.AdditionalNotesRetList.Count; i++)
            //    {
            //        IAdditionalNotesRet AdditionalNotesRet = customerRet.AdditionalNotesRetList.GetAt(i121);
            //        //Get value of NoteID
            //        customerdal.NoteID = (int)AdditionalNotesRet.NoteID.GetValue();
            //        //Get value of Date
            //        customerdal.Date = (DateTime)AdditionalNotesRet.Date.GetValue();
            //        //Get value of Note
            //        customerdal.Note = (string)AdditionalNotesRet.Note.GetValue();
            //    }
            //}
            //Get value of PreferredDeliveryMethod
            if (customerRet.PreferredDeliveryMethod != null)
            {
                customerdal.PreferredDeliveryMethod = customerRet.PreferredDeliveryMethod.ToString();
            }
            if (customerRet.PriceLevelRef != null)
            {
                //Get value of ListID
                if (customerRet.PriceLevelRef.ListID != null)
                {
                    customerdal.PriceLevelId = (string)customerRet.PriceLevelRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.PriceLevelRef.FullName != null)
                {
                    customerdal.PriceLevel = (string)customerRet.PriceLevelRef.FullName.GetValue();
                }
            }
            ////Get value of ExternalGUID
            //if (customerRet.ExternalGUID != null)
            //{
            //    customerdal.ExternalGUID = (string)customerRet.ExternalGUID.GetValue();
            //}
            if (customerRet.CurrencyRef != null)
            {
                //Get value of ListID
                if (customerRet.CurrencyRef.ListID != null)
                {
                    customerdal.CurrencyId = (string)customerRet.CurrencyRef.ListID.GetValue();
                }
                //Get value of FullName
                if (customerRet.CurrencyRef.FullName != null)
                {
                    customerdal.CurrencyName = (string)customerRet.CurrencyRef.FullName.GetValue();
                }
            }
            //if (customerRet.DataExtRetList != null)
            //{
            //    for (int i = 0; i < customerRet.DataExtRetList.Count; i++)
            //    {
            //        IDataExtRet DataExtRet = customerRet.DataExtRetList.GetAt(i131);
            //        //Get value of OwnerID
            //        if (DataExtRet.OwnerID != null)
            //        {
            //            customerdal.OwnerID = (string)DataExtRet.OwnerID.GetValue();
            //        }
            //        //Get value of DataExtName
            //        customerdal.DataExtName = (string)DataExtRet.DataExtName.GetValue();
            //        //Get value of DataExtType
            //        ENDataExtType DataExtType = (ENDataExtType)DataExtRet.DataExtType.GetValue();
            //        //Get value of DataExtValue
            //        customerdal.DataExtValue = (string)DataExtRet.DataExtValue.GetValue();
            //    }
            //}

            return(customerdal);
        }