示例#1
0
        def datos_alta(self):
            def evaluar_datos(lista):
                "Compara los datos guardados con la lista desplegable, encuentra posicion y setea el valor"
                pos= [7,9,10,12]
                cont=0
                for orden in lista:
                    "selecciona el orden (textbox)"
                    x= 0
                    for n in orden.Items:
                        "selecciona de uno en uno los elementos dentro del textbox" 
                     
                        if n == self.acta[pos[cont]]:
                            "Si coincide con el elemento lo selecciona"

                            orden.SetSelection(x)
                            break
                        else:
                            x+=1
                    cont+=1
      
            anios= log_altas.obtener_anios()
            
            listaN=self.ajustes.get_lista_norm_legal()
            list_carat=self.ajustes.get_lista_caratula()
            
            imagen=["images\Botones\Btn_Dependencias.bmp"]   
             
            x=0
            y=-20
            
            caja1= wx.StaticBox(self.panel, -1, "Acta", pos= (x+50, y+30), size=(180, 110)) 
                    
            self.label1= wx.StaticText(self.panel,-1,u"Numero: ", pos= (x+60,y+62) )        
            self.orden1= wx.TextCtrl(self.panel,pos=(x+110,y+60),size=(50,23),style=wx.TE_READONLY)
            self.orden1.SetValue(self.acta[0]) 
            
            self.label2= wx.StaticText(self.panel,-1,u"Total: $", pos= (x+60,y+105) )        
            self.orden2= wx.TextCtrl(self.panel,pos=(x+110,y+100),size=(70,23))
            self.orden2.SetValue(self.acta[1])    
                    
            self.label3= wx.StaticText(self.panel,-1,u",", pos= (x+185,y+110) )        
            self.orden3= wx.TextCtrl(self.panel,pos=(x+190,y+100),size=(30,23))
            self.orden3.SetMaxLength(2)
            self.orden3.SetValue(self.acta[2])
            
            x1= 70
            y1= -20
            
            caja2= wx.StaticBox(self.panel, -1, "Destino", pos= (x1+170, y1+30), size=(600, 110))
            
            self.label4= wx.StaticText(self.panel,-1,u"1° Orden:", pos= (x1+180,y1+62) )
            self.orden4= wx.TextCtrl(self.panel,pos=(x1+240,y1+60),size=(60,23),style=wx.TE_READONLY)
            self.orden4.SetValue(self.acta[3])
            
            self.label5= wx.StaticText(self.panel,-1,u"2° Orden:", pos= (x1+310,y1+62) )
            self.orden5= wx.TextCtrl(self.panel,pos=(x1+370,y1+60),size=(60,23),style=wx.TE_READONLY)
            self.orden5.SetValue(self.acta[4])
            
            self.label6= wx.StaticText(self.panel,-1,u"Unidad\nPatrimonial:", pos= (x1+440,y1+56) )
            self.orden6= wx.TextCtrl(self.panel,pos=(x1+510,y1+60),size=(60,23),style=wx.TE_READONLY)
            self.orden6.SetValue(self.acta[5])
            
            self.label7= wx.StaticText(self.panel,-1,u"Departamento:", pos= (x1+180,y1+105) )      
            self.orden7= wx.TextCtrl(self.panel,pos=(x1+260,y1+100),size=(330,23),style=wx.TE_READONLY)
            self.orden7.SetValue(self.acta[6])
            
            "Boton Dependencias"
            self.imagen_btn= wx.Image(imagen[0], wx.BITMAP_TYPE_BMP).ConvertToBitmap()
            self.Button3= wx.BitmapButton(self.panel, -1, self.imagen_btn, pos=(x1+630,y1+65), size=(108,56))
            self.Button3.Bind(wx.EVT_BUTTON, self.dependencias)
            self.Button3.SetDefault() 
            
            x2= 0
            y2= 20
            
            caja3= wx.StaticBox(self.panel, -1, "Expediente", pos= (x2+50, y2+120), size=(390, 70))
            
            self.label8= wx.StaticText(self.panel,-1,u"Caratula: ", pos= (x2+60,y2+150) )        
            self.orden8= wx.Choice(self.panel,choices=list_carat,pos=(x2+110,y2+148),size=(60,23))
            
         
            self.label9= wx.StaticText(self.panel,-1,"Numero: ", pos= (x2+180,y2+150) )        
            self.orden9= wx.TextCtrl(self.panel,pos=(x2+240,y2+148),size=(50,23))
            self.orden9.SetValue(self.acta[8])
            
            self.label10= wx.StaticText(self.panel,-1,u"Año: ", pos= (x2+310,y2+150) )        
            self.orden10= wx.Choice(self.panel,choices=anios,pos=(x2+350,y2+148),size=(60,23))
                        
            x3= 20
            y3= 20
            
            caja4= wx.StaticBox(self.panel, -1, "Norma Legal", pos= (x3+450, y3+120), size=(370, 70))
            
            self.label11= wx.StaticText(self.panel,-1,"Tipo: ", pos= (x3+460,y3+150) )        
            self.orden11= wx.Choice(self.panel,choices=listaN,pos=(x3+500,y3+148),size=(60,23))
            
            self.label12= wx.StaticText(self.panel,-1,"Numero: ", pos= (x3+570,y3+150) )        
            self.orden12= wx.TextCtrl(self.panel,pos=(x3+630,y3+148),size=(50,23))            
            self.orden12.SetValue(self.acta[11])
    
            self.label13= wx.StaticText(self.panel,-1,u"Año: ", pos= (x3+700,y3+150) )        
            self.orden13= wx.Choice(self.panel,choices=anios,pos=(x3+740,y3+148),size=(60,23))    
            
            evaluar_datos([self.orden8,self.orden10,self.orden11,self.orden13])            
示例#2
0
    def datos_alta(self):
        anios= log_altas.obtener_anios()
        
        listaN=self.ajustes.get_lista_norm_legal()
        list_carat=self.ajustes.get_lista_caratula()
        
        imagen=["images\Botones\Btn_Dependencias.bmp"]   
         
        x=0
        y=-20
        
        caja1= wx.StaticBox(self.panel, -1, "Acta", pos= (x+50, y+30), size=(180, 110)) 
                
        self.label1= wx.StaticText(self.panel,-1,u"Numero: ", pos= (x+60,y+62) )        
        self.orden1= wx.TextCtrl(self.panel,pos=(x+110,y+60),size=(50,23),style=wx.TE_READONLY)
        self.orden1.SetValue(self.acta) 
        
        self.label2= wx.StaticText(self.panel,-1,u"Total: $", pos= (x+60,y+105) )        
        self.orden2= wx.TextCtrl(self.panel,pos=(x+110,y+100),size=(70,23))

                
        self.label3= wx.StaticText(self.panel,-1,u",", pos= (x+185,y+110) )        
        self.orden3= wx.TextCtrl(self.panel,pos=(x+190,y+100),size=(30,23))
        self.orden3.SetMaxLength(2)
        #self.orden3.Bind(wx.EVT_TEXT, self.accion)
        
        x1= 70
        y1= -20
        
        caja2= wx.StaticBox(self.panel, -1, "Destino", pos= (x1+170, y1+30), size=(600, 110))
        
        self.label4= wx.StaticText(self.panel,-1,u"1° Orden:", pos= (x1+180,y1+62) )
        self.orden4= wx.TextCtrl(self.panel,pos=(x1+240,y1+60),size=(60,23),style=wx.TE_READONLY)
        
        self.label5= wx.StaticText(self.panel,-1,u"2° Orden:", pos= (x1+310,y1+62) )
        self.orden5= wx.TextCtrl(self.panel,pos=(x1+370,y1+60),size=(60,23),style=wx.TE_READONLY)
        
        self.label6= wx.StaticText(self.panel,-1,u"Unidad\nPatrimonial:", pos= (x1+440,y1+56) )
        self.orden6= wx.TextCtrl(self.panel,pos=(x1+510,y1+60),size=(60,23),style=wx.TE_READONLY)
        
        self.label7= wx.StaticText(self.panel,-1,u"Departamento:", pos= (x1+180,y1+105) )      
        self.orden7= wx.TextCtrl(self.panel,pos=(x1+260,y1+100),size=(330,23),style=wx.TE_READONLY)
        
        "Boton Dependencias"
        self.imagen_btn= wx.Image(imagen[0], wx.BITMAP_TYPE_BMP).ConvertToBitmap()
        self.Button3= wx.BitmapButton(self.panel, -1, self.imagen_btn, pos=(x1+630,y1+65), size=(108,56))
        self.Button3.Bind(wx.EVT_BUTTON, self.dependencias)
        self.Button3.SetDefault() 
        
        x2= 0
        y2= 20
        
        caja3= wx.StaticBox(self.panel, -1, "Expediente", pos= (x2+50, y2+120), size=(390, 70))
        
        self.label8= wx.StaticText(self.panel,-1,u"Caratula: ", pos= (x2+60,y2+150) )        
        self.orden8= wx.Choice(self.panel,choices=list_carat,pos=(x2+110,y2+148),size=(60,23))
     
        self.label9= wx.StaticText(self.panel,-1,"Numero: ", pos= (x2+180,y2+150) )        
        self.orden9= wx.TextCtrl(self.panel,pos=(x2+240,y2+148),size=(50,23))
        
        self.label10= wx.StaticText(self.panel,-1,u"Año: ", pos= (x2+310,y2+150) )        
        self.orden10= wx.Choice(self.panel,choices=anios,pos=(x2+350,y2+148),size=(60,23))
        
        
        x3= 20
        y3= 20
        
        caja4= wx.StaticBox(self.panel, -1, "Norma Legal", pos= (x3+450, y3+120), size=(370, 70))
        
        self.label11= wx.StaticText(self.panel,-1,"Tipo: ", pos= (x3+460,y3+150) )        
        self.orden11= wx.Choice(self.panel,choices=listaN,pos=(x3+500,y3+148),size=(60,23))
        
        self.label12= wx.StaticText(self.panel,-1,"Numero: ", pos= (x3+570,y3+150) )        
        self.orden12= wx.TextCtrl(self.panel,pos=(x3+630,y3+148),size=(50,23))            

        self.label13= wx.StaticText(self.panel,-1,u"Año: ", pos= (x3+700,y3+150) )        
        self.orden13= wx.Choice(self.panel,choices=anios,pos=(x3+740,y3+148),size=(60,23))