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; }
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(); }
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(); }
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; }
public string UpdateSaleContractCore(ExtendedIdentityDbContext dbContext, ContractInfo model, string userName) { return(m_saleContractImpl.UpdateSaleContractCore(dbContext, model, userName)); }
/// <summary> /// 交单(审核通过),如果model的OrderContractId/OrderContractKey找不到数据库的记录, /// 会强行创建一个(方便填写完了“直接交单”)。 /// 只有model.ContractStatus == ContractStatus.AuditPassed才会创建对应的财务记录。 /// 注意:此方法不会修改OrderContract下面的ProductItem /// </summary> /// <param name="dbContext"></param> /// <param name="model"></param> /// <param name="userName"></param> /// <returns></returns> public string SubmitOrderContract(ExtendedIdentityDbContext dbContext, ContractInfo model, string userName) { return(m_orderContractImpl.SubmitOrderContract(dbContext, model, userName)); }
/// <summary> /// 新增报关和物流信息 /// 返回值为异常信息,如果返回空字符串则没有异常。 /// </summary> /// <param name="dbContext"></param> /// <param name="model"></param> /// <param name="userName"></param> /// <returns></returns> public string AddOrderContractRelatedObjs(ExtendedIdentityDbContext dbContext, ContractInfo model, string userName) { return(m_orderContractImpl.AddOrderContractRelatedObjs(dbContext, model, userName)); }