コード例 #1
0
    def on_btnGrabcli_clicked(self, widget):
        self.dni = self.dnicli.get_text()
        self.apel = self.apelcli.get_text()
        self.nom = self.nomcli.get_text()
        self.dir = self.dircli.get_text()
        self.loc = self.loccli.get_text()

        tree_iter = self.provcli.get_active_iter()
        if tree_iter != None:
            model = self.provcli.get_model()
            self.prov = model[tree_iter][0]

        self.cp = self.cpcli.get_text()
        self.mov = self.movcli.get_text()
        self.tel = self.telcli.get_text()
        self.mail = self.mailcli.get_text()

        if clientes.Grabarcli(self.dni, self.apel, self.nom, self.dir,
                              self.loc, self.prov, self.cp, self.mov, self.tel,
                              self.mail, self.pub) == False:
            self.avisodni.show()

        clientes.limpiarcli(self.dnicli, self.apelcli, self.nomcli,
                            self.dircli, self.loccli, self.provcli, self.cpcli,
                            self.movcli, self.telcli, self.mailcli)
        clientes.mostrar(self.listCliente, self.trewCliente)
コード例 #2
0
ファイル: main.py プロジェクト: rjuncverd/Taller
    def on_btnAceptarLog_clicked(self, widget):
        usr = self.entUsuarioLog.get_text()
        psswd = self.entPasswordLog.get_text()
        cypher = DES.new('12345678')
        psswdDEScrypto = cypher.encrypt(psswd)
        print usr + " " + psswd
        print psswdDEScrypto
        print cypher.decrypt(psswdDEScrypto).strip()

        if usr == "admin" and psswd == "admin123":
            self.ventanaPrincipal.show()
            self.ventanaLogin.hide()
            clientes.mostrar(self.listCliente, self.trewCliente)
        else:
            self.entUsuarioLog.set_text("")
            self.entPasswordLog.set_text("")
コード例 #3
0
ファイル: main.py プロジェクト: balboag/taller
 def on_btnGrabcli_clicked(self, widget):
     self.dni = self.dnicli.get_text()
     self.apel = self.apelcli.get_text()
     self.nom = self.nomcli.get_text()
     self.dir = self.dircli.get_text()
     self.loc = self.loccli.get_text()
     self.prov = self.provcli.get_text()
     self.cp = self.cpcli.get_text()
     self.mov = self.movcli.get_text()
     self.tel = self.telcli.get_text()
     self.mail = self.mailcli.get_text()
           
     if clientes.Grabarcli(self.dni, self.apel, self.nom, self.dir, self.loc, self.prov, self.cp, self.mov, self.tel, self.mail, self.pub) == False:
         self.avisodni.show()
         
     clientes.limpiarcli(self.dnicli, self.apelcli, self.nomcli, self.dircli, self.loccli, self.provcli, self.cpcli, self.movcli, self.telcli, self.mailcli)
     clientes.mostrar(self.listCliente, self.trewCliente)
コード例 #4
0
ファイル: main.py プロジェクト: XoanCarlos/taller
 def on_btnGrabcli_clicked(self, widget):
     self.dni = self.dnicli.get_text()
     self.apel = self.apelcli.get_text()
     self.nom = self.nomcli.get_text()
     self.dir = self.dircli.get_text()
     print type(self.provincia)
     self.loc = self.loccli.get_text()
     #model = self.cmbprov.get_model()
     #activo = self.cmbprov.get_active()
     self.prov = str(self.provincia)
     print self.provincia
     self.cp = self.cpcli.get_text()
     self.mov = self.movcli.get_text()
     self.tel = self.telcli.get_text()
     self.mail = self.mailcli.get_text()
           
     if clientes.Grabarcli(self.dni, self.apel, self.nom, self.dir, self.loc, self.prov, self.cp, self.mov, self.tel, self.mail, self.pub) == False:
         self.avisodni.show()
         
     clientes.limpiarcli(self.dnicli, self.apelcli, self.nomcli, self.dircli, self.loccli, self.provcli, self.cpcli, self.movcli, self.telcli, self.mailcli)
     clientes.mostrar(self.listCliente, self.trewCliente)
コード例 #5
0
ファイル: main.py プロジェクト: balboag/taller
 def on_btnBorrarcli_clicked(self, widget):
     clientes.Borrarcli(self.data)
     clientes.mostrar(self.listCliente, self.trewCliente)  
コード例 #6
0
ファイル: main.py プロジェクト: balboag/taller
    def __init__(self):

#declaracion de widgets
        b = Gtk.Builder()
        b.add_from_file("taller.glade")
        self.ventanaPrincipal = b.get_object("ventanaPrincipal")
        self.ventanaNeocli = b.get_object("ventanaNeocli")
        self.ventanaTaller = b.get_object("ventanaTaller")
        self.ventanaVentas = b.get_object("ventanaVentas")
        self.btnSalircli = b.get_object("btnSalircli")
        self.btnNeocli = b.get_object("btnNeocli")
        self.btnGrabcli = b.get_object("btnGrabcli")
        self.btnSalir = b.get_object("btnSalir")
        self.listCliente = b.get_object("listCliente")
        self.dnicli = b.get_object("entDni")
        self.apelcli = b.get_object("entApel")
        self.nomcli = b.get_object("entNom")
        self.dircli = b.get_object("entDir")
        self.loccli = b.get_object("entLoc")
        self.provcli = b.get_object("entProv")
        self.cpcli = b.get_object("entCp")
        self.movcli = b.get_object("entMov")
        self.telcli = b.get_object("entTel")
        self.mailcli = b.get_object("entMail")
        self.sicli = b.get_object("rtbSi")
        self.nocli = b.get_object("rtbNo")
        self.entMatrifac = b.get_object("entMatri")
        self.entModelfac = b.get_object("entModel")
        self.entFechafac = b.get_object("entFecha")
        self.entMarcafac = b.get_object("entMarca")
        self.lbldnifac = b.get_object("lbldnifac")
        self.lblidfac = b.get_object("lblidfac")
        self.avisodni = b.get_object("dlgAvis")
        self.btnAceptar = b.get_object("btnAceptar")
        self.listCliente = b.get_object("listCiente")
        self.trewCliente = b.get_object("trwCliente")
        self.listFactura = b.get_object("listFactura")
        self.trewFactura = b.get_object("trewFactura")        
        self.btnBorrarcli = b.get_object("btnBorrarcli")
        self.btnGrabarfac = b.get_object("btnGrabarfac")
        self.btnVentas = b.get_object("btnVentas")
        self.btnSalirven = b.get_object("btnSalirven")
        self.lblMatriven = b.get_object("lblMatriven")
        self.lblFacturav = b.get_object("lblFacturav")
        self.entConce = b.get_object("entConce")
        self.entPrecio = b.get_object("entPrecio")
        self.trewVentas = b.get_object("trewVentas")
        self.listaVentas = b.get_object("listVentas")
        self.btnImprimir = b.get_object("btnImprimir")
        self.menubar = b.get_object("menubar")
         
        
        self.ventanaPrincipal.show()
        clientes.mostrar(self.listCliente, self.trewCliente)
        

        dic = {"on_btnNeocli_clicked": self.on_btnNeocli_clicked,
            "on_btnSalir_clicked": self.on_btnSalir_clicked,
            "on_btnSalircli_clicked": self.on_btnSalircli_clicked,
            "on_btnGrabcli_clicked": self.on_btnGrabcli_clicked,
            "on_ventanaPrincipal_destroy": self.on_ventanaPrincipal_destroy,
            "on_ventanaNeocli_delete_event": self.on_ventanaNeocli_delete_event,
            "on_entDni_focus_out_event": self.on_entDni_focus_out_event,
            "on_btnAceptar_clicked": self.on_btnAceptar_clicked,
            "on_rbtNo_toggled": self.on_rbtNo_toggled,
            "on_btnBorrarcli_clicked": self.on_btnBorrarcli_clicked,
            "on_trwCliente_cursor_changed": self.on_trwCliente_cursor_changed,
            "on_trewFactura_cursor_changed": self.on_trewFactura_cursor_changed,
            "on_btnTaller_clicked": self.on_btnTaller_clicked,
            "on_btnSalirtaller_clicked": self.on_btnSalirtaller_clicked,
            "on_btnGrabarfac_clicked": self.on_btnGrabarfac_clicked,
            "on_ventanaTaller_destroy": self.on_ventanaTaller_destroy,
            "on_ventanaTaller_delete_event": self.on_ventanaTaller_delete_event,
            "on_btnVentas_clicked": self.on_btnVentas_clicked,
            "on_btnSalirven_clicked": self.on_btnSalirven_clicked,
            "on_ventanaVentas_destroy": self.on_ventanaVentas_destroy,
            "on_btnSalirven_delete_event": self.on_btnSalirven_delete_event,
            "on_btnGrabarven_clicked": self.on_btnGrabarven_clicked,
            "on_imagemenuitem5_activate": self.on_imagemenuitem5_activate,
            "on_btnImprimir_clicked": self.on_btnImprimir_clicked
            }

        b.connect_signals(dic)
コード例 #7
0
 def on_btnBorrarcli_clicked(self, widget):
     clientes.Borrarcli(self.data)
     clientes.mostrar(self.listCliente, self.trewCliente)  
コード例 #8
0
    def __init__(self):

#declaracion de widgets
        b = Gtk.Builder()
        b.add_from_file("taller.glade")
        self.ventanaPrincipal = b.get_object("ventanaPrincipal")
        self.ventanaNeocli = b.get_object("ventanaNeocli")
        self.ventanaTaller = b.get_object("ventanaTaller")
        self.ventanaVentas = b.get_object("ventanaVentas")
        self.btnSalircli = b.get_object("btnSalircli")
        self.btnNeocli = b.get_object("btnNeocli")
        self.btnGrabcli = b.get_object("btnGrabcli")
        self.btnSalir = b.get_object("btnSalir")
        self.listCliente = b.get_object("listCliente")
        self.dnicli = b.get_object("entDni")
        self.apelcli = b.get_object("entApel")
        self.nomcli = b.get_object("entNom")
        self.dircli = b.get_object("entDir")
        self.loccli = b.get_object("entLoc")
        self.provcli = b.get_object("entProv")
        self.cpcli = b.get_object("entCp")
        self.movcli = b.get_object("entMov")
        self.telcli = b.get_object("entTel")
        self.mailcli = b.get_object("entMail")
        self.sicli = b.get_object("rtbSi")
        self.nocli = b.get_object("rtbNo")
        self.entMatrifac = b.get_object("entMatri")
        self.entModelfac = b.get_object("entModel")
        self.entFechafac = b.get_object("entFecha")
        self.entMarcafac = b.get_object("entMarca")
        self.lbldnifac = b.get_object("lbldnifac")
        self.lblidfac = b.get_object("lblidfac")
        self.avisodni = b.get_object("dlgAvis")
        self.btnAceptar = b.get_object("btnAceptar")
        self.listCliente = b.get_object("listCiente")
        self.trewCliente = b.get_object("trwCliente")
        self.listFactura = b.get_object("listFactura")
        self.trewFactura = b.get_object("trewFactura")        
        self.btnBorrarcli = b.get_object("btnBorrarcli")
        self.btnGrabarfac = b.get_object("btnGrabarfac")
        self.btnVentas = b.get_object("btnVentas")
        self.btnSalirven = b.get_object("btnSalirven")
        self.lblMatriven = b.get_object("lblMatriven")
        self.lblFacturav = b.get_object("lblFacturav")
        self.entConce = b.get_object("entConce")
        self.entPrecio = b.get_object("entPrecio")
        self.trewVentas = b.get_object("trewVentas")
        self.listaVentas = b.get_object("listVentas")
        self.menubar = b.get_object("menubar")
         
        
        self.ventanaPrincipal.show()
        clientes.mostrar(self.listCliente, self.trewCliente)
        

        dic = {"on_btnNeocli_clicked": self.on_btnNeocli_clicked,
            "on_btnSalir_clicked": self.on_btnSalir_clicked,
            "on_btnSalircli_clicked": self.on_btnSalircli_clicked,
            "on_btnGrabcli_clicked": self.on_btnGrabcli_clicked,
            "on_ventanaPrincipal_destroy": self.on_ventanaPrincipal_destroy,
            "on_ventanaNeocli_delete_event": self.on_ventanaNeocli_delete_event,
            "on_entDni_focus_out_event": self.on_entDni_focus_out_event,
            "on_btnAceptar_clicked": self.on_btnAceptar_clicked,
            "on_rbtNo_toggled": self.on_rbtNo_toggled,
            "on_btnBorrarcli_clicked": self.on_btnBorrarcli_clicked,
            "on_trwCliente_cursor_changed": self.on_trwCliente_cursor_changed,
            "on_trewFactura_cursor_changed": self.on_trewFactura_cursor_changed,
            "on_btnTaller_clicked": self.on_btnTaller_clicked,
            "on_btnSalirtaller_clicked": self.on_btnSalirtaller_clicked,
            "on_btnGrabarfac_clicked": self.on_btnGrabarfac_clicked,
            "on_ventanaTaller_destroy": self.on_ventanaTaller_destroy,
            "on_ventanaTaller_delete_event": self.on_ventanaTaller_delete_event,
            "on_btnVentas_clicked": self.on_btnVentas_clicked,
            "on_btnSalirven_clicked": self.on_btnSalirven_clicked,
            "on_ventanaVentas_destroy": self.on_ventanaVentas_destroy,
            "on_btnSalirven_delete_event": self.on_btnSalirven_delete_event,
            "on_btnGrabarven_clicked": self.on_btnGrabarven_clicked,
            "on_imagemenuitem5_activate": self.on_imagemenuitem5_activate
            }

        b.connect_signals(dic)