Ejemplo n.º 1
0
 public void Atualizar(CadastroFilmeDTO dto)
 {
     try
     {
         bd.Conectar();
         string comando = "UPDATE Filmes set titulo = '" + dto.Titulo + "',genero = '" + dto.Genero + "' where id_filme =" + dto.Id;
         bd.ExecutarComandoSQL(comando);
     }
     catch (Exception ex)
     {
         throw new Exception("Erro ao Cadastrar Filme" + ex.Message);
     }
     finally
     {
     }
 }
Ejemplo n.º 2
0
 public void Inserir(CadastroFilmeDTO dto)
 {
     try
     {
         bd.Conectar();
         string comando = "INSERT INTO Filmes (titulo, genero) VALUES ('" + dto.Titulo + "' , '" + dto.Genero + "')";
         bd.ExecutarComandoSQL(comando);
     }
     catch (Exception ex)
     {
         throw new Exception("Erro ao Cadastrar Filme" + ex.Message);
     }
     finally
     {
     }
 }