/// <summary> /// 查询数据 /// </summary> /// <param name="page"></param> /// <param name="limit"></param> /// <param name="keyWords"></param> /// <returns></returns> public IActionResult List(int page, int limit, string keyWords) { StringBuilder StrWhere = new StringBuilder("1=1"); if (!string.IsNullOrWhiteSpace(keyWords)) { StrWhere.Append("AND (WarehouseName.Contain(@0))"); } var list = _warehouseS.GetWarehouseList(page, limit, StrWhere.ToString(), "WarehouseId desc", keyWords); int recordCount = _warehouseS.GetRecordCount(StrWhere.ToString(), keyWords); return(Json(ListResult(list, recordCount))); }
/// <summary> /// 获得分页数据总的记录条数 /// </summary> public int GetRecordCount(string strWhere) { return(dal.GetRecordCount(strWhere)); }