public IList GetByCondition(PropertyAppropriation propertyAppropriation) { ArrayList param = new ArrayList(); string queryStr = "from PropertyAppropriation t where 1=1"; if (!string.IsNullOrEmpty(propertyAppropriation.ast_id)) { queryStr += " and t.ast_id=?"; param.Add(propertyAppropriation.ast_id); } if (propertyAppropriation.Department != null) { queryStr += " and t.Department = ?"; param.Add(propertyAppropriation.Department.DepartmentID); } if (!string.IsNullOrEmpty(propertyAppropriation.ast_from_user)) { queryStr += " and t.ast_from_user like ?"; param.Add("%" + propertyAppropriation.ast_from_user + "%"); } if (propertyAppropriation.ast_fit_date != propertyAppropriation.ast_fit_default_date) { DateTime dtTemp = propertyAppropriation.ast_fit_date.AddDays(1); queryStr += " and t.ast_fit_date >= ? and t.ast_fit_date < ?"; param.Add(propertyAppropriation.ast_fit_date); param.Add(dtTemp); } return(HibernateTemplate.Find(queryStr, param.ToArray())); }
public IList GetByCondition(User user) { ArrayList param = new ArrayList(); string queryStr = "from User t where 1=1"; if (user.UserID != "") { queryStr += " and t.UserID=?"; param.Add(user.UserID); } if (user.UserName != "") { queryStr += " and t.UserName like ?"; param.Add("%" + user.UserName + "%"); } if (user.Role != null) { queryStr += " and t.Role=?"; param.Add(user.Role.RoleId); } if (user.Department != null) { queryStr += " and t.Department=?"; param.Add(user.Department.DepartmentID); } return(HibernateTemplate.Find(queryStr, param.ToArray())); }
public object DoInTransaction(ITransactionStatus status) { Assert.IsTrue(TransactionSynchronizationManager.HasResource(sfProxy), "Has thread session"); Assert.IsTrue(TransactionSynchronizationManager.HasResource(provider), "Hasn't thread db provider"); Assert.IsFalse(TransactionSynchronizationManager.CurrentTransactionReadOnly); Assert.IsTrue(TransactionSynchronizationManager.ActualTransactionActive); HibernateTemplate ht = new HibernateTemplate(sfProxy); return(ht.Find("some query string")); }
/// <summary> /// 根据选品库id获取该选品库在数据库中的产品集合 /// </summary> /// <param name="fId">参数:选品库id</param> /// <returns></returns> public IList <FavoriteItem> GetByFId(long fId) { return(HibernateTemplate.Find <FavoriteItem> ( "from FavoriteItem p where p.FavoritesId=?", fId )); throw new NotImplementedException(); }
public IList <Favorites> GetIListById(long id) { return(HibernateTemplate.Find <Favorites> ( "from WeixinBaseConfigure p where p.WxcId=?", id )); throw new NotImplementedException(); }
public IList getZipList(string obj) { IList lists = HibernateTemplate.Find("from Zip where pid=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public Marquee getMarquee(string obj) { IList lists = HibernateTemplate.Find("from Marquee where Id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((Marquee)lists[0]); } }
public IList getExamplesListByYear(string year) { IList lists = HibernateTemplate.Find("from Examples where Year = ? order by Year desc ", year); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public Zip getZip(string obj) { IList lists = HibernateTemplate.Find("from Zip where Id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((Zip)lists[0]); } }
public IList getTechInfoList(int obj) { IList lists = HibernateTemplate.Find("from TechInfo where id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public Case getCase(int obj) { IList lists = HibernateTemplate.Find("from Case where id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((Case)lists[0]); } }
public IList getCaseList() { IList lists = HibernateTemplate.Find("from Case where Isdeleted=false"); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public IList getReuseTechListAll(string obj) { IList lists = HibernateTemplate.Find("from ReuseTech where Username=?", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public Match getMatch(int obj) { IList lists = HibernateTemplate.Find("from Match where Id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((Match)lists[0]); } }
public IList getNotApprovedMatch(string obj) { IList lists = HibernateTemplate.Find("from Match where (Username1='" + obj + "' or Username2='" + obj + "') and (Isapproved1=false or Isapproved2=false)"); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public IList getCityList() { IList lists = HibernateTemplate.Find("from City "); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public City getCity(string obj) { IList lists = HibernateTemplate.Find("from City where Id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((City)lists[0]); } }
public Param getParam(object[] obj) { IList lists = HibernateTemplate.Find("from Param p where p.Id.Paramid=? and p.Id.Paramcode=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((Param)lists[0]); } }
public IList getMarqueeList(ArrayList obj) { IList lists = HibernateTemplate.Find("from Marquee where id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public ReuseTech getReuseTechByName(string obj) { IList lists = HibernateTemplate.Find("from ReuseTech where Username=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((ReuseTech)lists[0]); } }
public IList getUserProfilesList(ArrayList obj) { IList lists = HibernateTemplate.Find("from UserProfiles where id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public IList getReuseTechList(object[] obj) { IList lists = HibernateTemplate.Find("from ReuseTech where Id=? and Username=?", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public IList getMatchListForManager() { IList lists = HibernateTemplate.Find("from Match where Ischecked<>'N' and Isapproved1=true and Isapproved2=true order by Matchdate "); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public ReuseTech getReuseTech(int id) { IList lists = HibernateTemplate.Find("from ReuseTech where id=? ", id); if (lists == null || lists.Count < 1) { return(null); } else { return((ReuseTech)lists[0]); } }
public UserProfiles getUserProfiles(string obj) { IList lists = HibernateTemplate.Find("from UserProfiles where Username=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((UserProfiles)lists[0]); } }
public IList getMatchListForUser2(string obj) { IList lists = HibernateTemplate.Find("from Match where Username2=? and Ischecked='Y' and Isconfirm2<>'N' order by Matchdate ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public AspnetUsers FindByProperty(string userName) { IList lists = HibernateTemplate.Find("from AspnetUsers where UserName=? ", userName); if (lists == null || lists.Count < 1) { return(null); } else { return((AspnetUsers)lists[0]); } }
public Examples getExamples(ArrayList obj) { IList lists = HibernateTemplate.Find("from Examples where id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return((Examples)lists[0]); } }
public IList getExamplesList() { IList lists = HibernateTemplate.Find("from Examples order by Year desc "); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }
public IList getNewsListById(int obj) { IList lists = HibernateTemplate.Find("from News where id=? ", obj); if (lists == null || lists.Count < 1) { return(null); } else { return(lists); } }