예제 #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));
 }