62,046
社区成员
发帖
与我相关
我的任务
分享
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;
string strPost = "_" + this.id + "_0";
int iRecordCount = 0;
short count = 20;
short iPageCurrent = 1;
iRecordCount = source.Count();
iPageCurrent = Convert.ToInt16((iPageCurrent < 1) ? 1 : ((int)iPageCurrent));
int num4 = (iPageCurrent - 1) * count;
source = source.Skip(num4).Take(count); this.rptComment.DataSource = source;
this.rptComment.DataBind();
this.lblPage.Text = common.NetPageWJT(iRecordCount, count, iPageCurrent, "Comment", strPost);
source =source.orderby(c=> c.fabudate)