zoukankan      html  css  js  c++  java
  • address

    public void modified()
    {
        CustTable           curCustTable;
        Address             address,invoiceAddress,mailAddress;
        JaxInvoiceAddress   curjaxaddress,curaddress;
    ;
        if(JaxInvoiceTable.EajMiddleCustAccount &&JaxInvoiceTable.EajMiddleCustAccount != JaxInvoiceTable.CustAccount )
            {
                curCustTable = CustTable::find(JaxInvoiceTable.EajMiddleCustAccount,true);
                address        = DirPartyAddress::findAddress(curCustTable, AddressType::Delivery);
                invoiceAddress = DirPartyAddress::findAddress(curCustTable, AddressType::Invoice);
                mailAddress    = DirPartyAddress::findAddress(curCustTable, AddressType::Other);
    
                if (invoiceAddress)
                {
                    JaxInvoiceTable.setEajMidInvoiceAddress(invoiceAddress);
                }
                else
                {
                    JaxInvoiceTable.setEajMidInvoiceAddress(mailAddress);
                }
                if(address)
                {
                    JaxInvoiceTable.setEajMidDeliveryAddress(address);
                }
                else
                {
                    JaxInvoiceTable.setEajMidDeliveryAddress(mailAddress);
                }
    
        }
    
    }
    ------------------------------------------------
    void  setEajMidInvoiceAddress(Address   _address)
    {
        CustTable           custTable;
        JaxInvoiceAddress   invoiceAddress;
        ;
    
        custTable = this.EajMidOrderAccount();
    
        ttsbegin;
        select forupdate invoiceAddress
                    index hint InvoiceIdIdx
                    where invoiceAddress.InvoiceId == this.InvoiceId;
        if (_address)
        {
            if(invoiceAddress)
            {
                invoiceAddress.EajMidBillName             = custTable.Name;
                invoiceAddress.EajMidBillAddress          = _address.Address;
                invoiceAddress.EajMidBillZipCode          = _address.ZipCode;
                invoiceAddress.EajMidBillPhone            = _address.Phone;
                invoiceAddress.EajMidBillTeleFax          = _address.TeleFax;
                invoiceAddress.EajMidBillCountryRegionId  = _address.CountryRegionId;
                invoiceAddress.EajMidBillCounty           = _address.County;
                invoiceAddress.EajMidBillState            = _address.State;
                invoiceAddress.EajMidBillStreet           = _address.Street;
                invoiceAddress.EajMidBillCity             = _address.City;
                invoiceAddress.EajMidBillTelex            = _address.Telex;
                
                invoiceAddress.EajMidBillContactPersonId  = _address.ContactPersonId;
                
                invoiceAddress.doUpdate();
            }
    
        }
    
        ttscommit;
    }
  • 相关阅读:
    表单提交与后台PHP如何接口?
    json数组转普通数组 普通数组转json数组
    使用Memcache缓存mysql数据库操作的原理和缓存过程浅析
    int(3)和int(10)的区别
    CI 3.0.6 控制器打印base_url 地址不为 localhost的解决方法
    CI3.0控制器下面建文件夹 访问一直404 的解决方法
    http响应需要记住的状态码
    laravel 表单验证 正则匹配
    laravel 加中间件的方法 防止直接打开后台
    Laravel 设置时区
  • 原文地址:https://www.cnblogs.com/perock/p/2618427.html
Copyright © 2011-2022 走看看