private void logInButton_Click(object sender, EventArgs e) { if (userNameTextBox.Text != "" && passwordTextBox.Text != "") { string username = userNameTextBox.Text; string password = passwordTextBox.Text; try { if (adminManager.CheckAll(username, password)) { MainManuUI mainManuUi = new MainManuUI(); mainManuUi.Show(); this.Opacity = 0; } else { MessageBox.Show("Please give valid username & password."); } } catch (Exception exception) { MessageBox.Show(exception.Message, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } Clear(); } }
private void logInButton_Click(object sender, EventArgs e) { if (userNameTextBox.Text!=""&& passwordTextBox.Text!="") { string username=userNameTextBox.Text; string password = passwordTextBox.Text; try { if (adminManager.CheckAll(username, password)) { MainManuUI mainManuUi = new MainManuUI(); mainManuUi.Show(); this.Opacity = 0; } else { MessageBox.Show("Please give valid username & password."); } } catch (Exception exception) { MessageBox.Show(exception.Message, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } Clear(); } }