def Modifier(self, event):
     if len(self.Selection()) == 0:
         dlg = wx.MessageDialog(
             self,
             _(u"Vous n'avez sélectionné aucun transport à modifier dans la liste !"
               ), _(u"Erreur de saisie"), wx.OK | wx.ICON_EXCLAMATION)
         dlg.ShowModal()
         dlg.Destroy()
         return
     track = self.Selection()[0]
     dictDonnees = track.dictDonnees
     IDtransport = dictDonnees["IDtransport"]
     from Dlg import DLG_Saisie_transport
     dlg = DLG_Saisie_transport.Dialog(self,
                                       IDtransport=IDtransport,
                                       IDindividu=self.IDindividu,
                                       modeVirtuel=True,
                                       dictDonnees=dictDonnees,
                                       verrouilleBoutons=True)
     if dlg.ShowModal() == wx.ID_OK:
         dictDonnees = dlg.GetDictDonnees()
         dictDonnees["etat"] = "MODIF"
         dictDonnees["mode"] = "TRANSP"
         self.dictTransports[IDtransport] = dictDonnees
         self.MAJ(IDtransport)
     dlg.Destroy()
Exemple #2
0
    def Modifier(self, schedule=None):
        """ Modification d'un schedule """
        self.ctrl_planning.Freeze()
        dlg = DLG_Saisie_transport.Dialog(self, IDtransport=schedule.IDtransport, IDindividu=self.IDindividu)
        if dlg.ShowModal() == wx.ID_OK:
##            dictTransport = dlg.GetDictDonnees()
##            dictTransport = self.AnalyseTransport(dictTransport)
##            self.ModificationSchedule(dictTransport, schedule)
            self.MAJ() 
        dlg.Destroy()
        self.ctrl_planning.Thaw()
Exemple #3
0
    def Ajouter(self, date=None):
        """ Création d'un transport """
        datedt = ConvertDateWXenDT(date)
        dlg = DLG_Saisie_transport.Dialog(self, IDtransport=None, IDindividu=self.IDindividu)
        dlg.SetDateHeure(datedt)
        if dlg.ShowModal() == wx.ID_OK:
##            dictTransport = dlg.GetDictDonnees()
##            dictTransport = self.AnalyseTransport(dictTransport)
##            self.CreationSchedule(dictTransport) 
            self.MAJ() 
        dlg.Destroy()
Exemple #4
0
 def Ajouter(self, event):
     from Dlg import DLG_Saisie_transport
     dlg = DLG_Saisie_transport.Dialog(self, IDindividu=self.IDindividu, modeVirtuel=True, verrouilleBoutons=True) 
     dlg.SetDateObligatoire(self.date) 
     if dlg.ShowModal() == wx.ID_OK:
         dictDonnees = dlg.GetDictDonnees()
         IDtransport = self.grid.RechercheProchainIDtransport()
         dictDonnees["IDtransport"] = IDtransport
         dictDonnees["mode"] = "TRANSP"
         self.dictTransports[IDtransport] = dictDonnees
         self.MAJ()
     dlg.Destroy()
 def Modifier(self, event):
     if UTILS_Utilisateurs.VerificationDroitsUtilisateurActuel(
             "individus_transports", "modifier") == False:
         return
     if len(self.Selection()) == 0:
         dlg = wx.MessageDialog(
             self,
             _(u"Vous n'avez sélectionné aucun transport à modifier dans la liste !"
               ), _(u"Erreur de saisie"), wx.OK | wx.ICON_EXCLAMATION)
         dlg.ShowModal()
         dlg.Destroy()
         return
     track = self.Selection()[0]
     from Dlg import DLG_Saisie_transport
     dlg = DLG_Saisie_transport.Dialog(self,
                                       IDtransport=track.IDtransport,
                                       IDindividu=track.IDindividu)
     if dlg.ShowModal() == wx.ID_OK:
         self.MAJ(track.IDtransport)
     dlg.Destroy()