title: how to make login system C#
body: <p>i have problem with my codes here regarding with login system. when i add 1 username and password in my database, it work properly. but when i add another 1 username and password in database, my else statement will pop up twice. when 3 username and password my else statement will pop up trice. so on and so for.. here's my code.. if you have there better code than mine, please show it. </p>
  
  <pre><code>SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\JEDMARC\\Desktop\\VS v1.0.0\\Voting System v1.0.0\\Voting System v1.0.0.mdf;Integrated Security=True;User Instance=True");
      SoundPlayer t = new SoundPlayer(@"C:\Users\JEDMARC\Documents\welcome.wav");
  
      private void btnEnter_Click(object sender, EventArgs e)
      {
   if (cmbToE.Text == "HomeRoom Election" &amp;&amp; comboBox1.Text == "English")
          {
              con.Open();
  
              SqlCommand da = new SqlCommand("SELECT * FROM RegistrationTable", con);
  
              SqlDataReader reader = null;
              reader = da.ExecuteReader();
              while (reader.Read())
              {
                  if (tbUsername.Text == (reader["Username"].ToString()) &amp;&amp; tbPassword.Text == (reader["Password"].ToString()))
                  {
                      MessageBox.Show("*Choose your best candidate. Use a Combobox.\n\n*After choosing, click Submit button to pass your vote!\n\n                           VOTE WISELY!", "How to vote?", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                      UserHRForm x = new UserHRForm();
                      x.Show();
                      t.Play();
                      this.Close();
                  }
                  else
                  {
                      SystemSounds.Hand.Play();
                      MessageBox.Show("Access Denied! Account doesn't exist!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);                        
                  }
              }
          }
  }
  </code></pre>