Ejemplo n.º 1
0
        public static Gallery Get(int id = 0)
        {
            Gallery gallery = new Gallery();
            try {
                CurtDevDataContext db = new CurtDevDataContext();
                gallery = (from IG in db.FileGalleries
                           where IG.fileGalleryID.Equals(id)
                           orderby IG.name
                           select new Gallery {
                               fileGalleryID = IG.fileGalleryID,
                               name = IG.name,
                               description = IG.description,
                               parentID = IG.parentID,
                               files = FileModel.GetImagesByGallery(IG.fileGalleryID),
                               subgalleries = GetSubGalleries(IG.fileGalleryID)
                           }).First<Gallery>();

            } catch (Exception e) { }
            return gallery;
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            List<Gallery> galleries = FileGalleryModel.GetAll();
            List<FullFile> files = FileModel.GetImagesByGallery(0);
            Gallery gallery = new Gallery {
                subgalleries = galleries,
                files = files,
                name = "Root",
                fileGalleryID = 0,
                parentID = -1,
                description = ""
            };

            List<FileGallery> breadcrumbs = new List<FileGallery>();
            ViewBag.gallery = gallery;
            ViewBag.breadcrumbs = breadcrumbs;
            return View("gallery");
        }
Ejemplo n.º 3
0
        public ActionResult CKIndex()
        {
            ViewBag.CKEditorFuncNum = Request.QueryString["CKEditorFuncNum"];
            ViewBag.CKEditor = Request.QueryString["CKEditor"];
            ViewBag.langCode = Request.QueryString["langCode"];

            List<Gallery> galleries = FileGalleryModel.GetAll();
            List<FullFile> files = FileModel.GetImagesByGallery(0);
            Gallery gallery = new Gallery {
                subgalleries = galleries,
                files = files,
                name = "Root",
                fileGalleryID = 0,
                parentID = -1,
                description = ""
            };

            List<FileGallery> breadcrumbs = new List<FileGallery>();
            ViewBag.gallery = gallery;
            ViewBag.breadcrumbs = breadcrumbs;
            return View("ckgallery");
        }