コード例 #1
0
 /// <summary>
 /// 获得前几行数据
 /// </summary>
 public virtual IList <Organization> GetList(List <SearchTemplate> st, List <Order> order)
 {
     using (ISession session = sessionFactory.OpenSession())
     {
         ICriteria            crit      = session.CreateCriteria(typeof(Organization));
         IList <Organization> customers = ManagerPage.GetCrit <Organization>(st, order, crit);
         return(customers);
     }
 }
コード例 #2
0
 /// <summary>
 /// 获取总行数
 /// </summary>
 /// <param name="parent_id"></param>
 /// <returns></returns>
 public virtual int GetCount(List <SearchTemplate> st)
 {
     using (ISession session = sessionFactory.OpenSession())
     {
         ICriteria crit  = session.CreateCriteria(typeof(Organization_type));
         int       count = ManagerPage.GetCrit <Navigation>(st, crit);
         return(count);
     }
 }