public List <UsersModel> GetPageList(SUsersModel SModel) { try { return(UDal.GetPageList(SModel)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public ActionResult PageList(SUsersModel SModels) { var PageList = USer.GetPageList(SModels); return(new ContentResult { Content = new JavaScriptSerializer { MaxJsonLength = Int32.MaxValue }.Serialize(PageList), ContentType = "application/json" }); }
public List <UsersModel> GetPageList(SUsersModel SModel) { using (var db = new HTJKEntities()) { var List = (from p in db.A_User.Where(k => k.State == true) where !string.IsNullOrEmpty(SModel.Name) ? p.Name.Contains(SModel.Name) : true orderby p.CreateTime descending select new UsersModel { Id = p.Id, Name = p.Name, Telphone = p.Telphone, LoginTimes = p.LoginTimes, LastTimes = p.LastTimes, }).ToList(); return(List); } }
public ActionResult Index() { SUsersModel SModels = new SUsersModel(); return(View(SModels)); }