Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public ActionResult Edit(GalleryEdit gallery)
 {
     if (!ModelState.IsValid)
         return View(gallery);
     IGalleryDAC dac = new GalleryDAC();
     dac.Update(gallery.GalleryID, gallery.Name, gallery.Description, gallery.SortOrder, gallery.MainImage);
     return RedirectToAction("Index");
 }