//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); }
// 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); }
// Metodo Excluir public void ExcluirEditora(tblEditoraDTO ObjEditora) { string sql = string.Format($@"DELETE FROM TBL_Editora where idEditora = {ObjEditora.IdEditora};"); daoBanco.ExecutarComando(sql); }