コード例 #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
ファイル: NewsController.cs プロジェクト: ngochieu0302/IG42
        public PartialViewResult NewsHot(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) : 0;

                model.ListItem = _menuBl.GetChildCategories((int)ModuleType.News);
                return(PartialView(model));
            }
            model.ListItem = _categoryBl.GetlistCateShowhome((int)ModuleType.News);
            return(PartialView(model));
        }