コード例 #1
0
ファイル: OL_Locations.py プロジェクト: tarachetatete/Noethys
 def Ajouter(self, event):
     from Dlg import DLG_Saisie_location
     dlg = DLG_Saisie_location.Dialog(self, IDlocation=None, IDfamille=self.IDfamille, IDproduit=self.IDproduit)
     if dlg.ShowModal() == wx.ID_OK:
         self.MAJ(dlg.GetIDlocation())
         self.dirty = True
     dlg.Destroy()
コード例 #2
0
 def Modifier(self, schedule=None):
     """ Modification d'un schedule """
     track = schedule.track
     from Dlg import DLG_Saisie_location
     dlg = DLG_Saisie_location.Dialog(self, IDlocation=track.IDlocation, IDfamille=track.IDfamille)
     if dlg.ShowModal() == wx.ID_OK:
         self.ctrl_planning.Freeze()
         self.MAJ()
         self.ctrl_planning.Thaw()
     dlg.Destroy()
コード例 #3
0
ファイル: OL_Locations.py プロジェクト: tarachetatete/Noethys
 def Modifier(self, event):
     if len(self.Selection()) == 0 :
         dlg = wx.MessageDialog(self, _(u"Vous n'avez sélectionné aucune location à 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_location
     dlg = DLG_Saisie_location.Dialog(self, IDlocation=track.IDlocation, IDfamille=self.IDfamille)
     if dlg.ShowModal() == wx.ID_OK:
         self.MAJ(dlg.GetIDlocation())
         self.dirty = True
     dlg.Destroy()
コード例 #4
0
 def Attribution(self, IDproduit=None):
     # Création d'une location
     from Dlg import DLG_Saisie_location
     dlg = DLG_Saisie_location.Dialog(
         self,
         IDfamille=self.ctrl_loueur.GetIDfamille(),
         IDproduit=IDproduit)
     IDlocation = None
     if dlg.ShowModal() == wx.ID_OK:
         IDlocation = dlg.GetIDlocation()
         self.SetAttribution(IDlocation)
     dlg.Destroy()
     if IDlocation != None:
         self.OnBoutonOk(None)
コード例 #5
0
    def Ajouter(self, date=None):
        """ Création d'un évènement """
        if self.IDproduit == None :
            dlg = wx.MessageDialog(self, _(u"Vous devez obligatoirement sélectionner un produit !"), _(u"Erreur"), wx.OK | wx.ICON_EXCLAMATION)
            dlg.ShowModal()
            dlg.Destroy()
            return

        # Création d'une location
        from Dlg import DLG_Saisie_location
        dlg = DLG_Saisie_location.Dialog(self, IDfamille=None, IDproduit=self.IDproduit)
        if dlg.ShowModal() == wx.ID_OK:
            self.MAJ()
        dlg.Destroy()