MAj
This commit is contained in:
parent
1b34dd5c6a
commit
140b1bfe01
@ -1,6 +1,6 @@
|
||||
from src.c.Teleporteur import Teleporteur
|
||||
from src.m.Placement import Placement
|
||||
from src.m.Client import Client
|
||||
from src.m.Place import Placement
|
||||
from src.m.TypeAbonnement import TypeAbonnement
|
||||
from src.v.Camera import Camera
|
||||
from PyQt4 import QtGui
|
||||
@ -65,7 +65,6 @@ class Borne:
|
||||
self.__ui.label_aff.setText("Bienvenue !")
|
||||
|
||||
|
||||
|
||||
def identification(self):
|
||||
"""
|
||||
Gestion de l'identification a partir d'un abo a partir de son id (lineedit)
|
||||
|
@ -1,7 +1,7 @@
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from src.m.Parking import Parking
|
||||
from src.m.Place import ListeTypePlace
|
||||
from src.m.ListeTypePlace import ListeTypePlace
|
||||
from src.v.MyQWidget import MyQWidget
|
||||
from src.v.Ui_CreaParking import Ui_CreaParking
|
||||
|
||||
@ -74,7 +74,7 @@ class CreaParking:
|
||||
Gestion validation de formulaire de creation de parking.
|
||||
:return:
|
||||
"""
|
||||
try:
|
||||
#try:
|
||||
l = ListeTypePlace()
|
||||
for i in range(0, self._ui.tableWidget.rowCount()):
|
||||
l.add(int(self._ui.tableWidget.item(i, 0).text()), int(self._ui.tableWidget.item(i, 1).text()),
|
||||
@ -85,9 +85,9 @@ class CreaParking:
|
||||
self._main.activity("Ajout Parking : detail", self._main.lvl.INFO)
|
||||
self._w.hide()
|
||||
self._main.showWindow()
|
||||
except Exception as e:
|
||||
self._main.activity("Erreur lors de la creations du Parking \n" + str(e), self._main.lvl.FAIL)
|
||||
self.error()
|
||||
#except Exception as e:
|
||||
# self._main.activity("Erreur lors de la creations du Parking \n" + str(e), self._main.lvl.FAIL)
|
||||
# self.error()
|
||||
|
||||
def showWindow(self):
|
||||
"""
|
||||
|
@ -1,4 +1,4 @@
|
||||
from src.m.Place import Placement
|
||||
from src.m.Placement import Placement
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from src.m.service import Service
|
||||
from src.m.Service import Service
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
class Entretien(Service):
|
||||
def __init__(self, jourService, moisService, anneeService, jourDemande, moisDemande, anneeDemande, rapport, categorie, idClient):
|
||||
|
@ -1,3 +1,5 @@
|
||||
from src.m.TypePlace import TypePlace
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
class ListeTypePlace:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from src.m.service import Service
|
||||
from src.m.Service import Service
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
import calendar
|
||||
class Livraison(Service):
|
||||
@ -14,6 +14,7 @@ class Livraison(Service):
|
||||
idVoiturier = int(''.join(map(str,indiceVoiturier )))
|
||||
connexion.cur.execute("UPDATE service SET idVoiturier= ? WHERE idService = ?", (idVoiturier, self.idService))
|
||||
connexion.seDeconnecter()
|
||||
|
||||
def effectuerLivraison(self):
|
||||
self.etat = 1
|
||||
connexion = connexionBDD()
|
||||
|
@ -1,4 +1,4 @@
|
||||
from src.m.service import Service
|
||||
from src.m.Service import Service
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
class Maintenance(Service):
|
||||
def __init__(self, jourService, moisService, anneeService, jourDemande, moisDemande, anneeDemande, rapport, categorie, idClient):
|
||||
@ -6,6 +6,7 @@ class Maintenance(Service):
|
||||
self.categorie = 1
|
||||
self.etat = 0
|
||||
self.idService=self.enregistrerService(self, idClient, self.categorie, self.etat)
|
||||
|
||||
def effectuerMaintenance(self):
|
||||
self.etat = 1
|
||||
connexion = connexionBDD()
|
@ -50,7 +50,7 @@ class Parking:
|
||||
"""
|
||||
place = None
|
||||
for p in self.__Places:
|
||||
if p.estLibre and p.dimValide(voiture.hauteur, voiture.longueur) :
|
||||
if p.estLibre and p.dimValide(voiture.getHauteur, voiture.getLongueur) :
|
||||
pass
|
||||
place = p
|
||||
break
|
||||
|
@ -16,6 +16,7 @@ class Service:
|
||||
except:
|
||||
print ("la date de service n\'est pas correcte")
|
||||
self.rapport = rapport
|
||||
|
||||
def enregistrerService(self, idClient, categorie, etat):
|
||||
try:
|
||||
connection = connexionBDD()
|
@ -1,23 +1,28 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
class Voiture:
|
||||
|
||||
class Voiture():
|
||||
def __init__(self, longueur, hauteur, imma):
|
||||
self.__longueur = longueur
|
||||
self.__hauteur = hauteur
|
||||
self.__imma = imma
|
||||
self.__estDansParking = False
|
||||
self._hauteur = hauteur
|
||||
self._longueur = longueur
|
||||
self._immatriculation = imma
|
||||
self._estDansParking = False
|
||||
|
||||
@property
|
||||
def longueur(self):
|
||||
return self.__longueur
|
||||
def getHauteur(self):
|
||||
return self._hauteur
|
||||
|
||||
@property
|
||||
def hauteur(self):
|
||||
return self.__hauteur
|
||||
|
||||
def __str__(self):
|
||||
return "Voiture : hauteur " + str(self.__longueur) + ", largeur" + str(self.hauteur) + ", Imma : " + self.__imma +", est dans parking :" + str(self.__estDansParking)
|
||||
|
||||
def getLongueur(self):
|
||||
return self._longueur
|
||||
|
||||
@property
|
||||
def getImmatriculation(self):
|
||||
return self._immatriculation
|
||||
|
||||
@property
|
||||
def estDansParking(self):
|
||||
return self._estDansParking == True
|
||||
|
||||
#def addPlacement(self, placement):
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import sqlite3
|
||||
class connexionBDD:
|
||||
def __init__(self):
|
||||
self.chemin = "/Users/nadiel/SQLite/BDDprojetPython.sq3"
|
||||
self.chemin = "BDDprojetPython.sq3"
|
||||
self.conn =sqlite3.connect(self.chemin)
|
||||
self.cur =self.conn.cursor()
|
||||
def seDeconnecter(self):
|
||||
|
@ -1,35 +0,0 @@
|
||||
import datetime
|
||||
class Placement:
|
||||
|
||||
def __init__(self):
|
||||
self._dateDebut
|
||||
self._dateFin
|
||||
self._estEnCours
|
||||
|
||||
@property
|
||||
def getDateDebut(self):
|
||||
return self._dateDebut
|
||||
|
||||
#@self._dateDebut.setter
|
||||
def setDateDebut(self, jour, mois, annee):
|
||||
self._dateDebut= datetime.date(jour, mois,annee)
|
||||
|
||||
#@self._DateFin.setter
|
||||
def setDateFin(self, jour, mois, annee):
|
||||
self._dateFin= datetime.date(jour, mois,annee)
|
||||
|
||||
#@estEnCours.setter
|
||||
def setEstEnCours(self, value):
|
||||
self._estEnCours = value
|
||||
|
||||
@property
|
||||
def estEnCours(self):
|
||||
return self._estEnCours
|
||||
|
||||
|
||||
def partirPlace(self, value):
|
||||
self.setEstEnCours(self, False)
|
||||
|
||||
@estEnCours.deleter
|
||||
def partirPlace(self):
|
||||
del self
|
@ -1,40 +0,0 @@
|
||||
|
||||
|
||||
class Voiture():
|
||||
def __init__(self):
|
||||
self._hauteur
|
||||
self._longueur
|
||||
self._immatriculation
|
||||
self._estDansParking
|
||||
|
||||
# @hauteur.setter
|
||||
def setHauteur(self, value):
|
||||
self._hauteur=value
|
||||
|
||||
@property
|
||||
def getHauteur(self):
|
||||
return self._hauteur
|
||||
|
||||
# @longueur.setter
|
||||
def setLongueur(self, value):
|
||||
self._longueur=value
|
||||
|
||||
# @immatriculation.setter
|
||||
def setImmatriculation(self, chaine):
|
||||
self._immatriculation = chaine
|
||||
|
||||
@property
|
||||
def getImmatriculation(self):
|
||||
return self._immatriculation
|
||||
|
||||
#@estDansParking.setter
|
||||
def setEstDansParking(self, value):
|
||||
self._estDansParking =value
|
||||
|
||||
@property
|
||||
def estDansParking(self):
|
||||
return self._estDansParking == True
|
||||
|
||||
#def addPlacement(self, placement):
|
||||
|
||||
|
Reference in New Issue
Block a user