Exemplo n.º 1
0
        private PurchaseIndividualInfo getIndividualInfo()
        {
            PurchaseIndividualInfo individual = new PurchaseIndividualInfo();
            var addressInfo = AddressShow.GetAddressBaseInfo(this.hfldAddressCode.Value);

            if (!string.IsNullOrWhiteSpace(this.hfdContactPhone.Value))
            {
                individual.ContactPhone = this.hfdContactPhone.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdAddress.Value))
            {
                individual.Address = this.hfdAddress.Value;
            }
            if (!string.IsNullOrWhiteSpace(addressInfo.ProvinceCode))
            {
                individual.Province = addressInfo.ProvinceCode;
            }
            if (!string.IsNullOrWhiteSpace(addressInfo.CityCode))
            {
                individual.City = addressInfo.CityCode;
            }
            if (!string.IsNullOrWhiteSpace(addressInfo.CountyCode))
            {
                individual.District = addressInfo.CountyCode;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdEmail.Value))
            {
                individual.Email = this.hfdEmail.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdFax.Value))
            {
                individual.Faxes = this.hfdFax.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdQQ.Value))
            {
                individual.QQ = this.hfdQQ.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdPostCode.Value))
            {
                individual.ZipCode = this.hfdPostCode.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdFixedPhone.Value))
            {
                individual.OfficePhone = this.hfdFixedPhone.Value;
            }
            return(individual);
        }
Exemplo n.º 2
0
        private PurchaseEnterpriseInfo getEnterpriseInfo()
        {
            PurchaseEnterpriseInfo enterprise = new PurchaseEnterpriseInfo();
            var addressInfo = AddressShow.GetAddressBaseInfo(this.hfldAddressCode.Value);

            if (!string.IsNullOrWhiteSpace(this.hfdContactName.Value))
            {
                enterprise.ContactName = this.hfdContactName.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdContactPhone.Value))
            {
                enterprise.ContactPhone = this.hfdContactPhone.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdCompanyPhone.Value))
            {
                enterprise.CompanyPhone = this.hfdCompanyPhone.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdAddress.Value))
            {
                enterprise.Address = this.hfdAddress.Value;
            }
            if (!string.IsNullOrWhiteSpace(addressInfo.CityCode))
            {
                enterprise.City = addressInfo.CityCode;
            }
            if (!string.IsNullOrWhiteSpace(addressInfo.CountyCode))
            {
                enterprise.District = addressInfo.CountyCode;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdEmail.Value))
            {
                enterprise.Email = this.hfdEmail.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdEmergencyPhone.Value))
            {
                enterprise.EmergencyCall = this.hfdEmergencyPhone.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdEmergency.Value))
            {
                enterprise.EmergencyContact = this.hfdEmergency.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdFax.Value))
            {
                enterprise.Faxes = this.hfdFax.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdManagerPhone.Value))
            {
                enterprise.ManagerCellphone = this.hfdManagerPhone.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdManager.Value))
            {
                enterprise.ManagerName = this.hfdManager.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdQQ.Value))
            {
                enterprise.QQ = this.hfdQQ.Value;
            }
            if (!string.IsNullOrWhiteSpace(this.hfdPostCode.Value))
            {
                enterprise.ZipCode = this.hfdPostCode.Value;
            }
            if (!string.IsNullOrWhiteSpace(addressInfo.ProvinceCode))
            {
                enterprise.Province = addressInfo.ProvinceCode;
            }
            return(enterprise);
        }