Пример #1
0
    def __set_combobox_types_adhesion(self):
        try:
            adhesion_types = [a for a in AdhesionType.select().order_by(AdhesionType.prix.asc())]
            for adhesion_type in adhesion_types:
                self.combo_box_adhesion_type.Append(adhesion_type.nom + u" - %s ¤" % adhesion_type.prix, adhesion_type)

            self.combo_box_adhesion_type.Select(0)

        except BaseException as ex:
            print ex
Пример #2
0
    def __set_combobox_types_adhesion(self):
        try:
            adhesion_types = [
                a for a in AdhesionType.select().order_by(
                    AdhesionType.prix.asc())
            ]
            for adhesion_type in adhesion_types:
                self.combo_box_adhesion_type.Append(
                    adhesion_type.nom + u" - %s ¤" % adhesion_type.prix,
                    adhesion_type)

            self.combo_box_adhesion_type.Select(0)

        except BaseException as ex:
            print ex
Пример #3
0
    def __init__(self, parent, adhesion_type=None):
        wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL)

        if adhesion_type == None:
            adhesion_type = AdhesionType()

        self.adhesion_type = adhesion_type

        self.label_nom = wx.StaticText(self, -1, "Nom")
        self.text_ctrl_Nom = wx.TextCtrl(self, -1, "", validator=GenericTextValidator())
        self.label_prix = wx.StaticText(self, -1, "Prix")
        self.text_ctrl_Prix = wx.TextCtrl(self, -1, "", validator=GenericTextValidator(flag=VALIDATE_FLOAT))
        self.label_euros = wx.StaticText(self, -1, u"¤")
        self.bouton_valider = wx.Button(self, wx.ID_OK, "Valider")
        self.bouton_annuler = wx.Button(self, wx.ID_CANCEL, "Annuler")

        self.__set_properties()
        self.__set_valeurs()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnValider, self.bouton_valider)
 def __remplissage_liste(self):
     try:
         self.liste_adhesion_types.SetObjects([a for a in AdhesionType.select()])
     except BaseException as ex:
         print ex
 def __remplissage_liste(self):
     try:
         self.liste_adhesion_types.SetObjects(
             [a for a in AdhesionType.select()])
     except BaseException as ex:
         print ex