private void Logar(object sender, RoutedEventArgs e) { DBInterface connection = new GetConnection().GetDBConnection(); if (connection.validateUser(TBusuario.Text, TBsenha.Text)) { var perfil = connection.findUserProfile(TBusuario.Text); switch (perfil) { case Model.Perfil.SUDO: SUDO sudo = new SUDO(); sudo.ShowDialog(); break; case Model.Perfil.GESTOR: Gestor gestor = new Gestor(); gestor.ShowDialog(); break; case Model.Perfil.SUPERVISOR: Supervisor supervisor = new Supervisor(); supervisor.ShowDialog(); break; case Model.Perfil.TRADER: Boleta trader = new Boleta(); trader.ShowDialog(); break; } } else { MessageBox.Show("Deu certo n"); } }
private void Button_Click(object sender, RoutedEventArgs e) { Boleta boletasc = new Boleta(); boletasc.Show(); }