Beispiel #1
0
 def Ajouter(self, event):
     if self.GetGrandParent().GetName() == "DLG_Saisie_operation_tresorerie" :
         dateOperation = self.GetGrandParent().ctrl_date.GetDate()
     else :
         dateOperation = None
     dlg = DLG_Saisie_ventilation_operation.Dialog(self, typeOperation=self.typeOperation, track=None, dateOperation=dateOperation)
     if dlg.ShowModal() == wx.ID_OK:
         dictDonnees = dlg.GetDictDonnees() 
         track = Track(dictDonnees)
         self.listeTracks.append(track)
         self.MAJ() 
         self.SelectObject(track)
     dlg.Destroy()
Beispiel #2
0
 def Modifier(self, event):
     if len(self.Selection()) == 0 :
         dlg = wx.MessageDialog(self, _(u"Vous n'avez sélectionné aucune ventilation à modifier dans la liste !"), _(u"Erreur de saisie"), wx.OK | wx.ICON_EXCLAMATION)
         dlg.ShowModal()
         dlg.Destroy()
         return
     track = self.Selection()[0]
     index = self.listeTracks.index(track)
     dlg = DLG_Saisie_ventilation_operation.Dialog(self, typeOperation=self.typeOperation, track=track)
     if dlg.ShowModal() == wx.ID_OK:
         dictDonnees = dlg.GetDictDonnees() 
         track = Track(dictDonnees)
         self.listeTracks[index] = track
     dlg.Destroy()
     self.MAJ() 
     self.SelectObject(track)