コード例 #1
0
        public ActionResult Edit(ArtShop.Entities.Model.Artist artist)
        {
            artistProcess.EditarArtista(artist);
            var artistas = artistProcess.ListarTodosLosArtistas();

            return(View("Index", artistas));
        }
コード例 #2
0
        public ActionResult Edit(Artist artist)
        {
            this.CheckAuditPattern(artist);
            var listModel = artistProcess.ValidateModel(artist);

            if (ModelIsValid(listModel))
            {
                return(View(artist));
            }
            try
            {
                artistProcess.EditarArtista(artist);
                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                ViewBag.MessageDanger = ex.Message;
                return(View(artist));
            }
        }