Пример #1
0
        public IActionResult List()
        {
            ViewBag.SelectAllKeyword = _keywordPoolService.GetAll();
            var model = _categoryService.GetAllCategories();

            return(View(model));
        }
Пример #2
0
        public IActionResult TourUpdateView(string Id)
        {
            var q = _tourService.GetAllTours();

            foreach (var item in q)
            {
                item.OverView    = item.OverView.Replace("'", "'");
                item.OverView    = item.OverView.Replace("\"", """);
                item.OverView    = item.OverView.Replace("’", "'");
                item.TourSpot    = item.TourSpot?.Replace("'", "'");
                item.TourMorning = item.TourMorning?.Replace("'", "'");
                item.TourLunch   = item.TourLunch?.Replace("'", "'");
                item.Notes       = item.Notes?.Replace("'", "'");
                item.Notes       = item.Notes?.Replace("\"", """);
                _tourService.Update(item);
            }

            var tour = _tourService.GetTourByTourCode(Id);

            if (tour != null)
            {
                var tourGalleries = new List <GalleryPoolDTO>();
                var tourGallery   = _tourGalleryService.GetGalleriesByTourId(tour.Id);
                if (tourGallery != null && tourGallery.Any())
                {
                    foreach (var item in tourGallery)
                    {
                        tourGalleries.Add(_galleryPoolService.GetByGalleryId(item.GalleryId));
                    }
                }

                ViewBag.Categories = new TourCategoryViewModel()
                {
                    SelectAllCategories = _tourCategoryService.GetAllByTourIdCategories(tour.Id),
                    AllCategories       = _categoryService.GetAllCategories(),
                    SelectAllKeyword    = _keywordPoolService.GetAll(),
                    GalleryPhotos       = tourGalleries,
                    TourPlanList        = _tourPlanListService.GetAll()
                };
                return(View(tour));
            }
            else
            {
                return(View(null));
            }
        }
Пример #3
0
 public IActionResult Yonetim()
 {
     ViewBag.AlreadyImageList = _siteSettingsService.GetAll();
     ViewBag.SelectAllKeyword = _keywordPoolService.GetAll();
     return(View());
 }
Пример #4
0
 public IActionResult List()
 {
     ViewBag.SelectAllKeyword = _keywordPoolService.GetAll();
     return(View(_staticPagesService.GetAllPages()));
 }