Beispiel #1
0
        public SOInfo ProductQtyChange(SOInfo entity)
        {
            ISODA soDA = ObjectFactory <ISODA> .Instance;

            foreach (var item in entity.Items)
            {
                if (item.ProductSysNo.HasValue && item.Quantity.HasValue)
                {
                    StockInfo stock = soDA.GetProductStockByProductSysNoAndQty(item.ProductSysNo.Value, item.Quantity.Value);
                    if (stock != null)
                    {
                        item.StockSysNo = stock.SysNo;
                        item.StockName  = stock.StockName;
                    }
                }
            }
            return(ObjectFactory <SOAppService> .Instance.Calculate(entity));
        }