private void button_authenticate_Click(object sender, EventArgs e)
        {
            if (textBox_pass.Text.Equals(""))
            {
                label_errmsg.Text      = "Please give your password!!!";
                label_errmsg.ForeColor = System.Drawing.Color.Red;
            }

            else
            {
                AuthenticationProcedure ap = new AuthenticationProcedure();

                if (ap.authenticationCheck(username, textBox_pass.Text))
                {
                    this.Hide();
                    Change_Password cp = new Change_Password(username);
                    cp.Show();
                }

                else
                {
                    label_errmsg.Text      = "Password didnot match!!! ";
                    label_errmsg.ForeColor = System.Drawing.Color.Red;
                }
            }
        }
示例#2
0
        private void button_authenticate_Click(object sender, EventArgs e)
        {
            AuthenticationProcedure ap = new AuthenticationProcedure();

            if (textBox_username.Text.Equals("") || textBox_password.Text.Equals(""))
            {
                label_errmsg.Text      = "Please give your valid username or password!!!";
                label_errmsg.ForeColor = System.Drawing.Color.Red;
            }

            else if (ap.authenticationCheck(textBox_username.Text, textBox_password.Text))
            {
                Home hm = new Home(textBox_username.Text);
                this.Hide();
                hm.Show();
            }

            else
            {
                label_errmsg.Text      = "Please give your valid username or password!!!";
                label_errmsg.ForeColor = System.Drawing.Color.Red;
            }
        }