예제 #1
0
    public Boolean Delete(String query)
    {
        SqlConnection Conexao  = ConexaoBancoSQL.getConexao();
        SqlCommand    Commando = new SqlCommand(query, Conexao);

        try
        {
            Commando.ExecuteNonQuery();
            return(true);
        }
        catch
        {
            return(false);
        }
    }
예제 #2
0
    private SqlCommand TemplateMethod(String query)
    {
        SqlConnection Conexao  = ConexaoBancoSQL.getConexao();
        SqlCommand    Commando = new SqlCommand(query, Conexao);

        try
        {
            Commando.ExecuteNonQuery();
            return(Commando);
        }
        catch
        {
            return(Commando);
        }
    }