Пример #1
0
        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));
        }
Пример #2
0
 public IList <PropertyRentSearchModel> GetProperties(PropertyRentSearchModel SearchModel)
 {
     return(_rent.GetProperties(SearchModel));
 }