Пример #1
0
        public PartialViewResult MenuLeft(int ctrId, string url, int cateId = 0)
        {
            var model = new ModelCategoryItem {
                CtrId = ctrId
            };

            if (Request["doAction"] == "setting")
            {
                model.ListItem = _bl.GetChildCategories((int)ModuleType.Product);
                var key = _sysbl.GetKey(ctrId);
                model.PageId = key != null?int.Parse(key.Value) : 0;

                return(PartialView(model));
            }
            else
            {
                model.CtrUrl = url;
                var key = _sysbl.GetKey(ctrId);
                var val = key != null?int.Parse(key.Value) : 83;

                model.ParentId = val;
                model.ListItem = _categoryBl.GetlistCatebyParent(val);
                return(PartialView(model));
            }
        }
Пример #2
0
        public PartialViewResult NewsLeft(int ctrId, string url)
        {
            var model = new ModelCategoryItem {
                CtrId = ctrId, CtrUrl = url
            };

            if (Request["doAction"] == "setting")
            {
                var key = _sysbl.GetKey(ctrId);
                model.PageId = key != null?int.Parse(key.Value) : 5;

                model.ListItem = _menuBl.GetChildCategories((int)ModuleType.News);
                return(PartialView(model));
            }
            else
            {
                var key = _sysbl.GetKey(ctrId);
                var val = key != null?int.Parse(key.Value) : 79;

                model.ListItem = _categoryBl.GetlistCatebyParent(val);
                return(PartialView(model));
            }
        }