public ActionResult editar(int?id)
        {
            var ViewModel        = new AtendimentoAreaForm();
            var OAtendimentoArea = this.OAtendimentoAreaBL.carregar(UtilNumber.toInt32(id)) ?? new AtendimentoArea();

            ViewModel.AtendimentoArea = OAtendimentoArea;

            return(View(ViewModel));
        }
        public ActionResult editar(AtendimentoAreaForm ViewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(ViewModel));
            }

            bool flagSucesso = this.OAtendimentoAreaBL.salvar(ViewModel.AtendimentoArea);

            if (flagSucesso)
            {
                this.Flash(UtilMessage.TYPE_MESSAGE_SUCCESS, UtilMessage.success("Sucesso!", "Os dados foram salvos com sucesso."));

                return(RedirectToAction("editar", new { ViewModel.AtendimentoArea.id }));
            }

            this.Flash(UtilMessage.TYPE_MESSAGE_ERROR, UtilMessage.error("Erro!", "Houve um problema ao salvar o registro. Tente novamente."));

            return(View(ViewModel));
        }