Exemple #1
0
        public static void Exclui_Registro_Genérico(string Tabela, string Where)
        {
            string TextoSQL;

            TextoSQL = "DELETE FROM " + Tabela + " WHERE " + Where;

            AFDAL.ExecuteNonQuery(TextoSQL);
        }
Exemple #2
0
        public static void Insere_Registro_Genérico(string Tabela, string Parâmetros, string Valores)
        {
            string TextoSQL;

            TextoSQL = "INSERT INTO " + Tabela + "(" + Parâmetros + ") VALUES(" + Valores + ")";

            AFDAL.ExecuteNonQuery(TextoSQL);
        }
Exemple #3
0
        public static void Atualiza_Registo_Genérico(string Tabela, string Valores, string Where)
        {
            string TextoSQL;

            TextoSQL = "UPDATE " + Tabela + " SET " + Valores + " WHERE " + Where;

            AFDAL.ExecuteNonQuery(TextoSQL);
        }
Exemple #4
0
        public static void Busca_Registro_Genérico(long Código, string Tabela)
        {
            string TextoSQL;

            TextoSQL = "EXECUTE Principal_RT_Genérico " +
                       Código +
                       ",'" + Tabela + "'";
            AFDAL.ExecuteQuery(TextoSQL);
        }
Exemple #5
0
        public static void Seleciona_Registros_Genérico(string Parâmetros, string Tabela)
        {
            string TextoSQL;

            TextoSQL = "EXECUTE Principal_LL_Genérico " +
                       "'" + Parâmetros + "'" +
                       ",'" + Tabela + "'";

            AFDAL.ExecuteQuery(TextoSQL);
        }
Exemple #6
0
        public static void LL_Genérico(string Parâmetros, string Tabela) //Método para carregar o DataGrid
        {
            string TextoSQL;

            TextoSQL = "EXECUTE Principal_LL_Genérico " +
                       "'" + Parâmetros + "'" +
                       ",'" + Tabela + "'";

            //Essa variável armazenerá temporiamente o resultado da query
            AFDAL.ExecuteQuery_Reader(TextoSQL);
        }
        public static string Acha_Campo_Identity(string Tabela)
        {
            // Pesquisa no banco de dados, se há algum campo Identity desta tabela
            AFDAL.ExecuteQuery("EXECUTE Function_RT_Indentity '" + Tabela + "'");

            if (AFDAL.DtSementinha.Rows.Count > 0)
            {
                return(AFDAL.DtSementinha.Rows[0][0].ToString());
            }
            else
            {
                return("");
            }
        }
Exemple #8
0
 public static void Lê_Registro_Genérico(object Classe_Genérica)
 {
     AFDAL.LêUmRegistro(Classe_Genérica);
 }