Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            DBL.User user = new DBL.User();
            user.Username1 = textBoxUsername.Text;
            user.Password1 = textBoxPassword.Text;
            if (user.IsValidUser(user))
            {
                notificationUser(textBoxUsername.Text);

                manage c = new manage(textBoxUsername.Text);
                c.Show();
                this.Hide();
            }
            else
            {
                //MessageBox.Show("Your username and password are not matched !");
                textBoxPassword.Text = "";
                textBoxUsername.Select();
                textBoxUsername.SelectAll();
                labelAlert.Text = "Your username and password are not matched !";
                notificationUserFailed();
            }
        }