Esempio n. 1
0
        public ActionResult EditGalleryDetail(GalleryDetail galleryDetail, HttpPostedFileBase file)
        {
            if (file != null)
            {
                var gd = socialService.GetGalleryDetail(galleryDetail.GalleryID, galleryDetail.PictureFile);
                socialService.DeleteGalleryDetail(gd);
                socialService.InsertGalleryDetail(galleryDetail, file);
                socialService.Save();
            }
            else
            {
                //socialService.UpdateGalleryDetail(galleryDetail, file);
                socialService.UpdateGalleryDetail(galleryDetail);
                socialService.Save();
            }



            return(RedirectToAction("GalleryDetails", new { id = galleryDetail.GalleryID }));
        }