private void btnCancel_Click(object sender, EventArgs e) { FrmStart objFrmStart = new FrmStart(); this.Hide(); objFrmStart.Show(); }
private void btnLogin_Click(object sender, EventArgs e) { string username = txtUsername.Text; string password = txtPassword.Text; Boolean answer = db.validateUser(username, password); try { if (answer == true) { FrmStart objFrmStart = new FrmStart(); this.Hide(); objFrmStart.Show(); } else { MessageBox.Show("Invalid login."); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }