/// <summary> /// 用户查询 /// </summary> /// <param name="search">查询实体</param> /// <returns></returns> public PageJqDatagrid <CrmUserEntity> GetSearchResult(CrmUserEntity search) { //计时 var stopwatch = new Stopwatch(); stopwatch.Start(); int totalRecords; var data = new CrmUserDal().GetSearchResult(search, out totalRecords); stopwatch.Stop(); int totalPage = (totalRecords + search.PageSize - 1) / search.PageSize; //计算页数 return(new PageJqDatagrid <CrmUserEntity> { page = search.PageIndex, rows = data, total = totalPage, records = totalRecords, costtime = stopwatch.ElapsedMilliseconds.ToString() }); }
public CrmUserBll() { BaseDal = new CrmUserDal(); }