Ejemplo n.º 1
0
        private int AtualizarTextos(Dictionary <string, string> lista)
        {
            int result = 0;

            try
            {
                var texto   = lista["CONCORDAR"];
                var id      = Convert.ToInt32(lista["CONCORDARID"]);
                var listObj = new List <MensagemSistema>();

                listObj.Add(new MensagemSistema
                {
                    Alias     = "CONCORDO",
                    Categoria = "WEB",
                    Texto     = texto,
                    ID        = id,
                    Titulo    = "Termos e Condições"
                });

                result = TextosServico.Atualizar(listObj);

                if (result > 0)
                {
                    ViewBag.MsgRetorno = MensagemUtil.OperacaoRealizada();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            GeraViewBag();
            return(result);
        }