当前位置: 首页>>代码示例>>C#>>正文


C# DIConnection.DIDataSets方法代码示例

本文整理汇总了C#中DevInfo.Lib.DI_LibDAL.Connection.DIConnection.DIDataSets方法的典型用法代码示例。如果您正苦于以下问题:C# DIConnection.DIDataSets方法的具体用法?C# DIConnection.DIDataSets怎么用?C# DIConnection.DIDataSets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevInfo.Lib.DI_LibDAL.Connection.DIConnection的用法示例。


在下文中一共展示了DIConnection.DIDataSets方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetMapServerQueries

    public static DIQueries GetMapServerQueries(string DataPrefix_UI, string LanguageCode_UI, DIConnection connection)
    {
        //TO Do GetConnection from web service
        DIQueries RetVal = null;

        try
        {
            if (connection.DIDataSets().Select(DBAvailableDatabases.AvlDBPrefix + "='" + DataPrefix_UI.Trim('_') + "'").Length == 0)
            {
                DataPrefix_UI = connection.DIDataSetDefault();
            }

            if (connection.DILanguages(DataPrefix_UI).Select(Language.LanguageCode + "='" + LanguageCode_UI + "'").Length == 0)
            {
                LanguageCode_UI = connection.DILanguageCodeDefault(DataPrefix_UI);
            }

            RetVal = new DIQueries(DataPrefix_UI, LanguageCode_UI);
        }
        catch (Exception ex)
        {
            throw ex;
        }

        return RetVal;
    }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:26,代码来源:Global.cs

示例2: OfflineDbCollection

 /// <summary>
 /// Add the access database in the collection
 /// </summary>
 /// <param name="dataFolderPath"></param>
 private void OfflineDbCollection(string dataFolderPath)
 {
     string[] DbFiles = new string[0];
     DbFiles = Directory.GetFiles(dataFolderPath, "*.mdb");
     foreach (string OfflineDatabase in DbFiles)
     {
         //-- Offline database not exists in the collection.
         if (!IsOfflineDatabaseExists(OfflineDatabase))
         {
             DIConnectionDetails OfflineConnectionDetail = new DIConnectionDetails(DIServerType.MsAccess, "", "", OfflineDatabase, USERNAME, PASSWORD);
             //-- Set the connection
             DIConnection DIConnection = new DIConnection(OfflineConnectionDetail);
             //-- Get all the datasets.
             DataTable DataSetTable = DIConnection.DIDataSets();
             DatabasePreference.OnlineConnectionDetail.OnlineDataSets OfflineDataSets = new OnlineConnectionDetail.OnlineDataSets();
             //-- add all datasets into the collection.
             foreach (DataRow Row in DataSetTable.Rows)
             {
                 OfflineDataSets.Add(new DatabasePreference.OnlineConnectionDetail.OnlineDataSet(Row[DBAvailableDatabases.AvlDBPrefix].ToString(), Row[DBAvailableDatabases.AvlDBName].ToString()));
             }
             DatabasePreference.OnlineConnectionDetail ConnectionDetail = new OnlineConnectionDetail(OfflineConnectionDetail, OfflineDataSets, Path.GetFileName(OfflineDatabase));
             //-- add the offline database details.
             this.OnlineDatabaseDetails.Add(ConnectionDetail);
         }
     }
 }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:30,代码来源:UserPreference.cs

示例3: DropDefaultIndex

        /// <summary>
        /// Drop index for ut_data table for IUSNID, areanid column
        /// </summary>
        /// <param name="sourceDBConnection"></param>
        /// <returns></returns>
        public static void DropDefaultIndex(DIConnection sourceDBConnection)
        {
            string DataPrefix = string.Empty;

            //Drop index "Index_IUSNid_<DataPrefix>data"
            foreach (DataRow row in sourceDBConnection.DIDataSets().Rows)
            {
                DataPrefix = Convert.ToString(row[DBAvailableDatabases.AvlDBPrefix]).TrimEnd("_".ToCharArray());
                sourceDBConnection.DropIndex("Index_" + Data.IUSNId + "_" + DataPrefix + "Data", DataPrefix + "_data");
                sourceDBConnection.DropIndex("Index_" + Data.AreaNId + "_" + DataPrefix + "Data", DataPrefix + "_data");
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:17,代码来源:DIDatabase.cs

示例4: GetAvailableDbName

        /// <summary>
        /// Get available database name of selected database connection
        /// </summary>
        /// <param name="dbConnection"></param>
        /// <returns></returns>
        public string GetAvailableDbName(DIConnection dbConnection)
        {
            string RetVal = string.Empty;
            DataTable DtResult = null;

            try
            {
                DtResult = dbConnection.DIDataSets();

                foreach (DataRow Row in DtResult.Rows)
                {
                    if (Convert.ToString(Row["AvlDB_Default"]).ToLower() == "true")
                    {
                        RetVal = Convert.ToString(Row["AvlDB_Name"]);
                        break;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }

            return RetVal;
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:30,代码来源:UIDatabaseHelper.cs

示例5: CreateDefaultIndex

        /// <summary>
        /// Create index for ut_data table for IUSNID, areanid column
        /// </summary>
        /// <param name="sourceDBConnection"></param>
        /// <returns></returns>
        public static void CreateDefaultIndex(DIConnection sourceDBConnection)
        {
            string DataPrefix = string.Empty;

            //Create index "Index_IUSNid_<DataPrefix>data"
            foreach (DataRow row in sourceDBConnection.DIDataSets().Rows)
            {
                DataPrefix = Convert.ToString(row[DevInfo.Lib.DI_LibDAL.Queries.DIColumns.DBAvailableDatabases.AvlDBPrefix]).TrimEnd("_".ToCharArray());
                sourceDBConnection.CreateIndex("Index_" + Data.IUSNId + "_" + DataPrefix + "Data", DataPrefix + "_data", Data.IUSNId);
                sourceDBConnection.CreateIndex("Index_" + Data.AreaNId + "_" + DataPrefix + "Data", DataPrefix + "_data", Data.AreaNId);
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:17,代码来源:DIDatabase.cs


注:本文中的DevInfo.Lib.DI_LibDAL.Connection.DIConnection.DIDataSets方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。