private void label1_Click(object sender, EventArgs e) { this.Hide(); FormUser2 formx = new FormUser2(); formx.ShowDialog(); }
private void btnsign_Click(object sender, EventArgs e) { GetSqlConnect user = GetSqlConnect.getUser(); if (txtUserName.Text == "" || txtUserPassword.Text == "") { MessageBox.Show("Please Fill in the Fields!", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { if (user.Login(txtUserName.Text, txtUserPassword.Text) == true) { MessageBox.Show("Access Succeed!"); this.Hide(); FormUser2 form = new FormUser2(); form.ShowDialog(); } else { MessageBox.Show("User Not Found !", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }