Beispiel #1
0
        public bool chekcDBConnection()
        {
            DBConnService  = new DBConnectionService(Properties.Settings.Default.ConnectionString);
            DBConnService2 = new DBConnectionService(Properties.Settings.Default.ConnectionString2);
            try
            {
                //DBConnService.OpenConnection();

                //DBConnService.CloseConnection();
                var data = DBConnService.Count("SELECT count(id)  From sms_modem ");
                DBConnService2.OpenConnection();
                DBConnService2.CloseConnection();
                return(true);
            } catch (Exception ex)
            {
                Console.WriteLine(ex);
                return(false);
            }
        }