示例#1
0
        public ActionResult EditBasicDetails(ArtistEdit model, IEnumerable<GroupForArtistContract> groups)
        {
            var coverPicUpload = Request.Files["pictureUpload"];
            PictureDataContract pictureData = ParseMainPicture(coverPicUpload, "Picture");

            ParseAdditionalPictures(coverPicUpload, model.Pictures);

            if (!ModelState.IsValid) {
                SaveErrorsToTempData();
                return RedirectToAction("Edit", new { id = model.Id });
            }

            Service.UpdateBasicProperties(model.ToContract(), pictureData, LoginManager);

            return RedirectToAction("Details", new { id = model.Id });
        }
示例#2
0
        public ActionResult Edit(int id)
        {
            RestoreErrorsFromTempData();

            CheckConcurrentEdit(EntryType.Artist, id);

            var model = new ArtistEdit(Service.GetArtistForEdit(id));
            return View(model);
        }