if (Request["pagesize"] == null)
            Record_Per_Page = 25;
        else
            Record_Per_Page = Convert.ToInt32(Request["pagesize"]); if (Request["page"] == null)
            nPage = 1;
        else
            nPage = Convert.ToInt32(Request["page"]);
        StringBuilder StrSql = new StringBuilder();
        StrSql.AppendFormat("SELECT TOP {0}  * FROM C_Work_Object WHERE  ", Record_Per_Page.ToStri());
        StrSql.AppendFormat("( Obj_id NOT IN (SELECT TOP {0} Obj_id  FROM C_Work_Object",(Record_Per_Page * (nPage - 1)).ToString());
        if (timeStart != DateTime.MinValue || timeEnd != DateTime.MinValue)
        {
            StrSql.Append(" where ");
            if (timeStart == DateTime.MinValue)
            {
                StrSql.AppendFormat(" Obj_dotime < '{0}'", timeEnd.ToString());
            }
            else if (timeEnd == DateTime.MinValue)  
            {
                StrSql.AppendFormat(" Obj_dotime > '{0}'", timeStart.ToString());
            }
            else
            {
                StrSql.AppendFormat(" Obj_dotime between '{0}'  and '{1}'", timeStart.ToString(), timeEnd.ToString());
            }
           
        }
        StrSql.Append(" ORDER BY Obj_id DESC ))");
        StrSql.Append(" ORDER BY Obj_id DESC ");
        pdperson = pd.GetObjectBySql(StrSql.ToString());
       //获得总记录数
        nRecCount = pdperson.Rows.Count;为什么只能获得25条的总记录数啊??哪位大狭帮看一下StrSql语句有错误吗??谢了~