Beispiel #1
0
        public JsonResult GetAssets(AssetSearchParam param, int stockId, int pageIndex = 1, int pageSize = 50)
        {
            var util = param.ToSearchUtil();

            util.And("Id NOT IN (SELECT AssetId FROM Asset_StockItem WHERE StockId=" + stockId.ToString() + ")");

            var db   = new MyDbUtil();
            var list = db.Query <AssetDto>(util, pageIndex, pageSize, "AssetView");

            return(Json(ResultUtil.PageList(list)));
        }
        /// <summary>
        /// 服务申请的分页列表
        /// </summary>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="param">查询参数</param>
        /// <returns></returns>
        public PageList <ServiceApply> PageList(int pageIndex, int pageSize, ServiceApplySearchParam param)
        {
            var util = param.ToSearchUtil();

            return(_db.Query <ServiceApply>(util, pageIndex, pageSize));
        }
Beispiel #3
0
 /// <summary>
 /// 获取分页数据
 /// </summary>
 /// <param name="util">查询参数</param>
 /// <param name="pageIndex">页码</param>
 /// <param name="pageSize">每页数量</param>
 /// <returns></returns>
 public virtual PageList <T> Query(MySearchUtil util, int pageIndex = 1, int pageSize = 20)
 {
     return(db.Query <T>(util, pageIndex, pageSize));
 }
Beispiel #4
0
        public PageList <T> Query(int pageIndex, int pageSize, BaseSearchParam param = null)
        {
            var util = param?.ToSearchUtil() ?? new MySearchUtil();

            return(Db.Query <T>(pageIndex, pageSize, util));
        }
Beispiel #5
0
 /// <summary>
 /// 获取分页数据
 /// </summary>
 /// <param name="util">查询参数</param>
 /// <param name="pageIndex">页码</param>
 /// <param name="pageSize">每页数量</param>
 /// <returns></returns>
 public virtual PageList <T> Query(ISearchParam param, int pageIndex = 1, int pageSize = 20)
 {
     return(db.Query <T>(param.ToSearchUtil(), pageIndex, pageSize));
 }
Beispiel #6
0
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="input"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public PageList <AccountListDto> PageList(AccountSearchParam input, int pageIndex, int pageSize)
        {
            var util = input.ToSearchUtil();

            return(_db.Query <AccountListDto>(util, pageIndex, pageSize, "AccountView"));
        }