Esempio n. 1
0
 public ActionResult Edit(int id)
 {
     IImageDAC dac = new ImageDAC();
     var image = dac.GetImage(id);
     var model = new ImageEdit { Filename = image.Filename, GalleryID = image.GalleryID, Title = image.Title, ImageID = image.ImageID };
     return View(model);
 }
Esempio n. 2
0
 public ActionResult Edit(ImageEdit image)
 {
     if (!ModelState.IsValid)
         return View(image);
     IImageDAC dac = new ImageDAC();
     dac.Update(image.ImageID, image.Title, 1);
     return RedirectToAction("Index", new { galleryID = image.GalleryID });
 }