private void BtnBack_Click(object sender, EventArgs e)
        {
            this.Hide();
            Fuction fc = new Fuction(userID);

            fc.ShowDialog();
            this.Close();
        }
        private void CbAction_SelectedIndexChanged(object sender, EventArgs e)
        {
            int index = cbAction.SelectedIndex;

            if (index == 0)
            {
                this.Hide();
                Fuction fc = new Fuction(userID);
                fc.ShowDialog();
                this.Close();
            }
            else
            {
                this.Hide();
                Login lg = new Login();
                lg.ShowDialog();
                this.Close();
            }
        }
Esempio n. 3
0
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            string username = txtUsername.Text;
            string password = txtPassword.Text;
            bool   check    = UserDAO.checkLogin(username, password);

            if (check)
            {
                this.Hide();
                Fuction fc = new Fuction(username);
                fc.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Login fail");
                txtUsername.Text = "";
                txtPassword.Text = "";
            }
        }