Esempio n. 1
0
 def buscar_nro(self):
     self.errorNoEnc.hide()
     self.errorVacio.hide()
     aux = Persona()
     x = validacionNumero2(self)
     if x != False:
         pLista = f_hash(x)
         aux.telefono = x
         res = busqueda(pLista, aux, "telefono")
         if (res != 0):
             self.bBuscar.hide()
             self.textoTel2.show()
             self.textoTel.hide()
             self.textoNom.show()
             self.textoAp.show()
             self.textoDir.show()
             self.lineTel.setReadOnly(True)
             self.lineApe.show()
             self.lineApe.insert(res.apellido)
             self.lineApe.setReadOnly(True)
             self.lineName.show()
             self.lineName.insert(res.nombre)
             self.lineName.setReadOnly(True)
             self.lineDir.show()
             self.lineDir.insert(res.direccion)
             self.lineDir.setReadOnly(True)
             self.bEliminar.show()
         else:
             self.errorNoEnc.show()
Esempio n. 2
0
 def eliminar(self):
     x = self.lineTel.text()
     pLista = f_hash(x)
     eliminar(pLista, x, "telefono")
     exito = Vexito()
     exito.exec_()
     self.close()
Esempio n. 3
0
 def agregarContacto(self):
     self.errorRepe.hide()
     aux = Persona()
     x1 = validacionNumero2(self)
     x2 = validacionNombre2(self)
     x3 = validacionApellido2(self)
     x4 = validacionDireccion2(self)
     if (x1 != False and x2 != False and x3 != False and x4 != False):
         aux.telefono = x1
         aux.nombre = x2
         aux.apellido = x3
         aux.direccion = x4
         pLista = f_hash(aux.telefono)
         if (busqueda(pLista, aux, "telefono") == 0):
             insertar(pLista, aux, "apellido")
             exito = Vexito()
             exito.exec_()
             self.close()
         else:
             self.errorRepe.show()
Esempio n. 4
0
 def buscar_nro(self):
     self.errorNoEnc.hide()
     self.bRegresar.hide()
     aux = Persona()
     x = validacionNumero2(self)
     if x != False:
         pLista = f_hash(x)
         aux.telefono = x
         res = busqueda(pLista, aux, "telefono")
         if (res != 0):
             eliminar(pLista, x, "telefono")
             self.bBuscar.hide()
             self.textoNom.show()
             self.textoAp.show()
             self.textoDir.show()
             self.lineApe.show()
             self.bModif.show()
             self.lineApe.insert(res.apellido)
             self.lineName.show()
             self.lineName.insert(res.nombre)
             self.lineDir.show()
             self.lineDir.insert(res.direccion)
         else:
             self.errorNoEnc.show()