Exemplo n.º 1
0
        /// <summary>
        /// 公用分页存储过程调用
        /// </summary>
        /// <param name="tableName">表名</param>
        /// <param name="fields">表中的字段,可以使用*代替</param>
        /// <param name="orderField">要排序的字段</param>
        /// <param name="sqlWhere">WHERE子句</param>
        /// <param name="pageSize">分页的大小</param>
        /// <param name="pageIndex">要显示的页的索引</param>
        /// <param name="totalPage">返回的总页数</param>
        /// <param name="recordCount">返回的总记录数</param>
        /// <returns>返回DataSet</returns>

        public static DataTable GetPageProBll(string tableName, string fields, string orderField, string sqlWhere, int pageSize, int pageIndex, out int totalPage, out int recordCount)
        {
            totalPage   = 0;
            recordCount = 0;
            DataSet ds = new ProcUtility().GetPagePro(tableName, fields, orderField, sqlWhere, pageSize, pageIndex, out totalPage, out recordCount);

            return(ds.Tables[0]);
            //return DataTableToList(ds.Tables[0]);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 公用更新存储过程 调用
        /// </summary>
        /// <param name="tableName">传入表名</param>
        /// <param name="fields">传入需要更新的字段</param>
        /// <param name="where">传入更新的条件</param>
        /// <returns></returns>
        public static bool Pro_ModifyBll(string tableName, string fields, string where)
        {
            int n = new ProcUtility().Pro_Modify(tableName, fields, where);

            if (n > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }