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

    if type == "administrador":
        homeAdm.startHomeAdm(id)
    else:
        homeServidor.startHomeServidor(id)
Beispiel #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)
Beispiel #3
0
def voltarHome(id):
    MainWindow.close()
    homeServidor.startHomeServidor(id)