Exemplo n.º 1
0
 def buscar(self, event):
     self.m_staticText161.Hide()
     self.m_comboBox4.Hide()
     self.m_staticText17.Show()
     self.m_staticText17.Enable(True)
     self.m_textCtrl131.Show()
     self.m_textCtrl131.Enable(False)
     self.filtro = self.m_comboBox1.GetValue()
     casa1 = Casa("", self.filtro, "", "", "")
     registro = casa1.consultar(con1)
     print registro[4]
     self.m_textCtrl11.SetValue(registro[1])
     self.m_textCtrl131.SetValue(registro[0])
     self.m_textCtrl12.SetValue(registro[2])
     self.m_textCtrl13.SetValue(registro[3])
     a = str(registro[4])
     self.m_textCtrl14.SetValue(a)
     self.m_button1.Enable(False)
     self.m_button2.Enable(False)
     self.m_button3.Enable(True)
     self.m_button4.Enable(True)
     self.m_button5.Enable(False)
     self.m_button6.Enable(False)
     self.m_comboBox1.Enable(False)
     event.Skip()
Exemplo n.º 2
0
 def buscar(self, event):
     self.m_comboBox6.Enable(True)
     self.m_datePicker2.Enable(True)
     self.m_datePicker3.Enable(True)
     self.NumCtrl1.Enable(True)
     self.m_comboBox7.Enable(True)
     self.NumCtrl2.Enable(True)
     self.m_checkBox1.Enable(True)
     self.m_checkBox2.Enable(True)
     self.m_checkBox3.Enable(True)
     self.m_listBox1.Enable(True)
     self.m_button24.Enable(True)
     self.m_button25.Enable(True)
     self.m_button26.Enable(True)
     self.m_button27.Enable(True)
     direccion = self.m_comboBox5.GetValue()
     Casa2 = Casa('', direccion, '', '', '')
     regp = Casa2.consultar(con1)
     self.m_textCtrl20.SetValue(regp[0])
     event.Skip()
Exemplo n.º 3
0
import wx
import wx.xrc
from lib.Casas import Casa
from lib.Coneccion import Coneccion
from lib.Inquilinos import Inquilino
from lib.Propietario import Propietario
from lib.Descuentos import Descuentos
from lib.Contratos import Contrato
from wx.lib.masked import NumCtrl

#BORRAR AL TERMINAR----------------------------------------
import psycopg2

con1 = Coneccion('localhost', 'raices', 'postgres',
                 'Celeste14')  #Eliminar esta Linea
Casa1 = Casa('', '', '', '', '')
rcasas = Casa1.consultarLibres(con1)
print rcasas
inq1 = Inquilino('', '', '', '', '', '')
rinq1 = inq1.consultartodos(con1)
des1 = Descuentos('', '')
rdes1 = des1.consultartodos(con1)


class contratos(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=u"Contratos",
                          pos=wx.DefaultPosition,
Exemplo n.º 4
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=u"Generar Recibos",
                          pos=wx.DefaultPosition,
                          size=wx.Size(569, 214),
                          style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
        self.Cont1 = Contrato('', '', '', '', '', '', '')
        self.casa1 = Casa('', '', '', '', '')
        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)
        self.SetBackgroundColour(wx.Colour(207, 69, 241))

        bSizer32 = wx.BoxSizer(wx.VERTICAL)

        self.m_panel29 = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                  wx.DefaultSize, wx.TAB_TRAVERSAL)
        self.m_panel29.SetBackgroundColour(wx.Colour(252, 152, 215))

        gSizer12 = wx.GridSizer(2, 2, 0, 0)

        self.m_radioBtn5 = wx.RadioButton(self.m_panel29, wx.ID_ANY,
                                          u"Imprimir un Recibo",
                                          wx.DefaultPosition, wx.DefaultSize,
                                          0)
        gSizer12.Add(self.m_radioBtn5, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_radioBtn6 = wx.RadioButton(self.m_panel29, wx.ID_ANY,
                                          u"Impresion Masiva de Recibos",
                                          wx.DefaultPosition, wx.DefaultSize,
                                          0)
        gSizer12.Add(self.m_radioBtn6, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_staticText46 = wx.StaticText(self.m_panel29, wx.ID_ANY,
                                            u"Numero de Contrato:",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText46.Wrap(-1)
        gSizer12.Add(self.m_staticText46, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_textCtrl28 = wx.TextCtrl(self.m_panel29, wx.ID_ANY,
                                        wx.EmptyString, wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        gSizer12.Add(self.m_textCtrl28, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_panel29.SetSizer(gSizer12)
        self.m_panel29.Layout()
        gSizer12.Fit(self.m_panel29)
        bSizer32.Add(self.m_panel29, 1, wx.EXPAND | wx.ALL, 5)

        self.m_panel32 = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                  wx.DefaultSize, wx.TAB_TRAVERSAL)
        self.m_panel32.SetBackgroundColour(wx.Colour(248, 179, 253))

        bSizer33 = wx.BoxSizer(wx.VERTICAL)

        self.m_staticText47 = wx.StaticText(self.m_panel32, wx.ID_ANY,
                                            u"Periodo:", wx.DefaultPosition,
                                            wx.DefaultSize, 0)
        self.m_staticText47.Wrap(-1)
        bSizer33.Add(self.m_staticText47, 0,
                     wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_textCtrl29 = wx.TextCtrl(self.m_panel32, wx.ID_ANY,
                                        wx.EmptyString, wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        bSizer33.Add(self.m_textCtrl29, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
                     5)

        self.m_button35 = wx.Button(self.m_panel32, wx.ID_ANY, u"Generar",
                                    wx.DefaultPosition, wx.DefaultSize, 0)
        bSizer33.Add(self.m_button35, 0,
                     wx.ALIGN_BOTTOM | wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_panel32.SetSizer(bSizer33)
        self.m_panel32.Layout()
        bSizer33.Fit(self.m_panel32)
        bSizer32.Add(self.m_panel32, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(bSizer32)
        self.Layout()

        self.Centre(wx.BOTH)
        self.a = 'uno'

        # Connect Events
        self.m_radioBtn5.Bind(wx.EVT_RADIOBUTTON, self.Uno)
        self.m_radioBtn6.Bind(wx.EVT_RADIOBUTTON, self.Todos)
        self.m_button35.Bind(wx.EVT_BUTTON, self.Generar)
Exemplo n.º 5
0
class recibos(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=u"Generar Recibos",
                          pos=wx.DefaultPosition,
                          size=wx.Size(569, 214),
                          style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
        self.Cont1 = Contrato('', '', '', '', '', '', '')
        self.casa1 = Casa('', '', '', '', '')
        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)
        self.SetBackgroundColour(wx.Colour(207, 69, 241))

        bSizer32 = wx.BoxSizer(wx.VERTICAL)

        self.m_panel29 = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                  wx.DefaultSize, wx.TAB_TRAVERSAL)
        self.m_panel29.SetBackgroundColour(wx.Colour(252, 152, 215))

        gSizer12 = wx.GridSizer(2, 2, 0, 0)

        self.m_radioBtn5 = wx.RadioButton(self.m_panel29, wx.ID_ANY,
                                          u"Imprimir un Recibo",
                                          wx.DefaultPosition, wx.DefaultSize,
                                          0)
        gSizer12.Add(self.m_radioBtn5, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_radioBtn6 = wx.RadioButton(self.m_panel29, wx.ID_ANY,
                                          u"Impresion Masiva de Recibos",
                                          wx.DefaultPosition, wx.DefaultSize,
                                          0)
        gSizer12.Add(self.m_radioBtn6, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_staticText46 = wx.StaticText(self.m_panel29, wx.ID_ANY,
                                            u"Numero de Contrato:",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText46.Wrap(-1)
        gSizer12.Add(self.m_staticText46, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_textCtrl28 = wx.TextCtrl(self.m_panel29, wx.ID_ANY,
                                        wx.EmptyString, wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        gSizer12.Add(self.m_textCtrl28, 0, wx.ALIGN_BOTTOM | wx.ALL, 5)

        self.m_panel29.SetSizer(gSizer12)
        self.m_panel29.Layout()
        gSizer12.Fit(self.m_panel29)
        bSizer32.Add(self.m_panel29, 1, wx.EXPAND | wx.ALL, 5)

        self.m_panel32 = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                  wx.DefaultSize, wx.TAB_TRAVERSAL)
        self.m_panel32.SetBackgroundColour(wx.Colour(248, 179, 253))

        bSizer33 = wx.BoxSizer(wx.VERTICAL)

        self.m_staticText47 = wx.StaticText(self.m_panel32, wx.ID_ANY,
                                            u"Periodo:", wx.DefaultPosition,
                                            wx.DefaultSize, 0)
        self.m_staticText47.Wrap(-1)
        bSizer33.Add(self.m_staticText47, 0,
                     wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_textCtrl29 = wx.TextCtrl(self.m_panel32, wx.ID_ANY,
                                        wx.EmptyString, wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        bSizer33.Add(self.m_textCtrl29, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
                     5)

        self.m_button35 = wx.Button(self.m_panel32, wx.ID_ANY, u"Generar",
                                    wx.DefaultPosition, wx.DefaultSize, 0)
        bSizer33.Add(self.m_button35, 0,
                     wx.ALIGN_BOTTOM | wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)

        self.m_panel32.SetSizer(bSizer33)
        self.m_panel32.Layout()
        bSizer33.Fit(self.m_panel32)
        bSizer32.Add(self.m_panel32, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(bSizer32)
        self.Layout()

        self.Centre(wx.BOTH)
        self.a = 'uno'

        # Connect Events
        self.m_radioBtn5.Bind(wx.EVT_RADIOBUTTON, self.Uno)
        self.m_radioBtn6.Bind(wx.EVT_RADIOBUTTON, self.Todos)
        self.m_button35.Bind(wx.EVT_BUTTON, self.Generar)

    def __del__(self):
        pass

    # Virtual event handlers, overide them in your derived class
    def Uno(self, event):
        self.a = 'uno'
        event.Skip()

    def Todos(self, event):
        self.a = 'todos'
        self.m_textCtrl28.Enable(False)

        event.Skip()

    def Generar(self, event):
        periodo = self.m_textCtrl29.GetValue()
        if self.a == 'uno':
            self.Cont1.numero = self.m_textCtrl28.GetValue()
            reg = self.Cont1.consultar(con1)
            if reg == []:
                wx.MessageBox('Este contrato no existe', 'Info',
                              wx.OK | wx.ICON_INFORMATION)
            else:
                vencido = self.Cont1.consultarVencidos(
                    con1, str(self.m_textCtrl28.GetValue()))
                print vencido
                if vencido == "en orden":
                    report.pdf(periodo, reg, con1)
                else:
                    wx.MessageBox('Este contrato esta vencido', 'Info',
                                  wx.OK | wx.ICON_INFORMATION)
        else:
            reg = self.casa1.consultarAlq(con1)
            print reg
            i = 0
            imp = []
            for i in range(len(reg)):
                cst = str(reg[i][4])
                ven = self.Cont1.consultarVencidos(con1, cst)
                print ven
                if ven == 'VENCIDO':
                    i = i + 1
                else:
                    self.Cont1.numero = str(reg[i][4])
                    reg1 = self.Cont1.consultar(con1)
                    imp.append(reg1)
            report.pdft(periodo, imp, con1)

        event.Skip()
Exemplo n.º 6
0
# -*- coding: utf-8 -*-

import wx
import wx.xrc

from lib.Casas import Casa
from lib.Coneccion import Coneccion
from lib.Propietario import Propietario

#BORRAR AL TERMINAR----------------------------------------
import psycopg2

con1 = Coneccion('localhost', 'raices', 'postgres',
                 'Celeste14')  #Eliminar esta Linea
Casa1 = Casa('', '', '', '', '')
registro = Casa1.consultartodos(con1)
propietario1 = Propietario('', '', '', '', '', '')
registro1 = propietario1.consultartodos(con1)
#---------------------------------------------------------


class casas(wx.Frame):
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=1,
                          title=u"Actualizar Propiedades",
                          pos=wx.DefaultPosition,
                          size=wx.Size(1115, 280),
                          style=wx.CAPTION | wx.CLOSE_BOX | wx.TAB_TRAVERSAL)
Exemplo n.º 7
0
from lib.Casas import Casa
from lib.Coneccion import Coneccion
from lib.Inquilinos import Inquilino
from lib.Propietario import Propietario
from lib.Descuentos import Descuentos
from lib.Contratos import Contrato
from wx.lib.masked import NumCtrl

#BORRAR AL TERMINAR---------------------------------------- 
import psycopg2
import psycopg2
con1=Coneccion('localhost','raices','postgres','Celeste14') #Eliminar esta Linea
cont1=Contrato('','','','','','','')
des1=Descuentos('','')
rdes1=des1.consultartodos(con1)
Casa1=Casa('','','','','')
class concam ( wx.Frame ):
	
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Consulta de Cotrantos", pos = wx.DefaultPosition, size = wx.Size( 580,548 ), style = wx.CAPTION|wx.CLOSE_BOX|wx.NO_BORDER|wx.TAB_TRAVERSAL )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWFRAME ) )
		
		bSizer12 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_panel15 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.m_panel15.SetBackgroundColour( wx.Colour( 181, 249, 162 ) )
		
		gSizer11 = wx.GridSizer( 0, 4, 0, 0 )