Пример #1
0
        private void logout_Click(object sender, EventArgs e)
        {
            MenuMaster parentForm = (MenuMaster)this.MdiParent;

            parentForm.Visible = false;
            FormLogin login = new FormLogin();

            login.Show();
        }
Пример #2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string id, pass;

            id   = tbLogin.Text;
            pass = tbPassword.Text;
            if (kon.login(id, pass))
            {
                MessageBox.Show("Login success");
                Visible = false;
                MenuMaster m = new MenuMaster();
                m.ShowDialog();
            }
            else
            {
                MessageBox.Show("Invalid Username Or Password");
            }
        }