Esempio n. 1
0
        public PartialViewResult MenuNews(int ctrId, string url, string slug = "Index")
        {
            var model = new ModelMenusItem {
                CtrId = ctrId
            };

            if (Request["doAction"] == "setting")
            {
                model.ListItem = _bl.GetListMenusById(1);
                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) : 0;

                model.ListItem     = _bl.GetListMenusById(val);
                model.CategoryItem = _bl.CategoryItem(val);
                return(PartialView(model));
            }
        }