zoukankan      html  css  js  c++  java
  • [求助]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;
            }
  • 相关阅读:
    996工作制是奋斗还是剥削?
    动态链接的PLT与GOT
    The Product-Minded Software Engineer
    缓冲区溢出
    golang的加法比C快?
    C errno是否是线程安全的
    golang 三个点的用法
    GDB 单步调试汇编
    为什么CPU需要时钟这种概念?
    fliebeat配置手册
  • 原文地址:https://www.cnblogs.com/nasa/p/730020.html
Copyright © 2011-2022 走看看