Ejemplo n.º 1
0
 def Modifier(self, event):
     if UTILS_Utilisateurs.VerificationDroitsUtilisateurActuel(
             "parametrage_modeles_docs", "modifier") == False:
         return
     if len(self.Selection()) == 0:
         dlg = wx.MessageDialog(
             self,
             _(u"Vous n'avez sélectionné aucun modèle à modifier dans la liste !"
               ), _(u"Erreur de saisie"), wx.OK | wx.ICON_EXCLAMATION)
         dlg.ShowModal()
         dlg.Destroy()
         return
     track = self.Selection()[0]
     IDmodele = track.IDmodele
     from Dlg import DLG_Noedoc
     dlg = DLG_Noedoc.Dialog(
         self,
         IDmodele=IDmodele,
         nom=track.nom,
         observations=track.observations,
         IDfond=track.IDfond,
         categorie=self.categorie,
         taille_page=track.taille,
     )
     if dlg.ShowModal() == wx.ID_OK:
         self.MAJ(IDmodele)
     dlg.Destroy()
Ejemplo n.º 2
0
 def Ajouter(self, event):
     if UTILS_Utilisateurs.VerificationDroitsUtilisateurActuel("parametrage_modeles_docs", "creer") == False : return
     from Dlg import DLG_Noedoc
     dlg = DLG_Noedoc.Dialog(self, IDmodele=None,
             nom=u"", observations=u"", IDfond=None,
             categorie=self.categorie, taille_page=(210, 297),
             )
     if dlg.ShowModal() == wx.ID_OK:
         IDmodele = dlg.GetIDmodele()
         self.MAJ(IDmodele)
     dlg.Destroy()