예제 #1
0
 def OnBuscar(self, event):  # wxGlade: Principal.<event_handler>
     if self.Validate():
         con = sq3.connect('Sisep.s3db')
         con.text_factory = str  #pa quitar la U
         cur = con.cursor()
         frm = self
         Ce = frm.txtCedula.GetValue()
         cur.execute("Select * from Postulante where Cedula=:Ce",
                     {"Ce": Ce})
         rs1 = cur.fetchone()
         if rs1:
             f.ReportePostulanteI(self)
             os.system('xdg-open "ReportePostulanteIndividual.pdf"'
                       )  #works for urls too
             self.Hide()
         else:
             dlg = wx.MessageDialog(self, 'No se encontro el registro',
                                    'Atencion', wx.OK)
             dlg.ShowModal()
             dlg.Destroy()
             self.txtCedula.Clear()
예제 #2
0
 def OnTrabajadores(self, event):  # wxGlade: Principal.<event_handler>
     FR.PostulantesInternos(self)
     os.system('xdg-open "ReportePostulantesInternos.pdf"')
     self.Hide()
예제 #3
0
 def OnBitacora(self, event):  # wxGlade: Principal.<event_handler>
     FR.ReporBitacora(self)
     os.system('xdg-open "ReporteBitacora.pdf"')
     self.Hide()
예제 #4
0
 def OnAtencionC(self, event):  # wxGlade: Principal.<event_handler>
     FR.PostulantesAtencionC(self)
     os.system('xdg-open "ReportePostulantesAtencionCliente.pdf"')
     self.Hide()
예제 #5
0
 def OnRecursos(self, event):  # wxGlade: Principal.<event_handler>
     FR.PostulantesRecursos(self)
     os.system('xdg-open "ReportePostulantesRecursos.pdf"')
     self.Hide()
예제 #6
0
    def OnBuscar(self, event):  # wxGlade: Principal.<event_handler>
        if self.Validate():
            frm = self
            Cargo = frm.cobCargo.GetValue()
            campo = frm.txtDesde.GetValue()
            campo2 = frm.txtHasta.GetValue()
            dia = campo[0] + campo[1]
            mes = campo[3] + campo[4]
            ano = campo[6] + campo[7] + campo[8] + campo[9]
            dia2 = campo2[0] + campo2[1]
            mes2 = campo2[3] + campo2[4]
            ano2 = campo[6] + campo[7] + campo[8] + campo[9]
            d = date.today()
            j = int(d.year)

            if (dia > dia2 and mes == mes2) or (mes > mes2) or (ano2 > ano):
                dlg = wx.MessageDialog(
                    self, 'La fecha DESDE no debe ser mayor a HASTA',
                    'Atencion', wx.OK)
                dlg.ShowModal()
                dlg.Destroy()

            elif (dia >= "32" or dia2 >= "32") or (
                    dia >= "31" or dia2 >= "31" and
                (mes == "04" or mes2 == "04")) or (
                    dia >= "31" or dia2 >= "31" and
                    (mes == "06" or mes2 == "06")) or (
                        dia >= "31" or dia2 >= "31" and
                        (mes == "09" or mes2 == "09")) or (
                            dia >= "31" or dia2 >= "31" and
                            (mes == "11" or mes2 == "11")) or (
                                dia == "29" and mes
                                == "02") or (dia == "30" and mes == "02") or (
                                    dia == "31" and mes == "02") or (
                                        dia2 == "29" and mes2 == "02") or (
                                            dia2 == "30" and mes2 == "02") or (
                                                dia2 == "31" and mes2 == "02"):
                dlg = wx.MessageDialog(self, 'Fecha errada', 'Atencion', wx.OK)
                dlg.ShowModal()
                dlg.Destroy()

            elif (int(ano) > j) or (int(ano2) > j):

                dlg = wx.MessageDialog(self,
                                       'El año no puede ser mayor al actual',
                                       'Atencion', wx.OK)
                dlg.ShowModal()
                dlg.Destroy()

            elif Cargo == "ADMINISTRACION":
                FR.PostulantesAdministratativoFecha(self)
                os.system(
                    'xdg-open "ReportePostulantesAdministrativoFecha.pdf"')
                self.Hide()
            elif Cargo == "ASISTENTE":
                FR.PostulantesAsistentesFecha(self)
                os.system('xdg-open "ReportePostulantesAsistentesFecha.pdf"')
                self.Hide()
            elif Cargo == "CHOFER":
                FR.PostulantesChoferFecha(self)
                os.system('xdg-open "ReportePostulantesChoferFecha.pdf"')
                self.Hide()
            elif Cargo == "CAJERO":
                FR.PostulantesCajeroFecha(self)
                os.system('xdg-open "ReportePostulantesCajeroFecha.pdf"')
                self.Hide()
            elif Cargo == "RECURSOS HUMANOS":
                FR.PostulantesRecursosHFecha(self)
                os.system('xdg-open "ReportePostulantesRecursosHFecha.pdf"')
                self.Hide()
            elif Cargo == "VIGILANTE":
                FR.PostulantesVigilanteFecha(self)
                os.system('xdg-open "ReportePostulantesVigilanteFecha.pdf"')
                self.Hide()
            elif Cargo == "GERENTE VENTAS":
                FR.PostulantesGerenteVentasFecha(self)
                os.system(
                    'xdg-open "ReportePostulantesGerenteVentasFecha.pdf"')
                self.Hide()
            elif Cargo == "ASISTENTE VENTAS":
                FR.PostulantesAsistenteVentasFecha(self)
                os.system(
                    'xdg-open "ReportePostulantesAsistenteVentasFecha.pdf"')
                self.Hide()
            elif Cargo == "SERVICIO AL CLIENTE":
                FR.PostulantesServicioCFecha(self)
                os.system('xdg-open "ReportePostulantesServicioCFecha.pdf"')
                self.Hide()
예제 #7
0
 def OnAsistenteA(self, event):  # wxGlade: Principal.<event_handler>
     FR.PostulantesAsistenteA(self)
     os.system('xdg-open "ReportePostulantesAsistenteAd.pdf"')
     self.Hide()  #works for urls too
예제 #8
0
 def OnCajero(self, event):  # wxGlade: Principal.<event_handler>
     FR.PostulantesCajeroAprobado(self)
     os.system('xdg-open "ReportePostulantesCajeroAprobado.pdf"')
     self.Hide()
예제 #9
0
 def OnAdministrativo(self, event):  # wxGlade: Principal.<event_handler>
     FR.PostulantesAdministratativoAprobado(self)
     os.system('xdg-open "ReportePostulantesAdministrativoAprobado.pdf"')
     self.Hide()
예제 #10
0
 def OnCajero(self, event):  # wxGlade: Principal.<event_handler>
     FR.ReportePostulantesCajeroSeleccionados(self)
     os.system('xdg-open "ReportePostulantesCajeroSeleccionados.pdf"')
     self.Hide()
예제 #11
0
 def OnAVentas(self, event):  # wxGlade: Principal.<event_handler>
     FR.PostulantesAsistenteVReprobado(self)
     os.system('xdg-open "ReportePostulantesAsistenteVReprobado.pdf"')
     self.Hide()
예제 #12
0
 def OnUsuarios(self, event):  # wxGlade: Principal.<event_handler>
     FR.ReporUsuario(self)
     os.system('xdg-open "ReporteUsuarios.pdf"')  #works for urls too
     self.Hide()