public ActionResult Edit(int id) { IGalleryDAC dac = new GalleryDAC(); var gallery = dac.GetGallery(id); var model = new GalleryEdit { Description = gallery.Description, GalleryID = gallery.GalleryID, Name = gallery.Name, SortOrder = gallery.SortOrder, MainImage = gallery.DisplayImage }; return View(model); }
public ActionResult GalleryImages(int id) { IGalleryDAC dac = new GalleryDAC(); Gallery gallery = dac.GetGallery(id); ViewBag.GalleryTitle = gallery.Name; IImageDAC imageDAC = new ImageDAC(); var images = imageDAC.Get(id); return View(images); }
// GET: Admin666/Image public ActionResult Index(int galleryID) { IImageDAC dac = new ImageDAC(); IGalleryDAC galleryDAC = new GalleryDAC(); var gallery = galleryDAC.GetGallery(galleryID); ViewBag.Gallery = gallery.Name; ViewBag.GalleryID = gallery.GalleryID; ViewBag.DefaultImage = gallery.DisplayImage; var images = dac.Get(galleryID); return View(images); }