Esempio n. 1
0
        //Log in button
        public void button1_Click(object sender, EventArgs e)
        {
            string id    = txtID.Text;
            string pass  = txtPass.Text;
            Error  error = new Error();

            if (error.checkerror(id, pass) == false)
            {
                MessageBox.Show("Tên đăng nhập hoặc mật khẩu không hợp lệ!", "Error");
            }
            else
            {
                if (error.login(id, pass))
                {
                    this.Hide();
                    GiaoDienChinh form2 = new GiaoDienChinh();
                    form2.ShowDialog();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Sai tài khoản hoặc mật khẩu!", "Error");
                }
            }
        }
        private void BtnThoat_Click(object sender, EventArgs e)
        {
            this.Hide();
            GiaoDienChinh tt = new GiaoDienChinh();

            tt.ShowDialog();
            this.Close();
        }
        private void Button7_Click(object sender, EventArgs e)
        {
            this.Hide();
            GiaoDienChinh gdc = new GiaoDienChinh();

            gdc.ShowDialog();
            this.Close();
        }
Esempio n. 4
0
        private void Button3_Click(object sender, EventArgs e)
        {
            DialogResult dlt = MessageBox.Show("Bạn có chắc là muốn thoát", "Thông báo", MessageBoxButtons.OKCancel);

            if (dlt == DialogResult.OK)
            {
                this.Hide();
                GiaoDienChinh gdc = new GiaoDienChinh();
                gdc.ShowDialog();
                this.Close();
            }
        }