def carregarAlunos(self, serie, turno):
     aluno = Aluno()
     tuplaA = aluno.listaDb()
     self.listaA = []
     self.listaNome = []
     for i in tuplaA:
         if i[13] == serie and i[14] == turno:
             self.listaA += [i[0]]
             self.listaNome += [i[1]]
Пример #2
0
 def carregarAlunos(self, serie, turno):
     aluno = Aluno()
     tuplaA = aluno.listaDb()
     self.listaA = []
     self.listaNome = []
     for i in tuplaA:
         if i[13] == serie and i[14] == turno:
             self.listaA += [i[0]]
             self.listaNome += [i[1]]
 def OnGenBitmapTextButtonExcluir(self, event):
     aluno = Aluno()
     try:
         if aluno.delete(self.campoCPFA.GetValue()):
             self.zerar()
         else:
             None
     except:
         None
     event.Skip()
 def carregarAlunosTurma(self, turmaId):
     turma = Turma()
     aluno = Aluno()
     self.listaAlTurmaNome = []
     turma.carregarAluno(turmaId)
     self.listaAlTurmaId = turma.getAlunos()
     for i in self.listaAlTurmaId:
         if aluno.carregar(i):
             self.listaAlTurmaNome += [aluno.getNome()]
     self.listaAlunosSelecionados.Set(self.listaAlTurmaNome)
Пример #5
0
 def carregarAlunosTurma(self, turmaId):
     turma = Turma()
     aluno = Aluno()
     self.listaAlTurmaNome = []
     turma.carregarAluno(turmaId)
     self.listaAlTurmaId = turma.getAlunos()
     for i in self.listaAlTurmaId:
         if aluno.carregar(i):
             self.listaAlTurmaNome += [aluno.getNome()]
     self.listaAlunosSelecionados.Set(self.listaAlTurmaNome)
Пример #6
0
 def OnGenBitmapTextButtonExcluir(self, event):
     aluno = Aluno()
     try:
         if aluno.delete(self.campoCPFA.GetValue()):
             self.zerar()
         else:
             None
     except:
         None
     event.Skip()
 def carregarAlunos(self):
     aluno = Aluno()
     self.carregarAlunoComTurma()
     lista = aluno.listaDb()
     self.listaAlunos = []
     self.listaAlunosBox = []
     for i in lista:
         if i[0] in self.alunosComTurma:continue
         else:
             self.listaAlunosBox += [i[1]]
             self.listaAlunos +=[i[0]]
     self.listaAlunosTodos.Set(self.listaAlunosBox)
Пример #8
0
 def carregarAlunos(self):
     aluno = Aluno()
     self.carregarAlunoComTurma()
     lista = aluno.listaDb()
     self.listaAlunos = []
     self.listaAlunosBox = []
     for i in lista:
         if i[0] in self.alunosComTurma: continue
         else:
             self.listaAlunosBox += [i[1]]
             self.listaAlunos += [i[0]]
     self.listaAlunosTodos.Set(self.listaAlunosBox)
Пример #9
0
 def carregarAlunosPorSerie(self):
     aluno = Aluno()
     self.carregarAlunoComTurma()
     lista = aluno.listaDb()
     self.listaAlunos = []
     self.listaAlunosBox = []
     for i in lista:
         aluno.carregar(i[0])
         if i[0] in self.alunosComTurma: continue
         elif aluno.getTurno() == self.getTurno() and aluno.getSerie(
         ) == self.getSerie():
             self.listaAlunosBox += [i[1]]
             self.listaAlunos += [i[0]]
     self.listaAlunosTodos.Set(self.listaAlunosBox)
 def carregarAlunosPorSerie(self):
     aluno = Aluno()
     self.carregarAlunoComTurma()
     lista = aluno.listaDb()
     self.listaAlunos = []
     self.listaAlunosBox = []
     for i in lista:
         aluno.carregar(i[0])
         if i[0] in self.alunosComTurma:continue
         elif aluno.getTurno() == self.getTurno() and aluno.getSerie() == self.getSerie():
             self.listaAlunosBox += [i[1]]
             self.listaAlunos +=[i[0]]
     self.listaAlunosTodos.Set(self.listaAlunosBox)
Пример #11
0
 def carregarDados(self):
     aluno = Aluno()
     try:
         if aluno.carregar(self.campoCPFA.GetValue()):
             self.campoCPFA.SetValue(aluno.getCpf())
             self.campoNomeA.SetValue(aluno.getNome())
             self.campoNascimentoA.SetValue(
                 self.invertData(str(aluno.getData())))
             if aluno.getSexo() == 1:
                 self.sexoMAluno.SetValue(True)
             else:
                 self.sexoFAluno.SetValue(True)
             self.campoCEP.SetValue(aluno.getCep())
             self.campoUF.SetValue(aluno.getUf())
             self.campoCidade.SetValue(aluno.getCidade())
             self.campoBairro.SetValue(aluno.getBairro())
             self.campoEndereco.SetValue(aluno.getRua())
             self.campoNumero.SetValue(str(aluno.getNum()))
             self.campoComplemento.SetValue(aluno.getComp())
             self.campoTelefone.SetValue(aluno.getTelefone())
             self.campoCelular.SetValue(aluno.getCelular())
             self.setSerie(aluno.getSerie())
             self.setTurno(aluno.getTurno())
             self.verificador = 1
         else:
             None
     except:
         None
Пример #12
0
 def OnBotaoSalvarButton(self, event):
     aluno = Aluno()
     login = Login()
     try:
         if self.verificador == 0:
             try:
                 if self.sexoMAluno.GetValue():
                     sexo = 1
                 else:
                     sexo = 2
                 num = int(self.campoNumero.GetValue())
                 if self.campoTelefone.GetValue() != '':
                     str(int(self.campoTelefone.GetValue()))
                     tel = self.campoTelefone.GetValue()
                 else:
                     tel = ''
                 if self.campoCelular.GetValue() != '':
                     str(int(self.campoCelular.GetValue()))
                     cel = self.campoCelular.GetValue()
                 else:
                     cel = ''
                 teste = str(int(self.campoCPFA.GetValue()))
                 if self.getSerie() != 'false':
                     aluno.add(
                         self.campoCPFA.GetValue(),
                         self.campoNomeA.GetValue(),
                         self.invertData(self.campoNascimentoA.GetValue()),
                         sexo, self.campoCEP.GetValue(),
                         self.campoUF.GetValue(),
                         self.campoCidade.GetValue(),
                         self.campoBairro.GetValue(),
                         self.campoEndereco.GetValue(), num,
                         self.campoComplemento.GetValue(), self.getSerie(),
                         self.getTurno(), tel, cel)
                 else:
                     None
                 self.zerar()
             except:
                 None
         else:
             try:
                 if self.sexoMAluno.GetValue():
                     sexo = 1
                 else:
                     sexo = 2
                 num = int(self.campoNumero.GetValue())
                 if self.campoTelefone.GetValue() != '':
                     str(int(self.campoTelefone.GetValue()))
                     tel = self.campoTelefone.GetValue()
                 else:
                     tel = ''
                 if self.campoCelular.GetValue() != '':
                     cel = str(int(self.campoCelular.GetValue()))
                     cel = self.campoCelular.GetValue()
                 else:
                     cel = ''
                 teste = str(int(self.campoCPFA.GetValue()))
                 if self.getSerie() != 'false':
                     aluno.salvarEdit(
                         self.campoCPFA.GetValue(),
                         self.campoNomeA.GetValue(),
                         self.invertData(self.campoNascimentoA.GetValue()),
                         sexo, self.campoCEP.GetValue(),
                         self.campoUF.GetValue(),
                         self.campoCidade.GetValue(),
                         self.campoBairro.GetValue(),
                         self.campoEndereco.GetValue(), num,
                         self.campoComplemento.GetValue(), tel, cel,
                         self.getSerie(), self.getTurno())
                 else:
                     None
                 self.zerar()
             except:
                 None
     except:
         None
     event.Skip()
Пример #13
0
 def excluirAlunosTurma(self, alunoId):
     aluno = Aluno()
     aluno.carregar(alunoId)
     self.listaAlTurmaId.remove(alunoId)
     self.listaAlTurmaNome.remove(aluno.getNome())
 def excluirAlunosTurma(self, alunoId):
     aluno = Aluno()
     aluno.carregar(alunoId)
     self.listaAlTurmaId.remove(alunoId)
     self.listaAlTurmaNome.remove(aluno.getNome())
 def salvarAlunosTurma(self, alunoId):
     aluno = Aluno()
     if aluno.carregar(alunoId):
         self.listaAlTurmaId += [alunoId]
         self.listaAlTurmaNome += [aluno.getNome()]
     self.listaAlunosSelecionados.Set(self.listaAlTurmaNome)
Пример #16
0
 def salvarAlunosTurma(self, alunoId):
     aluno = Aluno()
     if aluno.carregar(alunoId):
         self.listaAlTurmaId += [alunoId]
         self.listaAlTurmaNome += [aluno.getNome()]
     self.listaAlunosSelecionados.Set(self.listaAlTurmaNome)
 def OnBotaoSalvarButton(self, event):
     aluno = Aluno()
     login = Login()
     try:
         if self.verificador == 0:
             try:
                 if self.sexoMAluno.GetValue():
                     sexo = 1
                 else:
                     sexo = 2
                 num = int(self.campoNumero.GetValue())
                 if self.campoTelefone.GetValue() != '':
                     str(int(self.campoTelefone.GetValue()))
                     tel = self.campoTelefone.GetValue()
                 else:
                     tel = ''
                 if self.campoCelular.GetValue() != '':
                     str(int(self.campoCelular.GetValue()))
                     cel = self.campoCelular.GetValue()
                 else:
                     cel = ''
                 teste = str(int(self.campoCPFA.GetValue()))
                 if self.getSerie() != 'false':
                     aluno.add(self.campoCPFA.GetValue(), self.campoNomeA.GetValue(), self.invertData(self.campoNascimentoA.GetValue()), sexo, self.campoCEP.GetValue(),
                               self.campoUF.GetValue(), self.campoCidade.GetValue(), self.campoBairro.GetValue(), self.campoEndereco.GetValue(), num, self.campoComplemento.GetValue(),
                               self.getSerie(), self.getTurno(), tel, cel)
                 else:
                     None
                 self.zerar()
             except:
                 None
         else:
             try:
                 if self.sexoMAluno.GetValue():
                     sexo = 1
                 else:
                     sexo = 2
                 num = int(self.campoNumero.GetValue())
                 if self.campoTelefone.GetValue() != '':
                     str(int(self.campoTelefone.GetValue()))
                     tel = self.campoTelefone.GetValue()
                 else:
                     tel = ''
                 if self.campoCelular.GetValue() != '':
                     cel = str(int(self.campoCelular.GetValue()))
                     cel = self.campoCelular.GetValue()
                 else:
                     cel = ''
                 teste = str(int(self.campoCPFA.GetValue()))
                 if self.getSerie() != 'false':
                     aluno.salvarEdit(self.campoCPFA.GetValue(), self.campoNomeA.GetValue(), self.invertData(self.campoNascimentoA.GetValue()), sexo, self.campoCEP.GetValue(),
                                      self.campoUF.GetValue(), self.campoCidade.GetValue(), self.campoBairro.GetValue(), self.campoEndereco.GetValue(), num, self.campoComplemento.GetValue(),
                                      tel, cel, self.getSerie(), self.getTurno())
                 else:
                     None
                 self.zerar()
             except:
                 None
     except:
         None
     event.Skip()
 def carregarDados(self):
     aluno = Aluno()
     try:
         if aluno.carregar(self.campoCPFA.GetValue()):
             self.campoCPFA.SetValue(aluno.getCpf())
             self.campoNomeA.SetValue(aluno.getNome())
             self.campoNascimentoA.SetValue(self.invertData(str(aluno.getData())))
             if aluno.getSexo()== 1:
                 self.sexoMAluno.SetValue(True)
             else:
                 self.sexoFAluno.SetValue(True)
             self.campoCEP.SetValue(aluno.getCep())
             self.campoUF.SetValue(aluno.getUf())
             self.campoCidade.SetValue(aluno.getCidade())
             self.campoBairro.SetValue(aluno.getBairro())
             self.campoEndereco.SetValue(aluno.getRua())
             self.campoNumero.SetValue(str(aluno.getNum()))
             self.campoComplemento.SetValue(aluno.getComp())
             self.campoTelefone.SetValue(aluno.getTelefone())
             self.campoCelular.SetValue(aluno.getCelular())
             self.setSerie(aluno.getSerie())
             self.setTurno(aluno.getTurno())
             self.verificador = 1
         else:
             None
     except:
         None