def buscarProf(self):
     prof = Professor()
     self.listaProf = prof.listaDb()
     listaBox = []
     for i in self.listaProf:
         listaBox += [i[1]]
     self.profListBox.Set(listaBox)
 def buscarProf(self):
     prof = Professor()
     self.listaProf = prof.listaDb()
     listaBox = []
     for i in self.listaProf:
         listaBox += [i[1]]
     self.profListBox.Set(listaBox)
 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)
Exemple #4
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)
Exemple #5
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)
    def OnBotaoExcluirButton(self, event):
        prof = Professor()
        if self.campoCPF.GetValue() != '':
            if prof.carregar(self.campoCPF.GetValue()):
                prof.delete(self.campoCPF.GetValue())
                self.erroText.SetLabel('Excluido com Sucesso!')
                self.zerar()
            else:
                self.erroText.SetLabel('CPF nao encontrado!')
                return 0
        else:
            self.erroText.SetLabel('Insira um CPF para excluir um Professor!')
            return 0

        event.Skip()
 def OnBotaoExcluirButton(self, event):
     prof = Professor()
     if self.campoCPF.GetValue() != '':
         if prof.carregar(self.campoCPF.GetValue()):
             prof.delete(self.campoCPF.GetValue())
             self.erroText.SetLabel('Excluido com Sucesso!')
             self.zerar()
         else:
             self.erroText.SetLabel('CPF nao encontrado!')
             return 0
     else:
         self.erroText.SetLabel('Insira um CPF para excluir um Professor!')
         return 0
     
     event.Skip()
    def OnBotaoEditarButton(self, event):
        prof = Professor()
        login = Login()
        sexo = 0

        if self.campoCPF.GetValue() == '' or len(
                self.campoCPF.GetValue()) != 11:
            self.erroText.SetLabel('Preencha o campo CPF corretamente!')
            return 0
        elif self.verificador() == False:
            self.erroText.SetLabel('Preencha os campos corretamente!')
            return 0
        elif self.campoSenha.GetValue() != self.campoConfirmeSenha.GetValue():
            self.erroText.SetLabel('Preencha o campo Senha corretamente!')
            return 0
        else:
            if self.botaoMasc.GetValue():
                sexo = 1
            else:
                sexo = 2
            data = self.campoNascimento.GetValue().split('-')
            nasc = ''
            for i in range(len(data) - 1, -1, -1):
                if nasc == '':
                    nasc += data[i]
                else:
                    nasc += '-' + data[i]
            prof.salvarEdit(self.campoCPF.GetValue(),
                            self.campoNome.GetValue(), nasc, sexo,
                            self.campoCep.GetValue(), self.campoUF.GetValue(),
                            self.campoCidade.GetValue(),
                            self.campoBairro.GetValue(),
                            self.campoEndereco.GetValue(),
                            int(self.campoNumero.GetValue()),
                            self.campoComplemento.GetValue(),
                            self.campoFixo.GetValue(),
                            self.campoCelular.GetValue())
            if self.campoSenha.GetValue(
            ) != '' and self.campoConfirmeSenha.GetValue() != '':
                None
            else:
                if login.carregar(self.campoCPF.GetValue()):
                    login.salvarEdit(login.getLogin(),
                                     self.campoSenha.GetValue(),
                                     login.getTipo())
            self.erroText.SetLabel('Editado com Sucesso!')
        self.zerar()
        event.Skip()
    def OnBotaoEditarButton(self, event):
        prof = Professor()
        login = Login()
        sexo = 0

        if self.campoCPF.GetValue() == '' or len(self.campoCPF.GetValue()) != 11:
            self.erroText.SetLabel('Preencha o campo CPF corretamente!')
            return 0
        elif self.verificador() == False:
            self.erroText.SetLabel('Preencha os campos corretamente!')
            return 0
        elif self.campoSenha.GetValue() != self.campoConfirmeSenha.GetValue():
            self.erroText.SetLabel('Preencha o campo Senha corretamente!')
            return 0
        else:
            if self.botaoMasc.GetValue():
                sexo = 1
            else:
                sexo = 2
            data = self.campoNascimento.GetValue().split('-')
            nasc = ''
            for i in range(len(data)-1, -1, -1):
                if nasc == '':
                    nasc += data[i]
                else:
                    nasc += '-' + data[i]
            prof.salvarEdit(self.campoCPF.GetValue(), self.campoNome.GetValue(), nasc, sexo, self.campoCep.GetValue(), self.campoUF.GetValue(),
                            self.campoCidade.GetValue(), self.campoBairro.GetValue(), self.campoEndereco.GetValue(), int(self.campoNumero.GetValue()),
                            self.campoComplemento.GetValue(), self.campoFixo.GetValue(), self.campoCelular.GetValue())
            if self.campoSenha.GetValue() != '' and self.campoConfirmeSenha.GetValue() != '':
                None
            else:
                if login.carregar(self.campoCPF.GetValue()):
                    login.salvarEdit(login.getLogin(), self.campoSenha.GetValue(), login.getTipo())
            self.erroText.SetLabel('Editado com Sucesso!')
        self.zerar()
        event.Skip()
Exemple #10
0
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,
    wxID_FRAMEGERENCIARHORARIOCAMPOQUA2,
    def buscaCpfBox(self):
        prof = Professor()

        if self.campoCPF.GetValue() == '':
            self.erroText.SetLabel('Preencha o campo CPF corretamente!')
            return 0
        else:
            if prof.carregar(self.campoCPF.GetValue()):
                None
            else:
                self.erroText.SetLabel('CPF nao encontrado!')
                return 0
        data = str(prof.getData()).split('-')
        nasc = ''
        for i in range(len(data) - 1, -1, -1):
            if nasc == '':
                nasc += data[i]
            else:
                nasc += '-' + data[i]
        self.campoNascimento.SetValue(nasc)
        self.campoNome.SetValue(prof.getNome())

        if prof.getSexo == 2:
            self.botaoFeminino.SetValue(True)
        else:
            self.botaoMasc.SetValue(True)

        self.campoCep.SetValue(str(prof.getCep()))
        self.campoEndereco.SetValue(prof.getRua())
        self.campoBairro.SetValue(prof.getBairro())
        self.campoCidade.SetValue(prof.getCidade())
        self.campoNumero.SetValue(str(prof.getNum()))
        self.campoUF.SetValue(prof.getUf())
        if prof.getComp() == None:
            None
        else:
            self.campoComplemento.SetValue(prof.getComp())

        if prof.getTelefone() == None:
            None
        else:
            self.campoFixo.SetValue(str(prof.getTelefone()))

        if prof.getCelular() == None:
            None
        else:
            self.campoCelular.SetValue(str(prof.getCelular()))
        self.erroText.SetLabel('Carregado com Sucesso!')
Exemple #12
0
 def carregarProf(self):
     prof = Professor()
     self.listProfId = prof.listaDb()
     self.listProf = []
     for i in self.listProfId:
         self.listProf += [i[1]]
 def buscaCpfBox(self):
     prof = Professor()
     
     if self.campoCPF.GetValue() == '':
         self.erroText.SetLabel('Preencha o campo CPF corretamente!')
         return 0
     else:
         if prof.carregar(self.campoCPF.GetValue()):
             None
         else:
             self.erroText.SetLabel('CPF nao encontrado!')
             return 0
     data = str(prof.getData()).split('-')
     nasc = ''
     for i in range(len(data)-1, -1, -1):
         if nasc == '':
             nasc += data[i]
         else:
             nasc += '-' + data[i]
     self.campoNascimento.SetValue(nasc)
     self.campoNome.SetValue(prof.getNome())
     
     if prof.getSexo == 2:
         self.botaoFeminino.SetValue(True)
     else:
         self.botaoMasc.SetValue(True)
         
     self.campoCep.SetValue(str(prof.getCep()))
     self.campoEndereco.SetValue(prof.getRua())
     self.campoBairro.SetValue(prof.getBairro())
     self.campoCidade.SetValue(prof.getCidade())
     self.campoNumero.SetValue(str(prof.getNum()))
     self.campoUF.SetValue(prof.getUf())
     if prof.getComp() == None:
         None
     else:
         self.campoComplemento.SetValue(prof.getComp())
         
     if prof.getTelefone() == None:
         None
     else:
         self.campoFixo.SetValue(str(prof.getTelefone()))
         
     if prof.getCelular() == None:
         None
     else:
         self.campoCelular.SetValue(str(prof.getCelular()))
     self.erroText.SetLabel('Carregado com Sucesso!')