예제 #1
0
        public GalleryDetailPageViewModel Get_GalleryDetail_Page(int id)
        {
            GalleryDetailPageViewModel vm_page = new GalleryDetailPageViewModel();

            GalleryDetailViewModel vm_gallery = new GalleryDetailViewModel();
            ArtGalleryViewModel    gallery    = DataLayer.get_ArtGallery_byID(id);

            vm_gallery.fa_title       = gallery.fa_title;
            vm_gallery.openning_hours = gallery.fromHour + " - " + gallery.toHour;
            vm_gallery.visit_from     = gallery.fromDate;
            vm_gallery.visit_to       = gallery.toDate;
            vm_gallery.description    = gallery.description;
            vm_gallery.poster_path    = "/Upload/gallery_" + id + "/poster.jpg";
            vm_gallery.GalleryId      = id;

            List <string> str_images = DataLayer.get_gallery_images(id);

            for (int i = 0; i < str_images.Count; i++)
            {
                str_images[i] = ("gallery_" + id + "/" + str_images[i]);
            }

            vm_page.accordion_detail = vm_gallery;
            vm_page.photos           = str_images;

            return(vm_page);
        }
예제 #2
0
        public ActionResult GalleryDetail(int id)
        {
            GalleryDetailPageViewModel vm = NegahenoService.Get_GalleryDetail_Page(id);

            return(View(vm));
        }