public static int RetornarQtDeCampoPersonalizadoExpecificoDB(string nome)
        {
            string queryPersonalizado = SelectsQueries.RetornaQuantidadeDeCampoPersonalizadoExpecifico.Replace("$personalizado", nome);
            string campo = DataBaseHelpers.RetornaDadosQuery(queryPersonalizado)[0];

            return(Convert.ToInt32(campo));
        }
        public static void CriarPerfilDB(string plat, string osDB, string build)
        {
            string query = InsertsQueries.MassaDeDadoCriarPerfil.Replace("$plataforma", plat).
                           Replace("$so", osDB).Replace("$build", build);

            DataBaseHelpers.ExecuteQuery(query);
        }
        public static List <string> ReturnProjectIDRandom()
        {
            string executQuerie = ProjectsQueries.SearchIdProjectsRandom;

            //return Convert.ToInt32(DataBaseHelpers.RetornaDadosQuery(executQuerie));
            return(DataBaseHelpers.RetornaDadosQuery(executQuerie));
        }
        public static void CriarProjetoBD(string nome, string descricao)
        {
            string inserirProjeto = CriarProjetoQueries.MassaDeDadosCriarProjeto.Replace("$name", nome).
                                    Replace("$descricao", descricao);

            DataBaseHelpers.ExecuteQuery(inserirProjeto);
        }
        public static int ReturnMaxProjectsBD()
        {
            string executQuerie = ProjectsQueries.CountProjectBD;

            ExtentReportHelpers.AddTestInfo(2, "Total search of project in table");
            return(Convert.ToInt32(DataBaseHelpers.RetornaDadosQuery(executQuerie)[0]));
        }
Beispiel #6
0
        public static void CriarProjetoViaQuerieBD(string nameProjeto, string descricaoProjeto)
        {
            string insertQuerie = GerenciarQueries.AdicionaProjetoPadrao
                                  .Replace("$nomeProjeto", nameProjeto)
                                  .Replace("$descricaoProjeto", descricaoProjeto);

            DataBaseHelpers.ExecuteQuery(insertQuerie);
        }
        public static void CriarTarefaDB()
        {
            string dadosCriarTarefas = CriarTarefasQueries.MassaDeDadosCriarTarefas +
                                       CriarTarefasQueries.MassaDeDadosAdicionarMarcadores +
                                       CriarTarefasQueries.MassaDeDadosPreencherCamposTarefa +
                                       CriarTarefasQueries.MassaDeDadosPreencherOsCampos;

            DataBaseHelpers.ExecuteQuery(dadosCriarTarefas);
        }
Beispiel #8
0
        public List <string> ConsultarCampoDB(string customFieldName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/CustomField/consultaCampo.sql", Encoding.UTF8);

            query = query.Replace("$customFieldName", customFieldName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do campo personalizado = " + customFieldName);

            return(DataBaseHelpers.ObtemDados(query));
        }
Beispiel #9
0
        public void DeletarCampoDB(string customFieldName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/CustomField/deletaCampo.sql", Encoding.UTF8);

            query = query.Replace("$customFieldName", customFieldName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do campo personalizado = " + customFieldName);

            DataBaseHelpers.ExecuteQuery(query);
        }
        public TagDomain ConsultarTagDB(string tagName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Tags/consultaTag.sql", Encoding.UTF8);

            query = query.Replace("$tagName", tagName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da tag = " + tagName);

            return(DataBaseHelpers.ObtemRegistroUnico <TagDomain>(query));
        }
        public void DeletarTagDB(string tagName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Tags/deletaTag.sql", Encoding.UTF8);

            query = query.Replace("$tagName", tagName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da tag = " + tagName);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #12
0
        public ProjectDomain ConsultarCategoriaDB(string categoryName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaCategoria.sql", Encoding.UTF8);

            query = query.Replace("$categoryName", categoryName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da categoria = " + categoryName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Beispiel #13
0
        public void DeletarEmailUsuarioDB(string userEmail)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/deletaEmailUsuario.sql", Encoding.UTF8);

            query = query.Replace("$userEmail", userEmail);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: E-mail do usuário = " + userEmail);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #14
0
        public void DeletarVersaoProjetoDB(string versionName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaVersaoProjeto.sql", Encoding.UTF8);

            query = query.Replace("$versionName", versionName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da versão criada = " + versionName);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #15
0
        public void DeletarProjetoDB(int projectId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaProjeto.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString());

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: ID do projeto = " + projectId);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #16
0
        public void DeletarCategoriaDB(string categoryName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaCategoria.sql", Encoding.UTF8);

            query = query.Replace("$categoryName", categoryName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da categoria = " + categoryName);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #17
0
        public UserDomain ConsultarUsuarioDB(string username)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/consultaUsuario.sql", Encoding.UTF8);

            query = query.Replace("$username", username);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Username = " + username);

            return(DataBaseHelpers.ObtemRegistroUnico <UserDomain>(query));
        }
Beispiel #18
0
        public ProjectDomain InserirProjetoDB(string projectName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/inseriProjeto.sql", Encoding.UTF8);

            query = query.Replace("$projectName", projectName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do projeto = " + projectName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Beispiel #19
0
        public ProjectDomain ConsultarVersaoProjetoDB(string versionName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaVersaoProjeto.sql", Encoding.UTF8);

            query = query.Replace("$versionName", versionName);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome da versão criada = " + versionName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Beispiel #20
0
        public List <string> ConsultarProjetoAtribuidoAoUsuarioDB(int projectId, string userId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaProjetoAtribuidoAoUsuario.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString())
                    .Replace("$userId", userId);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do projeto = " + projectId + "Nome do usuário = " + userId);

            return(DataBaseHelpers.ObtemDados(query));
        }
Beispiel #21
0
        public void DeletarProjetoAtribuidoAoUsuarioDB(int projectId, string userId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaProjetoAtribuidoAoUsuario.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString())
                    .Replace("$userId", userId);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Nome do projeto = " + projectId + "Nome do usuário = " + userId);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #22
0
        public DataTable RetrieveUser(string uName)
        {
            SqlCmdBuilder cmd = DataBaseHelpers.CreateADPPipelineCommand();

            cmd.Query = @"SELECT *
                          FROM ADP_USER
                          WHERE UPPER(USERNAME)=@uName";
            cmd.AddParameter("uName", SqlCmdParameterDirection.Input, uName.ToUpper());

            return(cmd.GetTable());
        }
Beispiel #23
0
        public DataTable RetrieveUser(string uName, string pass)
        {
            SqlCmdBuilder cmd = DataBaseHelpers.CreateADPPipelineCommand();

            cmd.Query = @"SELECT *
                          FROM ADP_USER
                          WHERE UPPER(USERNAME)=@uName AND PASSWORD=@pass";
            cmd.AddParameter("uName", SqlCmdParameterDirection.Input, uName.ToUpper());
            cmd.AddParameter("pass", SqlCmdParameterDirection.Input, ADP.Encryption.CryptoTools.ActionEncrypt(pass.ToUpper()));
            return(cmd.GetTable());
        }
Beispiel #24
0
        public DataTable RetrieveRoleByName(string name)
        {
            SqlCmdBuilder cmd = DataBaseHelpers.CreateCommand();

            cmd.Query = @"SELECT *
                          FROM ADP_ROLE
                          WHERE NAMA_ROLE=@name";
            cmd.AddParameter("name", SqlCmdParameterDirection.Input, name);

            return(cmd.GetTable());
        }
Beispiel #25
0
        public DataTable RetrieveRoleById(string idRole)
        {
            SqlCmdBuilder cmd = DataBaseHelpers.CreateADPPipelineCommand();

            cmd.Query = @"SELECT *
                          FROM ADP_ROLE
                          WHERE ID_ROLE=@idRole";
            cmd.AddParameter("idRole", SqlCmdParameterDirection.Input, idRole);

            return(cmd.GetTable());
        }
Beispiel #26
0
        public void DeletarSubProjetoDB(int childId, int parentId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/deletaSubProjeto.sql", Encoding.UTF8);

            query = query.Replace("$childId", childId.ToString())
                    .Replace("$parentId", parentId.ToString());

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Child ID = " + childId + " Parent ID = " + parentId);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #27
0
        public ProjectDomain ConsultarSubProjetoDB(int childId, int parentId)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/consultaSubProjeto.sql", Encoding.UTF8);

            query = query.Replace("$childId", childId.ToString())
                    .Replace("$parentId", parentId.ToString());

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Child ID = " + childId + " Parent ID = " + parentId);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Beispiel #28
0
        public void DeletarPerfilUsuarioDB(string platform, string os, string osVersion)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Users/deletaPerfilUsuario.sql", Encoding.UTF8);

            query = query.Replace("$platform", platform)
                    .Replace("$os", os)
                    .Replace("$version", osVersion);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: Plataforma = " + platform + "SO = " + os + "Versão SO = " + osVersion);

            DataBaseHelpers.ExecuteQuery(query);
        }
Beispiel #29
0
        public ProjectDomain InserirVersaoProjetoDB(int projectId, string versionName)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/inseriVersaoProjeto.sql", Encoding.UTF8);

            query = query.Replace("$projectId", projectId.ToString())
                    .Replace("$versionName", versionName);


            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: ID do projeto = " + projectId + " | Nome da versão criada = " + versionName);

            return(DataBaseHelpers.ObtemRegistroUnico <ProjectDomain>(query));
        }
Beispiel #30
0
        public void InserirSubProjetoDB(int childId, int parentId, string inheritParent)
        {
            string query = File.ReadAllText(GeneralHelpers.GetProjectPath() + "Queries/Projects/inseriSubProjeto.sql", Encoding.UTF8);

            query = query.Replace("$childId", childId.ToString())
                    .Replace("$parentId", parentId.ToString())
                    .Replace("$inheritParent", inheritParent);

            ExtentReportHelpers.AddTestInfoDB(2, "PARAMETERS: ID do projeto pai = " + parentId + " ID do projeto filho = " + childId);

            DataBaseHelpers.ExecuteQuery(query);
        }