Example #1
0
        public List <TTreeItem> GetGoups(int parentId)
        {
            string errMess;
            int    errCode = 0;
            var    gr      = sh.GetGoodsTree(out errCode, out errMess).ListGoodsTree;

            return(gr.Where(a => a.Parent == parentId).ToList());
        }
Example #2
0
        private static Dictionary <int, string> GetToFlyGoodsTreeDic()
        {
            string errMess;
            int    errCode = 0;
            var    res     = new Dictionary <int, string>();
            var    un      = sh.GetGoodsTree(out errCode, out errMess);

            foreach (var u in un.ListGoodsTree)
            {
                if (u.Parent == Properties.Settings.Default.SHToFlyFolderId)
                {
                    logger.Debug($"{u.Rid} {u.Name.Trim()}");
                    res.Add(u.Rid, u.Name.Trim());
                }
            }
            return(res);
        }
        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);
        }