public ActionResult Index() { SMenuModel SModels = new SMenuModel(); SModels.TypeDroList = CSer.GetParentType(SModels.TypeId); return(View(SModels)); }
public List <MenuModel> GetPageList(SMenuModel SModel) { try { return(CDal.GetPageList(SModel)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public ActionResult PageList(SMenuModel SModels) { var PageList = CSer.GetPageList(SModels); return(new ContentResult { Content = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }.Serialize(PageList), ContentType = "application/json" }); }
public List <MenuModel> GetPageList(SMenuModel SModel) { using (var db = new HTJKEntities()) { var List = (from p in db.A_Menu.Where(k => k.DeleteFlag == true) where !string.IsNullOrEmpty(SModel.Name) ? p.Name.Contains(SModel.Name) : true where SModel.TypeId != null && SModel.TypeId > 0 ? p.Id == SModel.TypeId : true orderby p.Id select new MenuModel { Id = p.Id, Name = p.Name, Rank = p.Rank, CreateTime = p.CreateTime, ParentId = p.ParentId, ParentName = p.A_Menu2.Name, Action = p.Action, Controller = p.Controller, Icon = p.Icon, }).ToList(); return(List); } }