示例#1
0
        public ThaoTacTourViewModel()
        {
            DiemDis = DiaDiemQueries.LoadDiaDiem();
            //DiemDis.SelectedValue = DiemDis.FirstOrDefault().Value;
            int?maDiemDi = int.Parse(DiemDis.SelectedValue.ToString());

            DiemDens      = DiaDiemQueries.TimDiemDen2(maDiemDi);//
            KhachSans     = KhachSanQueries.LayDsKhachSan();
            LoaiTours     = TourQueries.LoadLoaiTour();
            HuongDanViens = NhanVienQueries.LoadHuongDanVien();//
        }
        //
        // GET: /TrangChu/
        public ActionResult Index(int?page)
        {
            int pageSize = 8;

            int pageIndex = 1;

            pageIndex     = page.HasValue ? Convert.ToInt32(page) : 1;
            ViewBag.Tours = TourQueries.LoadDSTour().ToPagedList(pageIndex, pageSize);

            ViewBag.MaDiaDiemDi  = DiaDiemQueries.LoadDiaDiem();;
            ViewBag.MaDiaDiemDen = DiaDiemQueries.TimDiemDen2(int.Parse(ViewBag.MaDiaDiemDi.SelectedValue.ToString()));

            //List<string> lst = new List<string>();
            //lst = TourQueries.Loc_CollaborativeFiltering("1885", "15", 9);


            return(View(new TimKiemTourViewModel()));
        }