Example #1
0
        private void btn_DangNhap_Click(object sender, EventArgs e)
        {
            TuyChon tuyChon   = new TuyChon();
            Order   nhanOrder = new Order();

            if (CheckAccount() == 1)
            {
                //SelectedText = tb_TenTaiKhoan.Text; //lấy text từ tbAccount truyền vô string SelectedText
                this.Hide();
                tuyChon.Show();
            }
            else if (CheckAccount() == 2)
            {
                //SelectedText = tb_TenTaiKhoan.Text; //lấy text từ tbAccount truyền vô string SelectedText
                this.Hide();
                nhanOrder.Show();
            }
            else
            {
                DialogResult dialog = MessageBox.Show("Error", "Thông tin nhập sai mời bạn thử lại", MessageBoxButtons.OK); //messageBox khi nhập sai
                if (dialog == DialogResult.OK)
                {
                    Application.Restart();
                }
            }
        }
        private void btn_Back_Click(object sender, EventArgs e)
        {
            TuyChon tuyChon = new TuyChon();

            this.Hide();
            this.Close();
            tuyChon.Show();
        }