Esempio n. 1
0
        /// <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()
            });
        }
Esempio n. 2
0
 public CrmUserBll()
 {
     BaseDal = new CrmUserDal();
 }