public static bool VerificarSenha(ref int p, string n, string s, ref MAluno u, ref MProfessor a) { bool r = false; if (n == "Admin") { r = s == "admin"; p = 0; } if (r == false) { NProfessor f = new NProfessor(); List <MProfessor> lis = f.ListarProfessor(); foreach (MProfessor x in lis) { if (x.Matricula == n && s == x.Senha) { r = true; p = 2; a = x; break; } } } if (r == false) { NAluno e = new NAluno(); List <MAluno> b = e.ListarAluno(); foreach (MAluno x in b) { if (x.Matricula == n && s == x.Senha) { r = true; p = 1; u = x; break; } } } return(r); }
public CadastroAluno() { InitializeComponent(); grid.ItemsSource = n.ListarAluno(); }