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();
        }
Example #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            QuanLyKho      kho      = new QuanLyKho();
            DangNhap       dangNhap = new DangNhap();
            TuyChon        tuyChon  = new TuyChon();
            SetKhuyenMai   km       = new SetKhuyenMai();
            ThongKeDoanhSo thongke  = new ThongKeDoanhSo();
            Order          order    = new Order();

            Application.Run(dangNhap);
        }