1 int[] osFormList = eomsQuery
2 .SetDateTime("beginDate", DateTime.Parse(beginDate + " 00:00:00"))
3 .SetDateTime("endDate", DateTime.Parse(endDate + " 23:59:59"))
4 .List<int>().ToArray<int>();
5
6 if (osFormList.Length>0)
7 {
8 ISession npSession = BaseService.GetHibernateSession(typeof(NetPlace));
9 IQuery npQuery = npSession.CreateQuery("from NetPlace t where t.FormID in (:ids)");
10 npQuery.SetParameterList("ids", osFormList);
11 List<NetPlace> arrNetPlace = npQuery.List<NetPlace>().ToList<NetPlace>();
12 }
2 .SetDateTime("beginDate", DateTime.Parse(beginDate + " 00:00:00"))
3 .SetDateTime("endDate", DateTime.Parse(endDate + " 23:59:59"))
4 .List<int>().ToArray<int>();
5
6 if (osFormList.Length>0)
7 {
8 ISession npSession = BaseService.GetHibernateSession(typeof(NetPlace));
9 IQuery npQuery = npSession.CreateQuery("from NetPlace t where t.FormID in (:ids)");
10 npQuery.SetParameterList("ids", osFormList);
11 List<NetPlace> arrNetPlace = npQuery.List<NetPlace>().ToList<NetPlace>();
12 }
SetParameterList,这个方法是关键