internal override CallBackDataReader GetPageData(CoreHelper.DBHelper helper, string query, string fields, string sort, int pageSize, int pageIndex) { helper.AddParam("query_", query); helper.AddParam("fields_", fields); helper.AddParam("sort_", sort); helper.AddParam("pageSize_", pageSize); helper.AddParam("pageIndex_", pageIndex); helper.AddOutParam("count_"); helper.AddOutParam("v_Cursor"); var reader = new CallBackDataReader(helper.RunDataReader("sp_page"), () => { return(Convert.ToInt32(helper.GetOutParam("count_"))); }); return(reader); }
/// <summary> /// page /// </summary> /// <param name="query"></param> /// <param name="fields"></param> /// <param name="sort"></param> /// <param name="pageSize"></param> /// <param name="pageIndex"></param> /// <returns></returns> internal virtual CallBackDataReader GetPageData(string query, string fields, string sort, int pageSize, int pageIndex) { helper.AddParam("query_", query); helper.AddParam("fields_", fields); helper.AddParam("sort_", sort); helper.AddParam("pageSize_", pageSize); helper.AddParam("pageIndex_", pageIndex); helper.AddOutParam("count_", 1); //var reader = helper.RunDataReader("sp_page"); var reader = new CallBackDataReader(helper.RunDataReader("sp_page"), () => { return(Convert.ToInt32(helper.GetOutParam("count_"))); }, query); return(reader); }
/// <summary> /// 增加输出参数 /// </summary> /// <param name="name"></param> /// <param name="value">对应类型任意值</param> public void AddOutParam(string name, object value = null) { helper.AddOutParam(name, value); }