public List <RoleModel> GetPageList(SRoleModel SModel) { try { return(CDal.GetPageList(SModel)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public ActionResult PageList(SRoleModel SModels) { var PageList = CSer.GetPageList(SModels); return(new ContentResult { Content = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }.Serialize(PageList), ContentType = "application/json" }); }
public List <RoleModel> GetPageList(SRoleModel SModel) { using (var db = new HTJKEntities()) { var List = (from p in db.A_Role.Where(k => k.DeleteFlag == true) where !string.IsNullOrEmpty(SModel.Name) ? p.UserName.Contains(SModel.Name) : true orderby p.Id select new RoleModel { Id = p.Id, UserId = p.UserId, UserName = p.UserName, CreateTime = p.CreateTime, MenuList = p.MenuList, }).ToList(); return(List); } }
public ActionResult Index() { SRoleModel SModels = new SRoleModel(); return(View(SModels)); }