会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我和未来有约会
“不要以自己懂的少为借口,每天都要总结一下所学的东西”
博客园
首页
新随笔
联系
管理
订阅
[求助]castle多对多的分页大家都是怎么样做的?(更新)
这个是我自己做的,感觉效率很低,而且无法查询。
public
IList GetPictureByPTypeID(
string
PTypesID,
int
firstResult,
int
maxResults,
out
int
recordcount)
{
IList plist
=
pm.PType.Find(
int
.Parse(PTypesID)).Pictures;
recordcount
=
plist.Count;
return
IListPage(firstResult, maxResults, plist);
}
public
IList IListPage(
int
firstResult,
int
maxResults, IList list)
{
ArrayList tlist
=
new
ArrayList();
int
i
=
0
;
foreach
(
object
obj
in
list)
{
if
(i
>=
firstResult
&&
i
<
(firstResult+maxResults))
{
tlist.Add(obj);
}
i
++
;
}
return
tlist;
}
posted @
2007-04-27 16:55
王喆(nasa)
阅读(
689
) 评论(
0
)
收藏
举报
刷新页面
返回顶部
公告