public IList <PropertyRentSearchModel> GetProperties(PropertyRentSearchModel SearchModel) { _cmd.Parameters.AddRange(new SqlParameter[] { new SqlParameter("@UserId", SearchModel.UserId), new SqlParameter("@PageNumber", SearchModel.PageNumber), new SqlParameter("@PageSize", SearchModel.PageSize), new SqlParameter("@PropertyName", SearchModel.PropertyName), }); _cmd.CommandText = "GetProperties"; return(GetList <PropertyRentSearchModel>()); }
public IList <PropertyRentSearchModel> SearchRentProperty(PropertyRentSearchModel SearchModel) { _cmd.Parameters.AddRange(new SqlParameter[] { new SqlParameter("@PageNumber", SearchModel.PageNumber), new SqlParameter("@PageSize", SearchModel.PageSize), new SqlParameter("@Locality", SearchModel.PropertyName), new SqlParameter("@PropertyTypeId", SearchModel.PropertyTypeId), new SqlParameter("@City", SearchModel.CityId), new SqlParameter("@PriceFrom", SearchModel.PriceRange[0]), new SqlParameter("@PriceTo", SearchModel.PriceRange[1]) }); _cmd.CommandText = "SearchRentProperty"; return(GetList <PropertyRentSearchModel>()); }
public ActionResult _UserProperties(PropertyRentSearchModel searchModel) { PropertiesViewModel model = new PropertiesViewModel(); try { model.SearchModel = _rent.GetProperties(searchModel); if (model.SearchModel.Count > 0) { model.pager = new Pager(model.SearchModel.FirstOrDefault().TotalRows, searchModel.PageNumber, searchModel.PageSize); } else { model.pager = new Pager(2, searchModel.PageNumber); } } catch { } return(View(model)); }
public ActionResult PropertyRent(PropertyRentSearchModel searchModel) { return(View(searchModel)); }
public IList <PropertyRentSearchModel> SearchProperties(PropertyRentSearchModel SearchModel) { return(_rent.GetProperties(SearchModel)); }