Esempio n. 1
0
        //获取数据
        public ActionResult GetDataList(string sw)
        {
            var pageIndex = Common.GetPageIndex();
            var pageSize  = Common.GetPageSize();
            var total     = 0;
            List <ITC_Sysmenus_M> list_mo = uifo.GetList(sw, pageIndex, pageSize, out total);
            var list = from f in list_mo
                       select new
            {
                Menu_createdtime = f.Menu_createdtime.ToString("g"),
                f.Menu_Ico,
                f.Menu_ID,
                f.Menu_Name,
                f.Menu_Oprt,
                f.Menu_Order,
                Menu_ParentName = uifo.GetMenuName(f.Menu_ParentID),
                f.Menu_Remark,
                Menu_Status = Common.GetStatus(f.Menu_Status),
                f.Menu_Type,
                f.Menu_Url
            };
            var page = new PageViewModel {
                rows = list, total = total
            };

            return(Json(page, JsonRequestBehavior.DenyGet));
        }
Esempio n. 2
0
        /// <summary>
        /// 初如化缓存数据
        /// </summary>
        public static List <ITC_Sysmenus_M> InitCache()
        {
            ITC_Sysmenus          bll  = new ITC_Sysmenus();
            List <ITC_Sysmenus_M> list = bll.GetList("Menu_Status=0");

            CacheHelper.Set(CacheKeys.Menus.ToString(), list);
            return(list);
        }