Exemple #1
0
        /// <summary>
        /// 获取分页数据
        /// </summary>
        public DataTable GetPaginationData(DBTAB_Module_RelationQuery TAB_Module_RelationQuery)
        {
            StringBuilder strSqlOption = new StringBuilder();
            StringBuilder strSql       = new StringBuilder();

            SqlParameter[] sqlParams;
            TAB_Module_RelationQuery.OutPut(out strSqlOption, out sqlParams);
            strSql.Append(@"select top " + TAB_Module_RelationQuery.rows.ToString() + " * from WebPlatForm_Module_Relation  where  1=1 " + strSqlOption.ToString() + " and nID not in ( select top " + (TAB_Module_RelationQuery.page - 1) * TAB_Module_RelationQuery.rows + " nID from WebPlatForm_Module_Relation where  1=1 " + strSqlOption.ToString() + " order by nID desc) order by nID desc");

            return(SqlHelper.ExecuteDataset(ConnectionString, CommandType.Text, strSql.ToString(), sqlParams).Tables[0]);
        }
Exemple #2
0
        /// <summary>
        /// 获取数据总数
        /// </summary>
        /// <param name="jcid"></param>
        /// <returns></returns>
        public int GetDataCount(DBTAB_Module_RelationQuery TAB_Module_RelationQuery)
        {
            SqlParameter[] sqlParams;
            StringBuilder  strSqlOption = new StringBuilder();

            TAB_Module_RelationQuery.OutPut(out strSqlOption, out sqlParams);
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(*) ");
            strSql.Append(" FROM WebPlatForm_Module_Relation where 1=1" + strSqlOption.ToString());
            return(ObjectConvertClass.static_ext_int(SqlHelper.ExecuteScalar(ConnectionString, CommandType.Text, strSql.ToString(), sqlParams)));
        }
Exemple #3
0
        /// <summary>
        /// 获取所有数据
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public DataTable GetData(DBTAB_Module_RelationQuery TAB_Module_RelationQuery)
        {
            SqlParameter[] sqlParams;
            StringBuilder  strSqlOption = new StringBuilder();

            TAB_Module_RelationQuery.OutPut(out strSqlOption, out sqlParams);
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * ");
            strSql.Append(" FROM WebPlatForm_Module_Relation where 1=1" + strSqlOption.ToString());

            return(SqlHelper.ExecuteDataset(ConnectionString, CommandType.Text, strSql.ToString(), sqlParams).Tables[0]);
        }