예제 #1
0
        // GET: Asset
        #region Index Section
        public ActionResult Index(int page = 1)
        {
            ViewBag.CategoryList = _categoryEngine.GetAll();
            var model = _propertyEngine.GetAll().ToPagedList(page, 16);

            return(View(model));
        }
예제 #2
0
        public ActionResult UserProperties(int page = 1)
        {
            var user  = (User)Session["Login"];
            var model = _propertyEngine.GetAll().Where(x => x.User.Id == user.Id).ToPagedList(page, 6);

            return(View(model));
        }
예제 #3
0
        // GET: Home
        public ActionResult Index()
        {
            setCategory();
            var model = _propertyEngine.GetAll(4, 4).Where(x => !x.IsDeleted).ToList();;

            return(View(model));
        }
예제 #4
0
        // GET: Location
        public JsonResult GetMapLocations()
        {
            var data = _propertyEngine.GetAll().Select(x => new { x.Id, x.GeoLocation.Lat, x.GeoLocation.Long, x.GeoLocation.Address, x.Price, x.Photo.FirstOrDefault().ImageUrl, x.Title, catid = x.Category.Id }).ToList(); // categori id farklı bir isimle gönder

            return(Json(data, JsonRequestBehavior.AllowGet));
        }