コード例 #1
0
 def delDisc(self):
     if self.discListBox.GetSelections() == ():
         self.erroTextCtrl.SetValue('Selecione uma disciplina para deletar!')
     else:
         self.erroTextCtrl.SetValue('')
         disc = Disciplina()
         disc.delete(self.listDisc[self.discListBox.GetSelections()[-1]][0])
コード例 #2
0
 def carregarDisciplinas(self):
     disc = Disciplina()
     prof = Professor()
     self.listDisc = disc.listaDb()
     self.listDiscBox = []
     for i in self.listDisc:
         prof.carregar(i[1])
         self.listDiscBox += [str(i[0]) + ' - ' + str(prof.getNome())]
     self.listaDisciplinasTodas.Set(self.listDiscBox)
コード例 #3
0
 def carregarDisciplinas(self):
     disc = Disciplina()
     prof = Professor()
     self.listDisc = disc.listaDb()
     self.listDiscBox = []
     for i in self.listDisc:
         prof.carregar(i[1])
         self.listDiscBox += [str(i[0]) + ' - ' + str(prof.getNome())]
     self.listaDisciplinasTodas.Set(self.listDiscBox)
コード例 #4
0
 def carregarDisc(self):
     disc = Disciplina()
     prof = Professor()
     self.listDisc = disc.listaDb()
     listDiscBox = []
     self.listDiscId = []
     for i in self.listDisc:
         prof.carregar(i[1])
         listDiscBox += [str(i[0]) + ' - ' + str(prof.getNome())]
     self.discListBox.Set(listDiscBox)
コード例 #5
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)
コード例 #6
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()
コード例 #7
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)
コード例 #8
0
temp = ''
for i in range(len(lista)):
    if i != len(lista) - 1:
        temp += lista[i]
        temp += '\\'
    else:
        temp += 'Modules'
sys.path[0] = temp

from newTurma import Turma
from newProfessor import Professor
from newDisciplina import Disciplina
sys.path[0] = original

turma = Turma()
disciplina = Disciplina()
professor = Professor()


def create(parent):
    return FrameGerenciarHorario(parent)


[
    wxID_FRAMEGERENCIARHORARIO,
    wxID_FRAMEGERENCIARHORARIOBOTAOAPLICAR,
    wxID_FRAMEGERENCIARHORARIOBOTAOCANCELAR,
    wxID_FRAMEGERENCIARHORARIOBOTAOVOLTAR,
    wxID_FRAMEGERENCIARHORARIOCAIXAPROFESSOR,
    wxID_FRAMEGERENCIARHORARIOCAIXASERIE,
    wxID_FRAMEGERENCIARHORARIOCAMPOQUA1,
コード例 #9
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('')