Beispiel #1
0
        //[ValidateAntiForgeryToken]
        public ActionResult Edit(SolicitacaoViewModel model)
        {
            try
            {
                var solicitacao = model.MapearParaObjetoDominio();
                solicitacao.Atualizacao = DateTime.Now;
                solicitacao.Atualizador = User.Identity.Name;

                UploadFilesHandler(model, model.IdPessoa);

                solicitacao.CertAntCrimPCFilePath = model.CertAntCrimPCFilePath;
                solicitacao.CertAntCrimPFFilePath = model.CertAntCrimPFFilePath;
                solicitacao.CertTJBAFilePath      = model.CertTJBAFilePath;
                solicitacao.CertTRFFilePath       = model.CertTRFFilePath;

                SolicitacaoService.AtualizarAnexos(solicitacao);

                return(Json(new
                {
                    success = true,
                    title = "Sucesso",
                    message = "Anexos cadastrados com sucesso !"
                }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(new
                {
                    success = false,
                    title = "Erro",
                    message = ex.Message
                }, JsonRequestBehavior.AllowGet));
            }
        }