public static bool InsertFromQueryToTargetDB(int entityID, string targetTableName, string selectQuery)
        {
            BizDatabase bizDatabase = new BizDatabase();
            var         database    = bizDatabase.GetDatabaseByEntityID(entityID);

            if (database.DBType == enum_DBType.SQLServer)
            {
                return(InsertFromQueryToTargetSQLDB(database, targetTableName, selectQuery));
            }
            return(false);
        }
Esempio n. 2
0
 public void ShowDatabaseObjects(List <int> databaseIds)
 {
     //ItemCollection collection = null;
     //if (parentIdentity == 0)
     //    collection = treeDBObjects.Items;
     //else
     //    collection = FindTreeDBObject(treeDBObjects.Items, parentCategory, parentIdentity).Items;
     foreach (var id in databaseIds)
     {
         var       database = bizDatabase.GetDatabaseByEntityID(id);
         ObjectDTO dbObject = new ObjectDTO();
         dbObject.ObjectCategory = DatabaseObjectCategory.Database;
         dbObject.ObjectIdentity = id.ToString();
         dbObject.Title          = database.Name;
         var node = AddDBObjectsToTree(dbObject, treeDBObjects.Items);
     }
     //     var objects = bizDatabaseToObject.GetDatabaseChildObjects(parentCategory, parentIdentity);
     //  AddDBObjectsToTree(objects, collection);
 }