/// <summary> /// Controls the Find Bug button. User must be TesterType 2 and Logged in to access this feature. /// isLoggedIn determines this. /// </summary> private void FindBugButton_Click(object sender, EventArgs e) { if (TesterType == 1) { MessageBox.Show("You cannot view bugs as a Tester."); } else if (TesterType == 2) { if (isLoggedIn == true) { Login loginForm = new Login(this); TesterDeveloperViewBug developerViewBug = new TesterDeveloperViewBug(this, LoggedInAsLabel.Text); developerViewBug.Show(); } else { MessageBox.Show("Please login to access."); } } else { MessageBox.Show("Please select your role first!"); } }
/// <summary> /// Initializes the components and establishes connection to database and opens it. /// Hides the previous menu. Calls methods. /// </summary> /// <param name="BugTracker"></param> public BugDetails(String id, String testerName, TesterDeveloperViewBug ViewBug) { InitializeComponent(); this.id = id; this.testerName = testerName; mySqlConnection = new SqlConnection(EstablishConnection.SqlConnection); mySqlConnection.Open(); this.ViewBug = ViewBug; ViewBug.Hide(); LoadBug(); LoadComments(); }