예제 #1
0
        //Metodo Inserir
        public void InserirEditora(tblEditoraDTO ObjEditora)
        {
            string sql = string.Format($@"INSERT INTO TBL_Editora VALUES (NULL, '{ObjEditora.Nome}',
                                                                                '{ObjEditora.Endereco}',
                                                                                '{ObjEditora.Uf}');");

            daoBanco.ExecutarComando(sql);
        }
예제 #2
0
        // Metodo Alterar
        public void AlterarEditora(tblEditoraDTO DtoEditora)
        {
            string sql = string.Format($@"UPDATE TBL_Editora set nome = '{DtoEditora.Nome}',
                                                                endereco = '{DtoEditora.Endereco}',
                                                                uf = '{DtoEditora.Uf}'
                                                        where idEditora = '{DtoEditora.IdEditora}';");

            daoBanco.ExecutarComando(sql);
        }
예제 #3
0
        // Metodo Excluir
        public void ExcluirEditora(tblEditoraDTO ObjEditora)
        {
            string sql = string.Format($@"DELETE FROM TBL_Editora where idEditora = {ObjEditora.IdEditora};");

            daoBanco.ExecutarComando(sql);
        }