public void deleteFormulario(int id, string tabela) { StringBuilder sql = new StringBuilder(); sql.Append("delete from"); sql.Append(" " + tabela + " "); sql.Append("where id=" + id + " "); ConexaoAdo.ExecutaSql(sql.ToString()); }
public void delete(int id) { try { StringBuilder sql = new StringBuilder(); sql.Append("Delete from TbImagem "); sql.Append("where id=" + id + " "); ConexaoAdo.ExecutaSql(sql.ToString()); } catch (Exception ex) { throw new Exception(ex.Message, ex.InnerException); } }
public void update(int id, string nro_linha, string nro_contrato, bool atendido) { StringBuilder sql = new StringBuilder(); sql.Append("update TbFormulario "); sql.Append("set nro_linha='" + nro_linha + "' "); sql.Append(",nro_contrato='" + nro_contrato + "' "); if (atendido) { sql.Append(",atendido='true' "); } sql.Append("where id=" + id + " "); ConexaoAdo.ExecutaSql(sql.ToString()); }