コード例 #1
0
        public List <TGoods> GetDishesHoz()
        {
            var dd = new List <TGoods>();

            //foreach (var grN in res)
            {
                TGoodsList r = null;
                try
                {
                    string merrMess;
                    int    merrCode = 0;
                    // _logger.Debug($"GetGoods Id {grN} ");
                    r = sh.GetGoods(40, out merrCode, out merrMess);
                }
                catch (Exception e)
                {
                    // _logger.Error($"GetGoods Id {grN} Error "+e.Message);
                }
                if (r != null)
                {
                    dd.AddRange(r.ListGoods);
                }
            }
            return(dd);
        }
コード例 #2
0
ファイル: SHWrapper.cs プロジェクト: VladimirPiskov/AlohaFly2
        /*
         * public static void CreateSalesInvoice(OrderFlight order)
         * {
         *  var t = new Task(
         *
         *      () =>
         *      {
         *          string ErrMesssage = "";
         *          var CreateSHres = CreateSalesInvoiceSync(order, out ErrMesssage);
         *          if (!CreateSHres)
         *          {
         *              UI.UIModify.ShowAlert($"{ErrMesssage + Environment.NewLine} Накладная будет создана при появлении связи со StoreHouse");
         *              order.IsSHSent = false;
         *              Models.AirOrdersModelSingleton.Instance.UpdateOrder(order);
         *          }
         *      }
         *
         *  );
         *  t.Start();
         * }
         * /*
         * static int UnitId = 6;
         * static int ToFlyFolderId = 5;
         * static int SharFolderId = 6;
         * static int ToGoFolderId = 7;
         */



        private static List <TGoods> GetDishesFromSH(List <int> groups)
        {
            string errMess;
            int    errCode = 0;
            //var groups = sh.GetGoodsTree(out errCode, out errMess).ListGoodsTree;
            var tmp = new List <TGoods>();

            foreach (var grId in groups)
            {
                var res = sh.GetGoods(grId, out errCode, out errMess);
                if (res.ListGoods.Count > 0)
                {
                    tmp.AddRange(res.ListGoods);
                }
            }
            return(tmp);
        }
コード例 #3
0
        private static List <TGoods> GetDishesFromSH()
        {
            string errMess;
            int    errCode = 0;
            var    groups  = sh.GetGoodsTree(out errCode, out errMess).ListGoodsTree;
            var    tmp     = new List <TGoods>();



            // foreach (var grId in groups)
            {
                //var res = sh.GetGoods(grId.Rid, out errCode, out errMess);
                var res = sh.GetGoods(61, out errCode, out errMess);
                if (res.ListGoods.Count > 0)
                {
                    tmp.AddRange(res.ListGoods);
                    foreach (var d in res.ListGoods)
                    {
                        _logger.Debug($"{d.Rid} {d.Name}");
                    }
                }
            }
            return(tmp);
        }