Ejemplo n.º 1
0
        public static void AssignValues(ContractInfo source, OrderContract target)
        {
            target.OrderContractKey      = source.ContractKey;
            target.OrderContractId       = source.ContractId.GetValueOrDefault();
            target.OrderSysUserKey       = source.CreateSysUserKey;
            target.OrderType             = source.OrderType.GetValueOrDefault();
            target.Payment               = source.Payment;
            target.ShipmentPeriod        = source.ShipmentPeriod;
            target.SupplierId            = source.SupplierId.GetValueOrDefault();
            target.HarborId              = source.HarborId.GetValueOrDefault();
            target.OrderCreateTime       = source.CTIME.GetValueOrDefault();
            target.ImportDeposite        = source.ImportDeposite.GetValueOrDefault();
            target.ImportBalancedPayment = source.ImportBalancedPayment.GetValueOrDefault();
            target.ETD = source.ETD;
            target.ETA = source.ETA;
            target.DeliveryBillSerial = source.DeliveryBillSerial;
            target.ContractStatus     = source.ContractStatus;
            target.ContainerSerial    = source.ContainerSerial;
            target.ContractStatus     = source.ContractStatus;
            target.Comments           = source.Comments;

            target.CurrencyExchangeRate = source.CurrencyExchangeRate.HasValue ?
                                          source.CurrencyExchangeRate.Value : CurrencyConfigs.GetDefaultCurrency(
                source.Currency, (int)source.ContractType);
            target.Currency = source.Currency;
            //target.ContractId = source.ContractId;
        }
Ejemplo n.º 2
0
        public static void AssignValues(OrderContract source, ContractInfo target)
        {
            target.ContractType          = ContractViewModelType.OrderContract;
            target.ContractKey           = source.OrderContractKey;
            target.ContractId            = source.OrderContractId;
            target.CTIME                 = source.OrderCreateTime;
            target.ContractStatus        = source.ContractStatus;
            target.Comments              = source.Comments;
            target.ContractId            = source.OrderContractId;
            target.ContainerSerial       = source.ContainerSerial;
            target.CreateSysUserKey      = source.OrderSysUserKey;
            target.DeliveryBillSerial    = source.DeliveryBillSerial;
            target.EntityPrivLevRequired = source.EntityPrivLevRequired;
            target.ETA                   = source.ETA;
            target.ETD                   = source.ETD;
            target.HarborId              = source.HarborId;
            target.SupplierId            = source.SupplierId;
            target.OrderType             = source.OrderType;
            target.ImportBalancedPayment = source.ImportBalancedPayment;
            target.ImportDeposite        = source.ImportDeposite;
            target.Payment               = source.Payment;
            target.PaymentTotal          = source.PaymentTotal;
            target.ShipmentPeriod        = source.ShipmentPeriod;

            target.Currency = string.IsNullOrEmpty(source.Currency) ?
                              CurrencyConfigs.ORDER_DEFAULT_CURRENCY_VALUE : source.Currency;
            target.CurrencyExchangeRate = source.CurrencyExchangeRate > 0 ?
                                          source.CurrencyExchangeRate : CurrencyConfigs.GetDefaultCurrency(
                target.Currency, (int)target.ContractType);

            target.InitOrderItems();
            target.InitHarborAgent();
            target.InitHkLogistics();
            target.InitMlLogistics();
        }
Ejemplo n.º 3
0
        public static void AssignValues(SaleContract source, ContractInfo target)
        {
            target.SaleClientId          = source.SaleClientId;
            target.DiscountAmount        = source.DiscountAmount;
            target.ContractKey           = source.SaleContractKey;
            target.ContractId            = source.SaleContractId; //增加id
            target.OrderType             = source.OrderType;
            target.CTIME                 = source.SaleCreateTime;
            target.ContractType          = ContractViewModelType.SaleContract;
            target.ContractStatus        = source.ContractStatus;
            target.EntityPrivLevRequired = source.EntityPrivLevRequired;
            target.SaleBalancedPayment   = source.SaleBalancedPayment;
            target.SaleDeposite          = source.SaleDeposite;
            target.TotalAfterDiscount    = source.TotalAfterDiscount;
            target.CreateSysUserKey      = source.OperatorSysUser;

            target.Currency = string.IsNullOrEmpty(source.Currency) ?
                              CurrencyConfigs.SALE_DEFAULT_CURRENCY_VALUE : source.Currency;
            target.CurrencyExchangeRate = source.CurrencyExchangeRate > 0 ?
                                          source.CurrencyExchangeRate : CurrencyConfigs.GetDefaultCurrency(
                target.Currency, (int)target.ContractType);

            target.InitSaleClient();
            target.InitSaleItems();
        }
Ejemplo n.º 4
0
        public static void AssignValues(ContractInfo source, SaleContract target)
        {
            target.SaleClientId    = Convert.ToInt32(source.SaleClientId); //客户信息
            target.SaleContractKey = source.ContractKey;
            target.SaleContractId  = source.ContractId.GetValueOrDefault();
            target.OrderType       = source.OrderType.GetValueOrDefault();
            target.SaleCreateTime  = source.CTIME.GetValueOrDefault();
            //target.ContractType = ContractViewModelType.SaleContract;
            target.ContractStatus        = source.ContractStatus;
            target.EntityPrivLevRequired = source.EntityPrivLevRequired.GetValueOrDefault();
            //target.SaleBalancedPayment = source.SaleBalancedPayment.GetValueOrDefault();
            target.SaleDeposite    = source.SaleDeposite.GetValueOrDefault();
            target.OperatorSysUser = source.CreateSysUserKey;

            target.CurrencyExchangeRate = source.CurrencyExchangeRate.HasValue ?
                                          source.CurrencyExchangeRate.Value : CurrencyConfigs.GetDefaultCurrency(
                source.Currency, (int)source.ContractType);
            target.Currency = source.Currency;
        }