Exemple #1
0
 def OnAplicarButtonButton(self, event):
     if self.verificador == 1:
         discEdit = Disciplina()
         discEdit.carregar(self.nomeDisc)
         select = self.profChoice.GetSelection()
         if (select == -1):None
         else:
             discEdit.setProfessor(self.listProfId[select][0])
         discEdit.salvarEdit(discEdit.getDisciplina(), discEdit.getProfessor())
         self.verificador = 0
         self.nomeDisc = ''
         self.nomeTextCtrl.SetValue('')
         self.carregarDisc()
     else:
         self.addDisc()
         self.carregarDisc()
     event.Skip()
Exemple #2
0
    def carregarDisciplinasTurma(self, turmaId):
        turma = Turma()
        disc = Disciplina()
        self.listaDiscTurma = []
        turma.carregar(turmaId)
        if turma.getDisciplina1() != None and disc.carregar(
                turma.getDisciplina1()):
            self.listaDiscTurma += [turma.getDisciplina1()]
        if turma.getDisciplina2() != None and disc.carregar(
                turma.getDisciplina2()):
            self.listaDiscTurma += [turma.getDisciplina2()]
        if turma.getDisciplina3() != None and disc.carregar(
                turma.getDisciplina3()):
            self.listaDiscTurma += [turma.getDisciplina3()]
        if turma.getDisciplina4() != None and disc.carregar(
                turma.getDisciplina4()):
            self.listaDiscTurma += [turma.getDisciplina4()]
        if turma.getDisciplina5() != None and disc.carregar(
                turma.getDisciplina5()):
            self.listaDiscTurma += [turma.getDisciplina5()]
        if turma.getDisciplina6() != None and disc.carregar(
                turma.getDisciplina6()):
            self.listaDiscTurma += [turma.getDisciplina6()]

        self.listaDisciplinasSelecionadas.Set(self.listaDiscTurma)
Exemple #3
0
 def addDisc(self):
     if (self.nomeTextCtrl.GetValue() == '') or (self.profChoice.GetSelection() == -1):
         self.erroTextCtrl.SetValue('Insira o nome e o professor para adicionar uma nova disciplina!')
     else:
         self.erroTextCtrl.SetValue('')
         disc = Disciplina()
         if disc.carregar(self.nomeTextCtrl.GetValue()):
             self.erroTextCtrl.SetValue('disciplina ja existe!')
         else:
             disc.setDisciplina(self.nomeTextCtrl.GetValue())
             select = self.profChoice.GetSelection()
             disc.setProfessor(self.listProfId[select][0])
             disc.add(disc.getDisciplina(), disc.getProfessor())
             self.nomeTextCtrl.SetValue('')
    def carregarDisciplinasTurma(self, turmaId):
        turma = Turma()
        disc = Disciplina()
        self.listaDiscTurma = []
        turma.carregar(turmaId)
        if turma.getDisciplina1() != None and disc.carregar(turma.getDisciplina1()):
            self.listaDiscTurma += [turma.getDisciplina1()]
        if turma.getDisciplina2() != None and disc.carregar(turma.getDisciplina2()):
            self.listaDiscTurma += [turma.getDisciplina2()]
        if turma.getDisciplina3() != None and disc.carregar(turma.getDisciplina3()):
            self.listaDiscTurma += [turma.getDisciplina3()]
        if turma.getDisciplina4() != None and disc.carregar(turma.getDisciplina4()):
            self.listaDiscTurma += [turma.getDisciplina4()]
        if turma.getDisciplina5() != None and disc.carregar(turma.getDisciplina5()):
            self.listaDiscTurma += [turma.getDisciplina5()]
        if turma.getDisciplina6() != None and disc.carregar(turma.getDisciplina6()):
            self.listaDiscTurma += [turma.getDisciplina6()]

        self.listaDisciplinasSelecionadas.Set(self.listaDiscTurma)