/// <summary>
        ///
        /// </summary>
        /// <param name="dataFile"></param>
        /// <param name="connectionType"></param>
        /// <returns></returns>
        internal static IDataAccess GetDataAccessLayer(string dataFile, string connectionType)
        {
            IDataAccess dataAccessLayer = null;

            if (String.Compare(connectionType.Trim().ToUpper(), "TEXT") == 0)
            {
                dataAccessLayer = new FileSystemDataMgr(dataFile);
            }
            else if (String.Compare(connectionType.Trim().ToUpper(), "SQL") == 0)
            {
                dataAccessLayer = new SqlDataMgr();
            }
            return(dataAccessLayer);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="dataFile"></param>
        /// <param name="connectionType"></param>
        /// <returns></returns>
        internal static DataAccessLayerBase GetDataAccessLayer(string dataFile, string connectionType)
        {
            DataAccessLayerBase dataAccessLayer = null;

            // ReSharper disable once StringCompareIsCultureSpecific.1
            if (String.Compare(connectionType.Trim().ToUpper(), "TEXT") == 0)
            {
                dataAccessLayer = new FileSystemDataMgr(dataFile);
            }
            // ReSharper disable once StringCompareIsCultureSpecific.1
            else if (String.Compare(connectionType.Trim().ToUpper(), "SQL") == 0)
            {
                dataAccessLayer = new SqlDataMgr();
            }
            return(dataAccessLayer);
        }