Пример #1
0
        /// <summary>分页获取数据列表
        ///
        /// </summary>
        public DataSet GetList(string fileds, string order, string ordertype, int PageSize, int PageIndex, string strWhere)
        {
            MSSQLHelper h = new MSSQLHelper(GlobalHelp.ConfigConn);

            h.CreateStoredCommand("[proc_SplitPage]");
            h.AddParameter("@tblName", "Bse_DataDictionary");
            h.AddParameter("@strFields", fileds);
            h.AddParameter("@strOrder", order);
            h.AddParameter("@strOrderType", ordertype);
            h.AddParameter("@PageSize", PageSize);
            h.AddParameter("@PageIndex", PageIndex);
            h.AddParameter("@strWhere", strWhere);
            DataTable dt = h.ExecuteQuery();
            DataSet   ds = new DataSet();

            ds.Tables.Add(dt);
            return(ds);
        }
Пример #2
0
        /// <summary>获得数据列表
        ///
        /// </summary>
        public DataSet GetList(string strWhere, string Filds)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select " + Filds + " ");
            strSql.Append(" FROM Bse_DataDictionary ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            MSSQLHelper h = new MSSQLHelper(GlobalHelp.ConfigConn);

            h.CreateCommand(strSql.ToString());
            DataTable dt = h.ExecuteQuery();
            DataSet   ds = new DataSet();

            ds.Tables.Add(dt);
            return(ds);
        }