예제 #1
0
파일: frmLogin.cs 프로젝트: m4ie/VC_progs
        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");
            }
        }
예제 #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");
            }
        }