private void UserSettingsButton_Click(object sender, EventArgs e) { UserBox.SelectedIndex = 2; PasswordPanel.Show(); StudentPanel.Hide(); TeachersPanel.Hide(); AdministratorPanel.Hide(); DepartmentPanel.Hide(); label2.Hide(); UserBox.Hide(); }
private void UserBox_SelectedIndexChanged(object sender, EventArgs e) { try { string current = selectedUser(); if (current == "Administratora") { AdministratorPanel.Show(); label2.Show(); UserBox.Show(); StudentPanel.Hide(); TeachersPanel.Hide(); PasswordPanel.Hide(); DepartmentPanel.Hide(); } if (current == "Nastavnika") { TeachersPanel.Show(); label2.Show(); UserBox.Show(); StudentPanel.Hide(); AdministratorPanel.Hide(); PasswordPanel.Hide(); DepartmentPanel.Hide(); } if (current == "Ucenika i roditelja") { StudentPanel.Show(); label2.Show(); UserBox.Show(); TeachersPanel.Hide(); AdministratorPanel.Hide(); PasswordPanel.Hide(); DepartmentPanel.Hide(); } if (current == "Odjeljenja i razrednici") { DepartmentPanel.Show(); label2.Show(); UserBox.Show(); StudentPanel.Hide(); TeachersPanel.Hide(); AdministratorPanel.Hide(); PasswordPanel.Hide(); } } catch (Exception exception) { MessageBox.Show(exception.Message); } }