예제 #1
0
def voltarHome(id, type):
    MainWindow.close()

    if type == "administrador":
        homeAdm.startHomeAdm(id)
    else:
        homeServidor.startHomeServidor(id)
예제 #2
0
def logar():

    email = tela.lineEmail.text()
    senha = tela.lineSenha.text()

    if email == "":
        raise ValueError
    if senha == "":
        raise ValueError

    id, type = database.autenticar(email, senha)

    if id == None:
        raise UserWarning

    if type == "professor":
        MainWindow.close()
        homeProfessor.startHomeProfessor(id)

    elif type == "servidor":
        MainWindow.close()
        homeServidor.startHomeServidor(id)

    elif type == "administrador":
        MainWindow.close()
        homeAdm.startHomeAdm(id)
예제 #3
0
def voltarHome(id, type):
    MainWindow.close()
    homeAdm.startHomeAdm(id)