Ejemplo n.º 1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     //SQLConnector.SetConnectionInfo(@"(LocalDB)\MSSQLLocalDB", @"D:\Visual studio\C#\SofwareProject\PSL\QLHVdb.mdf");
     SQLConnector.SetConnectionInfo(@"DESKTOP-V2SC0F7\SQLEXPRESS", "QLHV");
     Application.Run(new FormLogin());
     //check login
     if (SQLConnector.is_login == true)
     {
         frmMenu frm = new frmMenu();
         frm.ShowDialog();
     }
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            //int a = 6;

            //if(a is int _tmp)
            //{
            //    Console.WriteLine(_tmp + 1);
            //}
            SQLConnector.SetConnectionInfo(@"(LocalDB)\MSSQLLocalDB", @"D:\Visual studio\C#\SofwareProject\PSL\QLHVdb.mdf");
            if (SQLConnector.TestConnection())
            {
                Console.WriteLine("success");
            }
            else
            {
                Console.WriteLine("fail");
            }
        }