예제 #1
0
        public ActionResult Detail(int id)
        {
            var model = _tinTuyenDungService.GetById(id);

            var kyNang = _tinTuyenDungService.GetKyNangByTinId(id);

            var nganhNghe = _tinTuyenDungService.GetNganhNgheByTinId(id);

            var tinh = _tinTuyenDungService.GetTinhByTinId(id);

            var phucLoi = _tinTuyenDungService.GetPhucLoiByTinId(model.CongTyId);

            var listImages = new JavaScriptSerializer().Deserialize <List <string> >(model.CongTy.HinhAnh);

            DetailVm detailVm = new DetailVm();

            detailVm.TinTuyenDung = model;

            detailVm.KyNang = kyNang;

            detailVm.NganhNghe = nganhNghe;

            detailVm.Tinh = tinh;

            detailVm.PhucLoi = phucLoi;

            detailVm.ListImages = listImages;

            _tinTuyenDungService.IncreaseView(id);
            _tinTuyenDungService.Save();

            return(View(detailVm));
        }
        public IActionResult Detail(int?Id)
        {
            if (Id == null)
            {
                return(NotFound());
            }
            ViewBag.Banner = _db.Banners.Skip(9).Take(1);
            DetailVm BlogDetail = new DetailVm
            {
                blog    = _db.Blogs.Where(c => c.Id == Id).Include(m => m.BlogAndTeachers).ThenInclude(v => v.Teacher).FirstOrDefault(),
                Courses = _db.Courses.Include(c => c.Categories).Take(6).ToList(),
                Blogs   = _db.Blogs.Take(3).ToList()
            };

            return(View(BlogDetail));
        }
        public IActionResult Detail(int? Id)
        {
            if (Id == null) return NotFound();
            ViewBag.Banner = _db.Banners.Skip(7).Take(1);


            DetailVm NewEventDetail = new DetailVm
            {
                newEvents = _db.NewEvents.Where(e => e.Id == Id).Include(c => c.NewManagmentEvents)
                .ThenInclude(m => m.NewManagmentBoard).FirstOrDefault(),
                Courses = _db.Courses.Include(c => c.Categories).Take(6).ToList(),
                Blogs = _db.Blogs.Take(3).ToList(),


            };
            return View(NewEventDetail);
        }
        public IActionResult Detail(int?Id)
        {
            if (Id == null)
            {
                return(NotFound());
            }
            ViewBag.Banner = _db.Banners.Skip(6).Take(1);


            DetailVm courseDetail = new DetailVm
            {
                course  = _db.Courses.Where(c => c.Id == Id).FirstOrDefault(),
                Courses = _db.Courses.Include(c => c.Categories).Take(6).ToList(),
                Blogs   = _db.Blogs.Take(3).ToList()
            };

            return(View(courseDetail));
        }