private void button10_Click(object sender, EventArgs e) { User_Home obj = new User_Home(); obj.Show(); this.Close(); }
private void button2_Click(object sender, EventArgs e) { SqlDataAdapter sda = new SqlDataAdapter("Select * From UserList Where User_Name='" + UsernametextBox.Text + "'and Password='******' ", con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows.Count == 1) { User_Home obj = new User_Home(); obj.Show(); this.Hide(); } else { MessageBox.Show("Invalid Id or Psss", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Error); } }