Exemple #1
0
        private void buttonX1_Click_1(object sender, EventArgs e)
        {
            String b = "vui lòng không để trống";

            if (txt_user.Text.Length > 0 && txt_pass.Text.Length > 0)
            {
                if (kt.kiemtrataikhoan(txt_user.Text.ToString(), txt_pass.Text.ToString()) == true)
                {
                    Formmain main = new Formmain();
                    main.Tendn = txt_user.Text.ToString();
                    main.Show();
                    //Form1 m = new Form1();
                    //m.Tendn = txt_user.Text.ToString();
                    //m.Show();
                }
                else
                {
                    MessageBox.Show("Đăng nhập thất bại");
                }
            }
            else
            {
                if (txt_pass.Text.Length == 0)
                {
                    b += " mật khẩu";
                }
                else
                if (txt_user.Text.Length == 0)
                {
                    b += " tên đăng nhập";
                }
                MessageBox.Show(b);
            }
        }
Exemple #2
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            Formmain m = new Formmain();

            m.Show();
            this.WindowState = FormWindowState.Minimized;
        }