public ActionResult ShowPost(int pageIndex, int?Location)
        {
            var pageSize = 9;
            var list     = new PostBCL().GetByDateCreate_Paging(pageIndex * pageSize, pageSize, Location);

            return(PartialView(list));
        }
示例#2
0
        public JsonResult Apply(Guid id, FormCollection collection)
        {
            var ob = new PostBCL().GetByPostId(id);

            if (ob == null)
            {
                return(Json(false));
            }
            ob.Approved    = true;
            ob.ApprovedDay = DateTime.Now;
            //ob.AdministratorID =
            return(Json(new PostBCL().Update(ob)));
        }
        // GET: Main
        public ActionResult Index(int?pageIndex, int?SeachLocation)
        {
            if (pageIndex == null)
            {
                pageIndex = 0;
            }
            var location = new City_BCL().ExecuteOf_GetElements();

            ViewBag.location = location;

            ViewBag.SeachLoacation = SeachLocation;

            ViewBag.pageIndex = pageIndex;
            ViewBag.PageSize  = pageIndex + 1;
            var pageSize = 9;

            if (Request.IsAjaxRequest())
            {
                return(RedirectToAction("ShowPost", new { pageIndex = pageIndex, Location = SeachLocation }));
            }
            var list = new PostBCL().GetByDateCreate_Paging(pageIndex.Value * pageSize, pageSize, SeachLocation);

            return(View(list));
        }
        public ActionResult PartialCarInfo(long?carCode = 1)
        {
            var postObject = new PostBCL().GetByCarCode(carCode);

            return(PartialView(postObject));
        }
        // GET: CarDetail
        public ActionResult Index(long?carCode = 1)
        {
            var postObject = new PostBCL().GetByCarCode(carCode);

            return(View(postObject));
        }
        // GET: Main/Details/5
        public ActionResult Details()
        {
            var postObject = new PostBCL().GetByCarCode(1);

            return(View(postObject));
        }