public ActionResult Create(FormCollection frm)
        {
            var Retorno = new Retorno();
            try
            {

                int idperfil = int.Parse(frm["acao"].ToString()) == 1 ? 0 : int.Parse(frm["SelPerfil"].ToString());
                var p = new Perfil()
                {
                     TipoAcao = int.Parse(frm["acao"].ToString()),
                     Descricao = idperfil == 0 ? frm["SelPerfil"].ToString() : frm["nomeperfil"].ToString(),
                     idServico = int.Parse(frm["SelServico"].ToString()),
                     idPerfil = idperfil>0?idperfil:0,
                     idModulo = frm["modulos"].ToString(),
                     qtdeModulo = int.Parse(frm["qtdeModulos"].ToString()),
                };

                var perfilRet = new PerfilRepository();
                Retorno = perfilRet.Incluir(p);
                if (Retorno.CodigoRetorno < 0)
                {
                    throw new Exception(Retorno.Mensagem);
                }
                TempData["Msg"] = Retorno.Mensagem;
                return RedirectToAction("Index");

            }
            catch(Exception ex)
            {
                TempData["Error"] = ex.Message;
                return View();
            }
        }