コード例 #1
0
        public static void InitializeConnections(DatabaseType db)
        {
            if (db == DatabaseType.Sql)
            {
                SqlConnection sql = new SqlConnection();
                Connection = sql;
            }

            else if (db == DatabaseType.TextFile)
            {
                TextConnection text = new TextConnection();
                Connection = text;
            }
        }
コード例 #2
0
 public static void InitializeConnections(bool database, bool textFiles)
 {
     if (database)
     {
         //  TODO - Set up the SQL connector properly
         SqlConnector sql = new SqlConnector();
         Connections.Add(sql);
     }
     if (textFiles)
     {
         // TODO - Create the Text Connection
         TextConnection text = new TextConnection();
         Connections.Add(text);
     }
 }
コード例 #3
0
 public static void InitializeConnections(DatabaseType db)
 {
     if (db == DatabaseType.Sql)
     {
         //TODO - Set up the SQL Connecter properly
         var sql = new SqlConnector();
         Connection = sql;
     }
     else if (db == DatabaseType.TextFile)
     {
         //TODO - Create the Text Connections
         var text = new TextConnection();
         Connection = text;
     }
 }
コード例 #4
0
 public static void InitializeConnections(bool database, bool textFiles)
 {
     if (database)
     {
         //TODO - Set up Sql Connector
         SqlConnector sql = new SqlConnector();
         Connections.Add(sql);
     }
     if (textFiles)
     {
         //TODO - Text connection
         TextConnection text = new TextConnection();
         Connections.Add(text);
     }
 }
コード例 #5
0
 public static void InitializeConnection(bool database, bool textFiles)
 {
     if (database)
     {
         // TODO - call sql database
         SqlConnection sql = new SqlConnection();
         Connections.Add(sql);
     }
     if (textFiles)
     {
         // TODO - call text files
         TextConnection text = new TextConnection();
         Connections.Add(text);
     }
 }
コード例 #6
0
        public static void InitialiseConnections(bool database, bool textFiles)
        {
            if (database)
            {
                // TODO: Set up the sql connector properly
                SQLConnector sql = new SQLConnector();
                Connections.Add(sql);
            }

            if (textFiles)
            {
                // TODO: create the text connection
                TextConnection textConnection = new TextConnection();
                Connections.Add(textConnection);
            }
        }
コード例 #7
0
        public static void InitializeConnections(bool database, bool textFiles)
        {
            if (database)
            {
                //TODO - set up sql connector properly
                SqlConnector sql = new SqlConnector();
                Connections.Add(sql);
            }

            if (textFiles)
            {
                //TODO - do something
                TextConnection text = new TextConnection();
                Connections.Add(text);
            }
        }
コード例 #8
0
        public static void InitializeConnections(DatabaseType databaseType)
        {
            if (databaseType == DatabaseType.Sql)
            {
                //TODO - Create the SQL Connection
                SqlConnection sql = new SqlConnection();
                Connection = sql;
            }

            if (databaseType == DatabaseType.TextFile)
            {
                //TODO - Create the Text Connection
                TextConnection text = new TextConnection();
                Connection = text;
            }
        }
コード例 #9
0
        public static void InitializeConnections(bool database, bool textFiles)
        {
            if (database)
            {
                // TODO: Create SQL connection.
                SqlConnector sql = new SqlConnector();
                Connectons.Add(sql);
            }

            if (textFiles)
            {
                // TODO: Create Text connection.
                TextConnection text = new TextConnection();
                Connectons.Add(text);
            }
        }
コード例 #10
0
        public static void InitializeConnections(DatabaseType connectionType)
        {
            switch (connectionType)
            {
            case DatabaseType.Sql:
            {
                SqlConnection sql = new SqlConnection();
                Connection = sql;
                break;
            }

            case DatabaseType.TextFile:
            {
                TextConnection text = new TextConnection();
                Connection = text;
                break;
            }

            default: break;
            }
        }