Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //// Kiem tra ban quyen
            //cXacThucWinForms.KhoiTao(MaSanPham, ref MaDangKy);
            //if (!cXacThucWinForms.KiemTraDaDangKyBanQuyen())
            //{
            //    frmDangKy frmDangKy = new frmDangKy();
            //    frmDangKy.ShowDialog();
            //    if ((int)frmDangKy.Tag == -1)
            //        return;
            //}
            //else
            //{
            //    DaDangKy = true;
            //}
            if ((SoNgayDungThu > 0) || DaDangKy)
            {
                GetConn();
                // Giải mã mật khẩu SQL
                Password = Lib.clsAuthentication.Decrypt(Password);
                if (SetConn(Server, DataBase, User, Password) == false)
                {
                    frmConfigServer frmConfig = new frmConfigServer();
                    if (frmConfig.ShowDialog() == DialogResult.OK)
                    {
                        Application.Run(new frmMain());
                    }
                }
                else
                {
                    Application.Run(new frmMain());
                }
            }
        }
Ejemplo n.º 2
0
        private void btnConfigServer_Click(object sender, EventArgs e)
        {
            frmConfigServer frm = new frmConfigServer();

            frm.ShowDialog();
        }