示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            user = textBox1.Text;
            pass = textBox2.Text;
            if (user == "" || pass == "")
            {
                MessageBox.Show("Empty Fields Detected ! Please fill up all the fields");
                return;
            }
            bool r = validate_login(user, pass);
            if (r)
            {
                MessageBox.Show("Login Successful");
                this.Hide();
                Home_Screen frm = new Home_Screen(textBox1.Text);
                frm.Show();

            }
            else
                MessageBox.Show("Incorrect Login Credentials");
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            user = textBox1.Text;
            pass = textBox2.Text;
            if (user == "" || pass == "")
            {
                MessageBox.Show("Empty Fields Detected ! Please fill up all the fields");
                return;
            }
            bool r = validate_login(user, pass);

            if (r)
            {
                MessageBox.Show("Login Successful");
                this.Hide();
                Home_Screen frm = new Home_Screen(textBox1.Text);
                frm.Show();
            }
            else
            {
                MessageBox.Show("Incorrect Login Credentials");
            }
        }