Example #1
0
        /// <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_")));
            });

            return(reader);
        }
Example #2
0
 /// <summary>
 /// 获取OUTPUT的值
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public object GetOutParam(string name)
 {
     return(helper.GetOutParam(name));
 }