def update(Emprunt): try: cur.execute("""UPDATE EnsEmprunt SET date_rendu=? WHERE Emprunt_id=?""", (Emprunt.get_date_rendu(),Emprunt.get_emprunt_id())) conn.commit() print("Emprunt modifie avec succes !") except: print ("La modification de l'exemplaire à échouée") raise
def delete_emprunt(Emprunt): cur.execute("""DELETE FROM EnsEmprunt WHERE emprunt_id = ?""",(Emprunt.get_emprunt_id(),)) conn.commit()