Exemplo n.º 1
0
        private void btnlogSt_Click(object sender, EventArgs e)
        {
            l.username = txtUserS.Text.Trim();
            l.password = txtPwS.Text.Trim();


            bool success = dal.loginCheck(l);

            if (success == true)
            {
                MessageBox mb = new MessageBox("Login Successfully...", sampleframe.cs.MessageBox.MsgType.success);


                if (lblUserType.Text == "Student")
                {
                    stUI ff = new stUI();
                    ff.Show();
                    this.Hide();
                    mb.Show();
                }
                else if (lblUserType.Text == "Tutor")
                {
                    tutorScreen admin = new tutorScreen();
                    admin.Show();
                    this.Hide();
                }
            }
            else
            {
                MessageBox mb = new MessageBox("Login Fail !!!....Try Again", sampleframe.cs.MessageBox.MsgType.retry);
                mb.Show();
                txtUserS.Text = "";
                txtPwS.Text   = "";
                // MessageBox.Show("Login Fail !!!....Try Again");
            }
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            l.username = txtUserS.Text.Trim();
            l.password = txtPwS.Text.Trim();


            bool success = dal.loginCheck(l);

            if (success == true)
            {
                MessageBox mb = new MessageBox("Login Successfully", sampleframe.cs.MessageBox.MsgType.success);
                mb.Show();
                //MessageBox.Show("Login Successfully");
                tutorScreen admin = new tutorScreen();
                admin.Show();
                this.Hide();
            }
            else
            {
                MessageBox mb = new MessageBox("Login Fail !!!....Try Again", sampleframe.cs.MessageBox.MsgType.retry);
                mb.Show();
                //MessageBox.Show("Login Fail !!!....Try Again");
            }
        }