public ThaoTacTourViewModel(string maTour) { TourChiTietViewModel tour = TourQueries.TimTour(maTour); Tour = tour.Tour; DiemDis = DiaDiemQueries.LoadDiaDiem(tour.Tour.MaDiaDiemDi.ToString()); DiemDens = DiaDiemQueries.LoadDiaDiem(tour.Tour.MaDiaDiemDen.ToString()); KhachSans = KhachSanQueries.LayDsKhachSan(tour.MaKS); LoaiTours = TourQueries.LoadLoaiTour(tour.Tour.LoaiTour); HuongDanViens = NhanVienQueries.LoadHuongDanVien(tour.Tour.MaHDV); }
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();// }