}
@Override
public int ajouterVente(Vente v) {
int id = -1;
Connection connex;
connex = getConnection();
String insert = "INSERT INTO `vente`(`idFilm`, `date`, `prix`, `idClient`, `type`) VALUES (?,?,?,?,?)";
try {
PreparedStatement preStat = (PreparedStatement) connex.prepareStatement(insert);
preStat.setString(1, v.getIdFilm());
preStat.setLong(2, v.getDate());
preStat.setInt(3, v.getPrix());
preStat.setInt(4, v.getIdClient());
preStat.setString(5, v.getType());