Esempio n. 1
0
        public string objectItemTree()
        {
            //string itemcode = "01A00";
            //int classid = 1;

            string itemcode     = _ntsPage.Request["ItemCode"].ToString();
            int    classid      = int.Parse(_ntsPage.Request["ClassId"].ToString());
            string strCacheName = "object-tree" + itemcode + classid;

            var cacheTree = NTS.WEB.Common.CacheHelper.GetCache(strCacheName);

            if (cacheTree != null)
            {
                return(cacheTree.ToString());
            }
            //  var res = Framework.Common.BaseWcf.CreateChannel<ServiceInterface.IObjectTree>("ObjectTree").GetObjectTree();
            var res = new BaseTree(itemcode, classid, "").GetObjectTree();

            NTS.WEB.Common.CacheHelper.SetCache(strCacheName, res.TreeJson);
            return(res.TreeJson);
        }