Exemplo n.º 1
0
        public clsDBUltity(bool blnCreateNew = false)
        {
            _blnCreateNew = blnCreateNew;

            if (!blnCreateNew)
            {
                _db = clsDBCore.getInstance();
            }
            else
            {
                _db = new clsDBCore(ConnectionString);
                _db.Open();
            }
        }
Exemplo n.º 2
0
 public static clsDBCore getInstance(string connString = "")
 {
     if (_dbCore == null)
     {
         try
         {
             _dbCore = new clsDBCore(connString);
             _dbCore.Open();
         }
         catch (Exception ex)
         {
             Console.WriteLine("getInstance: " + ex.Message);
         }
     }
     return(_dbCore);
 }