示例#1
0
    def __init__(self, parent, listeTracks=[], debug=False):
        wx.Dialog.__init__(
            self, parent, -1, style=wx.CAPTION | wx.SYSTEM_MENU
        )  #wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX)
        self.parent = parent
        self.listeTracks = listeTracks
        self.debug = debug

        self.label_intro = wx.StaticText(self, -1, _(u"Initialisation..."))
        self.ctrl_gauge = wx.Gauge(self, -1, style=wx.GA_SMOOTH)
        self.ctrl_gauge.SetRange(len(listeTracks))
        self.ctrl_grille = DLG_Badgeage_grille.CTRL(self, usage="nomadhys")
        if self.debug == False:
            self.ctrl_grille.Show(False)

        # Boutons
        self.bouton_ok = CTRL_Bouton_image.CTRL(
            self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png")
        self.bouton_fermer = wx.BitmapButton(
            self, -1,
            wx.Bitmap(
                Chemins.GetStaticPath("Images/BoutonsImages/Arreter_L72.png"),
                wx.BITMAP_TYPE_ANY))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonFermer, self.bouton_fermer)

        # Init
        self.bouton_ok.Show(False)
        wx.CallLater(1000, self.Demarrer)
示例#2
0
    def __init__(self, parent, track=None):
        if parent == None :
            dlgparent = None
        else :
            dlgparent = parent.parent
        wx.Dialog.__init__(self, dlgparent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX)
        self.parent = parent
        self.track = track
        self.reponse = ""

        # Bandeau
        intro = _(u"Vous pouvez gérer ici la demande de façon manuelle. Commencez par cliquer sur le bouton 'Appliquer la demande' pour voir apparaître les modifications demandées dans la grille des conso. Vous pouvez alors effectuer manuellement d'éventuelles modifications avant de valider.")
        titre = _(u"Traitement manuel des réservations")
        self.SetTitle(titre)
        self.ctrl_bandeau = CTRL_Bandeau.Bandeau(self, titre=titre, texte=intro, hauteurHtml=30, nomImage="Images/32x32/Calendrier_modifier.png")

        # Facturation
        self.box_facturation_staticbox = wx.StaticBox(self, wx.ID_ANY, _(u"Facturation"))
        self.ctrl_facturation = CTRL_Grille_facturation.CTRL(self)
        self.ctrl_facturation.SetMinSize((275, 100))

        # Détail demande
        self.box_demande_staticbox = wx.StaticBox(self, wx.ID_ANY, _(u"Détail de la demande"))
        self.ctrl_demande = CTRL_Html(self, couleurFond=self.GetBackgroundColour())
        self.ctrl_demande.SetMinSize((275, 100))

        # Grille
        self.box_grille_staticbox = wx.StaticBox(self, wx.ID_ANY, _(u"Grille des consommations"))
        self.ctrl_grille = DLG_Badgeage_grille.CTRL(self, panel_facturation=self.ctrl_facturation)

        # Journal
        self.box_journal_staticbox = wx.StaticBox(self, wx.ID_ANY, _(u"Journal d'évènements"))
        self.ctrl_log = CTRL_Log(self)
        self.ctrl_log.SetMinSize((100, 80))
        self.bouton_traiter = CTRL_Bouton_image.CTRL(self, texte=_(u"Appliquer la demande"), cheminImage="Images/32x32/Fleche_bas.png")
        self.bouton_reinit = CTRL_Bouton_image.CTRL(self, texte=_(u"Annuler les modifications"), cheminImage="Images/32x32/Actualiser.png")

        # Boutons
        self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png")
        self.bouton_outils = CTRL_Bouton_image.CTRL(self, texte=_(u"Outils"), cheminImage="Images/32x32/Configuration.png")
        self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png")
        self.bouton_fermer = CTRL_Bouton_image.CTRL(self, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnBoutonTraiter, self.bouton_traiter)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonReinit, self.bouton_reinit)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonOutils, self.bouton_outils)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonFermer, self.bouton_fermer)
        self.Bind(wx.EVT_CLOSE, self.OnBoutonFermer)

        # Init
        if self.parent != None :
            self.parent.Init_grille(ctrl_grille=self.ctrl_grille)
            self.ctrl_demande.SetTexte(self.parent.parent.ctrl_description.GetTexte())
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX)
        self.parent = parent   

        # Bandeau
        titre = _(u"Recalculer les prestations")
        intro = _(u"Vous pouvez ici recalculer le montant des prestations déduits des consommations pour un ensemble d'individus. Sélectionnez l'activité et la période à recalculer, cochez les individus souhaités puis cliquez sur le bouton Commencer pour lancer le traitement.")
        self.SetTitle(titre)
        self.ctrl_bandeau = CTRL_Bandeau.Bandeau(self, titre=titre, texte=intro, hauteurHtml=30, nomImage="Images/32x32/Euro.png")
        
        # Individus
        self.box_prestations_staticbox = wx.StaticBox(self, -1, _(u"Sélection des individus"))
        self.label_periode = wx.StaticText(self, -1, u"Période :")
        self.ctrl_date_debut = CTRL_Saisie_date.Date2(self)
        self.label_date_fin = wx.StaticText(self, -1, "au")
        self.ctrl_date_fin = CTRL_Saisie_date.Date2(self)
        
        self.label_activite = wx.StaticText(self, -1, u"Activité :")
        self.ctrl_activite = CTRL_Activite(self)
        
        self.bouton_actualiser = wx.Button(self, -1, _(u"Actualiser la liste"))

        self.listviewAvecFooter = OL_Recalculer_prestations.ListviewAvecFooter(self, kwargs={}) 
        self.ctrl_individus = self.listviewAvecFooter.GetListview()
        self.ctrl_recherche = OL_Recalculer_prestations.CTRL_Outils(self, listview=self.ctrl_individus, afficherCocher=True)

        # Grille des conso
        self.box_grille_staticbox = wx.StaticBox(self, -1, _(u"Journal"))
        self.ctrl_log = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE|wx.TE_READONLY)
        self.ctrl_log.SetMinSize((-1, 80))
        self.ctrl_gauge = wx.Gauge(self, -1, style=wx.GA_SMOOTH)
        self.ctrl_grille = DLG_Badgeage_grille.CTRL(self)
        self.ctrl_grille.Show(False)
        # Boutons
        self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png")
        self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Commencer"), cheminImage="Images/32x32/Valider.png")
        self.bouton_fermer = CTRL_Bouton_image.CTRL(self, texte=_(u"Fermer"), cheminImage="Images/32x32/Annuler.png")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_CHOICE, self.OnChoixActivite, self.ctrl_activite)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonActualiser, self.bouton_actualiser)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAnnuler, self.bouton_fermer)
        self.Bind(wx.EVT_CLOSE, self.OnBoutonAnnuler)
        
        self.ctrl_individus.MAJ() 
        wx.CallLater(0, self.Layout)

        # Périodes de gestion
        self.gestion = UTILS_Gestion.Gestion(None)
示例#4
0
    def __init__(self, parent):
        wx.Dialog.__init__(self,
                           parent,
                           -1,
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
                           | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX)
        self.parent = parent
        self.dictAction = None

        # Bandeau
        titre = _(u"Traitement par lot")
        intro = _(
            u"Vous pouvez ici saisir, modifier ou supprimer des consommations pour un ensemble d'individus. Sélectionnez une activité ainsi que les paramètres de l'action à appliquer. Cochez les individus souhaités puis cliquez sur le bouton Commencer pour lancer le traitement."
        )
        self.SetTitle(titre)
        self.ctrl_bandeau = CTRL_Bandeau.Bandeau(
            self,
            titre=titre,
            texte=intro,
            hauteurHtml=30,
            nomImage="Images/32x32/Calendrier_modifier.png")

        # Paramètres
        self.box_parametres_staticbox = wx.StaticBox(self, -1,
                                                     _(u"Paramètres"))
        self.label_activite = wx.StaticText(self, -1, u"Activité :")
        self.ctrl_activite = CTRL_Activite(self)
        self.label_action = wx.StaticText(self, -1, u"Action :")
        self.ctrl_action = wx.TextCtrl(self, -1, u"")
        self.ctrl_action.Enable(False)
        self.bouton_action = wx.Button(self, -1,
                                       _(u"Sélectionner une action"))

        # Individus
        self.box_individus_staticbox = wx.StaticBox(
            self, -1, _(u"Sélection des individus"))
        self.listviewAvecFooter = OL_Saisie_lot_conso_global.ListviewAvecFooter(
            self, kwargs={})
        self.ctrl_individus = self.listviewAvecFooter.GetListview()
        self.ctrl_recherche = OL_Saisie_lot_conso_global.CTRL_Outils(
            self, listview=self.ctrl_individus, afficherCocher=True)

        # Grille des action
        self.box_grille_staticbox = wx.StaticBox(self, -1, _(u"Journal"))
        self.ctrl_log = wx.TextCtrl(self,
                                    -1,
                                    style=wx.TE_MULTILINE | wx.TE_READONLY)
        self.ctrl_log.SetMinSize((-1, 60))
        self.ctrl_gauge = wx.Gauge(self, -1, style=wx.GA_SMOOTH)
        self.ctrl_grille = DLG_Badgeage_grille.CTRL(self)
        self.ctrl_grille.Show(False)

        # Boutons
        self.bouton_aide = CTRL_Bouton_image.CTRL(
            self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png")
        self.bouton_ok = CTRL_Bouton_image.CTRL(
            self,
            texte=_(u"Commencer"),
            cheminImage="Images/32x32/Valider.png")
        self.bouton_fermer = CTRL_Bouton_image.CTRL(
            self, texte=_(u"Fermer"), cheminImage="Images/32x32/Annuler.png")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_CHOICE, self.OnChoixActivite, self.ctrl_activite)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAction, self.bouton_action)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAnnuler, self.bouton_fermer)
        self.Bind(wx.EVT_CLOSE, self.OnBoutonAnnuler)

        self.OnChoixActivite(None)
        self.ctrl_individus.MAJ()
        wx.CallLater(0, self.Layout)
示例#5
0
    def __init__(self, parent, track=None, tracks=[]):
        wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME)
        self.track = track
        self.tracks = tracks

        # Bandeau spécial
        self.panel_bandeau = wx.Panel(self, -1)
        self.panel_bandeau.SetBackgroundColour(wx.Colour(255, 255, 255))

        self.ctrl_image = wx.StaticBitmap(self.panel_bandeau, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Calendrier_modifier.png"), wx.BITMAP_TYPE_ANY))
        self.label_action = wx.StaticText(self.panel_bandeau, -1, _(u"Réservation de dates"))
        self.label_action.SetFont(wx.Font(11, wx.DEFAULT, wx.NORMAL, wx.BOLD, 0, ""))
        self.ligne1 = wx.StaticLine(self.panel_bandeau, -1)
        self.label_horodatage = wx.StaticText(self.panel_bandeau, -1, _(u"Mardi 26 juillet a 14h10"))
        self.label_horodatage.SetFont(wx.Font(8, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))

        # Navigation
        self.bouton_premier = wx.BitmapButton(self.panel_bandeau, 10, wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Premier.png"), wx.BITMAP_TYPE_ANY))
        self.bouton_precedent = wx.BitmapButton(self.panel_bandeau, 20, wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Precedent.png"), wx.BITMAP_TYPE_ANY))
        self.bouton_precedent.SetMinSize((60, -1))
        self.bouton_suivant = wx.BitmapButton(self.panel_bandeau, 30, wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Suivant.png"), wx.BITMAP_TYPE_ANY))
        self.bouton_suivant.SetMinSize((60, -1))
        self.bouton_dernier = wx.BitmapButton(self.panel_bandeau, 40, wx.Bitmap(Chemins.GetStaticPath(u"Images/32x32/Dernier.png"), wx.BITMAP_TYPE_ANY))
        self.ligne2 = wx.StaticLine(self.panel_bandeau, -1)

        # Contenu
        self.label_famille = wx.StaticText(self, -1, _(u"Famille :"))
        self.ctrl_famille = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
        self.bouton_famille = wx.BitmapButton(self, -1, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Famille.png"), wx.BITMAP_TYPE_ANY))

        self.label_description = wx.StaticText(self, -1, _(u"Description :"))
        self.ctrl_description = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.TE_MULTILINE)

        self.label_commentaire = wx.StaticText(self, -1, _(u"Commentaire :"))
        self.ctrl_commentaire = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY | wx.TE_MULTILINE)

        self.label_etat = wx.StaticText(self, -1, _(u"Etat :"))
        self.radio_attente = wx.RadioButton(self, -1, _(u"En attente"), style=wx.RB_GROUP)
        self.radio_validation = wx.RadioButton(self, -1, _(u"Traité le"))
        self.ctrl_date_validation = DatePickerCtrl(self)

        # CTRL Grille des conso
        self.ctrl_grille = DLG_Badgeage_grille.CTRL(self)
        self.ctrl_grille.Show(False)

        # Commandes
        self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png")
        self.bouton_automatique = CTRL_Bouton_image.CTRL(self, texte=_(u"Automatique"), cheminImage="Images/32x32/Magique.png")
        self.bouton_manuel = CTRL_Bouton_image.CTRL(self, texte=_(u"Manuel"), cheminImage="Images/32x32/Edition.png")
        self.bouton_fermer = CTRL_Bouton_image.CTRL(self, texte=_(u"Fermer"), cheminImage="Images/32x32/Fermer.png")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnNavigation, self.bouton_premier)
        self.Bind(wx.EVT_BUTTON, self.OnNavigation, self.bouton_precedent)
        self.Bind(wx.EVT_BUTTON, self.OnNavigation, self.bouton_suivant)
        self.Bind(wx.EVT_BUTTON, self.OnNavigation, self.bouton_dernier)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonFamille, self.bouton_famille)
        self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioEtat, self.radio_attente)
        self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioEtat, self.radio_validation)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonAutomatique, self.bouton_automatique)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonManuel, self.bouton_manuel)
        self.Bind(wx.EVT_BUTTON, self.OnBoutonFermer, self.bouton_fermer)
        self.Bind(wx.EVT_CLOSE, self.OnClose)

        # Init
        self.Importation()
        self.MAJ()