public void Validar()
        {
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();

            UrlEditar = Url.Action("PapelFrm", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idPapel={0}&Acao=Alterar", Id), Key)
            });

            UrlExcluir = Url.Action("PapelFrm", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idPapel={0}&Acao=Excluir", Id), Key)
            });
        }
Пример #2
0
        public void Validar(UrlHelper url)
        {
            Url = url;
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();

            UrlEditar = Url.Action("UsuarioFrm", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idUsuario={0}&Acao=Alterar", Id), Key)
            });
            UrlExcluir = Url.Action("UsuarioFrm", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idUsuario={0}&Acao=Excluir", Id), Key)
            });
        }
        public void Validar()
        {
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();
            string key = "r10X310y";

            UrlEditar = Url.Action("ListaDocumentosFrm", "Documento", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}&Acao=Alterar", ID), key)
            });

            UrlExcluir = Url.Action("ListaDocumentosFrm", "Documento", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}&Acao=Excluir", ID), key)
            });
        }
        public void Validar(UrlHelper Url)
        {
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();
            string key = "r10X310y";

            UrlEditar = Url.Action("Editar", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}", ID), key)
            });

            UrlExcluir = Url.Action("Excluir", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}", ID), key)
            });
        }
        public void Validar()
        {
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();

            UrlEditar = Url.Action("AplicacaoEditarFrm", "Aplicacao", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idAplicacao={0}", Id), Key)
            });

            UrlDetalhar = Url.Action("AplicacaoDetalharFrm", "Aplicacao", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idAplicacao={0}", Id), Key)
            });

            UrlExcluir = Url.Action("Delete", "Aplicacao", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idAplicacao={0}", Id), Key)
            });
        }
Пример #6
0
        public void Validar()
        {
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();
            string key = "r10X310y";

            UrlEditar = Url.Action("CategoriaFrm", "Categoria", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}&Acao=Alterar", ID), key)
            });

            UrlExcluir = Url.Action("CategoriaFrm", "Categoria", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}&Acao=Excluir", ID), key)
            });

            UrlNovaSubCategoria = Url.Action("CategoriaFrm", "Categoria", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}&Acao=NovaSubcategoria", ID), key)
            });
        }
Пример #7
0
        public string CriarChave(UrlHelper Url)
        {
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();
            string chaveCriptografada        = Cripto.Criptografar(string.Format("planoId={0}", Id), Chave);
            var    novo = Url.Action("PreCadastro", "Adesao", new
            {
                chaveUrl = chaveCriptografada
            }, Esquema);

            return(novo);
        }
Пример #8
0
        public void Validar(UrlHelper url)
        {
            Url = url;
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();
            string key = "r10X310y";

            UrlEditar = Url.Action("Editar", "GestaoDocumento", new
            {
                chaveurl = Cripto.Criptografar(string.Format("id={0}", Id), key)
            });
        }
        public static List <MeusDocumentosVM> ModelToViewModel(List <DocumentosDoFornecedor> meusDocumentos, UrlHelper Url)
        {
            EncryptDecryptQueryString Cripto          = new EncryptDecryptQueryString();
            List <MeusDocumentosVM>   meusDocumentoVM = Mapper.Map <List <MeusDocumentosVM> >(meusDocumentos);

            meusDocumentoVM.ForEach(x =>
            {
                //x.DescricaoDocumento = x.DescricaoDocumento.DiminuirEAdicionarTresPontosADescricaoDeDocumento(60);
                x.UrlArquivo = Url.Action("MeusDocumentosArquivo", "MeusDocumentos", new
                {
                    chaveurl = Cripto.Criptografar(string.Format("idDoc={0}&local=Interno", x.ID.ToString()), "r10X310y")
                });
                x.UrlEditar = Url.Action("MeusDocumentosFrm", "MeusDocumentos", new
                {
                    chaveurl = Cripto.Criptografar(string.Format("id={0}&Acao=Alterar", x.ID.ToString()), "r10X310y")
                });
                x.UrlExcluir = Url.Action("MeusDocumentosFrm", "MeusDocumentos", new
                {
                    chaveurl = Cripto.Criptografar(string.Format("id={0}&Acao=Excluir", x.ID.ToString()), "r10X310y")
                });
            });
            return(meusDocumentoVM);
        }
Пример #10
0
        public static EnviadosVM ModelToViewModel(Compartilhamentos comp, UrlHelper url)
        {
            EncryptDecryptQueryString Cripto = new EncryptDecryptQueryString();
            EnviadosVM enviado = new EnviadosVM();

            enviado.MeusCompartilhamentosId = comp.ID;
            enviado.EnviadoEm       = Convert.ToDateTime(comp.ENVIADO_EM).ToString();
            enviado.Assunto         = comp.ASSUNTO;
            enviado.QtdDocs         = comp.DocumentosCompartilhados.GroupBy(d => d.PJPF_DOCUMENTO_ID).Count();
            enviado.Disponibilidade = !comp.SEM_PRAZO
                ? Convert.ToDateTime(comp.VALIDADE).ToShortDateString()
                : "Sem Prazo";

            string para = "";

            foreach (dynamic docs in comp.WFD_DESTINATARIO.ToList())
            {
                if (!docs.EMAIL_AVULSO)
                {
                    para += docs.NOME;
                }
                else
                {
                    para += docs.EMAIL;
                }

                para += ", ";
            }
            if (para.Length > 25)
            {
                para = para.Substring(0, 25) + "...";
            }
            else if (para.Length > 2)
            {
                para = para.Substring(0, para.Length - 2);
            }

            enviado.Para   = para;
            enviado.UrlVer = url.Action("EnviadosFrm", "MeusDocumentos", new
            {
                chaveurl = Cripto.Criptografar(string.Format("idComp={0}", comp.ID.ToString()), "r10X310y")
            });
            return(enviado);
        }