Exemple #1
0
        /// <summary>
        /// 获得分页数据
        /// </summary>
        /// <param Name="pager">分页实体类:KingTop.Model.Pager</param>
        /// <returns></returns>
        public void PageData_ApplyJob(KingTop.Modules.Pager pager, int siteid)
        {
            SqlParameter[] prams = new SqlParameter[] {
                new SqlParameter("@Id", "ID"),
                new SqlParameter("@Table", "K_HRResume"),
                new SqlParameter("@Where", ""),
                new SqlParameter("@Cou", "*"),
                new SqlParameter("@NewPageIndex", pager.PageIndex),
                new SqlParameter("@PageSize", pager.PageSize),
                new SqlParameter("@order", "AddDate Desc"),
                new  SqlParameter("@isSql", 1),
                new  SqlParameter("@strSql", GetSql(pager.DicWhere, siteid))
            };

            DataSet ds = SQLHelper.ExecuteDataSet(SQLHelper.ConnectionStringLocalTransaction,
                                                  CommandType.StoredProcedure, "proc_Pager", prams);

            pager.RecordCount = Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString());
            pager.PageData(ds.Tables[1]);
        }
        /// <summary>
        /// 获得分页数据
        /// </summary>
        /// <param Name="pager">分页实体类:KingTop.Model.Pager</param>
        /// <returns></returns>
        public void PageData(KingTop.Modules.Pager pager)
        {
            SqlParameter[] prams = new SqlParameter[] {
                new SqlParameter("@Id", "MemberID"),
                new SqlParameter("@Table", "K_Member"),
                new SqlParameter("@Where", GetWhere(pager.DicWhere)),
                new SqlParameter("@Cou", "*,(SELECT GroupName FROM K_MemberGroup WHERE ID=GroupID) AS GroupName"),
                new SqlParameter("@NewPageIndex", pager.PageIndex),
                new SqlParameter("@PageSize", pager.PageSize),
                new SqlParameter("@order", "RegitDate DESC"),
                new  SqlParameter("@isSql", 0),
                new  SqlParameter("@strSql", "")
            };


            DataSet ds = SQLHelper.ExecuteDataSet(SQLHelper.ConnectionStringLocalTransaction,
                                                  CommandType.StoredProcedure, "proc_Pager", prams);

            pager.RecordCount = Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString());
            pager.PageData(ds.Tables[1]);
        }