Beispiel #1
0
        /// <summary>
        /// 由入库信息获取产品列表
        /// </summary>
        /// <param name="stockIn"></param>
        /// <returns></returns>
        public static IList <Product> GetProductsBuStockIn(RfidMobile.Service.StockIn.StockIn stockIn)
        {
            IList <Product> products = new List <Product>();

            if (stockIn != null && stockIn.Details != null)
            {
                foreach (StockInDetail detail in stockIn.Details)
                {
                    foreach (Product product in detail.Products)
                    {
                        products.Add(product);
                    }
                }
            }
            return(products);
        }
Beispiel #2
0
        /// <summary>
        /// 根据入库单号读入库信息
        /// </summary>
        /// <param name="serialNumber"></param>
        /// <returns></returns>
        public static StockIn GetBySerialNumber(string serialNumber)
        {
            StockIn stockIn = new StockIn();

            try
            {
                string url = "http://192.168.0.222:50000/Api/StockIn";

                string json = HttpService.GetJsonByUrl(url);
                stockIn = JsonConvert.DeserializeObject <StockIn>(json);
            }
            catch (Exception ex) {
                Message = "入库信息读取失败";
                LogService.Error(TAG, ex.Message);
            }

            return(stockIn);
        }