Exemplo n.º 1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            bool validLogin = checkLogin(txtUsername.Text, txtPassword.Text);

            if (validLogin == true)
            {
                frmSchedule frmSchedule = new frmSchedule();
                frmLogin    frmLog      = new frmLogin();
                frmLog.Hide();
                frmSchedule.Show();
            }
            else
            {
                MessageBox.Show("Username or password is incorrect");
            }
        }
Exemplo n.º 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            bool validLogin = checkLogin(txtUsername.Text, txtPassword.Text);

            if (validLogin == true)
            {
                MessageBox.Show("Login Successful");
                frmSchedule frmSchedule = new frmSchedule();
                //   frmLogin frmLog = new frmLogin();
                //  frmLog.Hide();
                frmSchedule.SetDesktopLocation(0, 0);
                frmSchedule.Show();
                frmSchedule.Activate();

                Hide();
            }
            else
            {
                MessageBox.Show("Username or password is incorrect");
            }
        }