本帖最后由 www61550125 于 2012-01-29 00:50:16 编辑

解决方案 »

  1.   

    source = source.Skip(num4).Take(count);
    =>
    source = source.ToList().Skip(num4).Take(count);
      

  2.   

    楼上的:
    source = source.ToList().Skip(num4).Take(count);同样错误。
      

  3.   

    var source = from a in this.db.Reader_JD_Comment
                             join b in this.db.Product on a.id equals b.id
                             select new
                             {
                                 id = a.id,
                                 pj = a.pj,
                                 istj = a.istj,
                                 parentid = a.parentid,
                                 qd = a.qd,
                                 isdel = a.isdel,
                                 eppName = b.eppName,
                                 buyFrom = a.buyFrom,
                                 smallclass = a.smallclass,
                                 username = a.username,
                                 commentType = a.commentType,
                                 yd = a.yd,
                                 fabudate = a.fabudate,
                                 fs = a.fs,
                                 smallpic = b.smallpic,
                                 spid = a.spid,
                                 pinpai = b.pinpai,
                                 price = b.price,
                                 p_name = b.p_name,
                                 pricewebCount = b.pricewebCount,
                                 commentAVG = b.commentAVG,
                                 commentCount = b.commentCount,
                                 sellcount = b.sellcount,
                                 smallpic80 = b.smallpic80
                             } into c
                             where !c.isdel == (c.fabudate < DateTime.Now)
                             where (c.commentType == 0) && (c.smallclass == this.id)
                             where c.parentid == 0
                             orderby c.fabudate descending
                             select c;
    =>
    var source = (from a in this.db.Reader_JD_Comment
                             join b in this.db.Product on a.id equals b.id
                             select new
                             {
                                 id = a.id,
                                 pj = a.pj,
                                 istj = a.istj,
                                 parentid = a.parentid,
                                 qd = a.qd,
                                 isdel = a.isdel,
                                 eppName = b.eppName,
                                 buyFrom = a.buyFrom,
                                 smallclass = a.smallclass,
                                 username = a.username,
                                 commentType = a.commentType,
                                 yd = a.yd,
                                 fabudate = a.fabudate,
                                 fs = a.fs,
                                 smallpic = b.smallpic,
                                 spid = a.spid,
                                 pinpai = b.pinpai,
                                 price = b.price,
                                 p_name = b.p_name,
                                 pricewebCount = b.pricewebCount,
                                 commentAVG = b.commentAVG,
                                 commentCount = b.commentCount,
                                 sellcount = b.sellcount,
                                 smallpic80 = b.smallpic80
                             } into c
                             where !c.isdel == (c.fabudate < DateTime.Now)
                             where (c.commentType == 0) && (c.smallclass == this.id)
                             where c.parentid == 0
                             select c).OrderByDescending(c => c.fabudate).ToList();
      

  4.   


    source =source.orderby(c=> c.fabudate)
      

  5.   

    source = source.Skip(num4).Take(count);            this.rptComment.DataSource = source;
    把你这段改成:
    this.rptComment.DataSource=source.Skip(num4).Take(count);
    这样不就可以!
      

  6.   

    source = source.Skip(num4).Take(count).ToList();