• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Connection.DIConnection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



DIConnection类属于DevInfo.Lib.DI_LibDAL.Connection命名空间,在下文中一共展示了DIConnection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SeparateTextualandNemericData

        //-- Check orgTextual_Data_value exists or not. If column exists then move textual & numeric values into their respective column.
        public static void SeparateTextualandNemericData(DIConnection dbConnection, DIQueries dbQueries)
        {
            string SqlQuery = string.Empty;
            try
            {
                if (ISColumnExists(dbConnection, Constants.Data.Orginal_Data_valueColumn, dbQueries.TablesName.Data))
                {

                    //--Update Textual value true if data value is not Numeric
                    SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " SET " + Data.IsTextualData + " = 1 WHERE NOT ISNUMERIC(" + Data.DataValue + ")";
                    dbConnection.ExecuteNonQuery(SqlQuery);

                    //-- move orgData_Value values into Data_Value
                    SqlQuery = "UPDATE " + dbQueries.TablesName.Data + "	Set " + Constants.Data.Orginal_Data_valueColumn + "=" + Data.DataValue + " WHERE " + Data.IsTextualData + " = 0";
                    dbConnection.ExecuteNonQuery(SqlQuery);

                    //--move orgTextual_Data_value into Textual_Data_value if ISTextual is true
                    SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " Set " + Constants.Data.Orginal_Textual_Data_valueColumn + " = " + Data.DataValue + " WHERE " + Data.IsTextualData + "<>0";
                    dbConnection.ExecuteNonQuery(SqlQuery);

                    //2. Remove Data_Value  column and rename orgTextual_Data_Value and orgData_Value to Textual_Data_Value and Data_value"
                    DIDataValueHelper.RemoveDataValueAndRenameOrgColumns(dbConnection, dbQueries);

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:31,代码来源:DIDataValueHelper.cs


示例2: RegistryService

    public RegistryService()
    {
        int DBNIdOut;

        if (this.Context.Request.QueryString["p"] != null && !string.IsNullOrEmpty(this.Context.Request.QueryString["p"]) &&
            int.TryParse(this.Context.Request.QueryString["p"], out DBNIdOut))
        {
            DBNId = DBNIdOut;
        }
        else
        {
            Global.GetAppSetting();
            DBNId = Convert.ToInt32(Global.GetDefaultDbNId());
        }

        if (Global.IsDSDUploadedFromAdmin(DBNId))
        {
            this.DIConnection = Global.GetDbConnection(this.Get_AssociatedDB_NId(DBNId.ToString()));
        }
        else
        {
            this.DIConnection = Global.GetDbConnection(DBNId);
        }

        this.DIQueries = new DIQueries(this.DIConnection.DIDataSetDefault(), this.DIConnection.DILanguageCodeDefault(this.DIConnection.DIDataSetDefault()));
    }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:26,代码来源:RegistryService.cs


示例3: Generate_Categorization

        public static List<ArtefactInfo> Generate_Categorization(SDMXSchemaType schemaType, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries,string IcType)
        {
            List<ArtefactInfo> RetVal;
            CategorizationUtility CategorizationUtility;

            RetVal = null;
            CategorizationUtility = null;

            try
            {
                CategorizationUtility = new CategorizationUtility(agencyId, language, header, outputFolder, DIConnection, DIQueries);
               // RetVal = CategorizationUtility.Generate_Artefact();
                RetVal = CategorizationUtility.Generate_CompleteArtefact(IcType);
                CategorizationUtility.Save_Artefacts(RetVal);
            }
            catch (Exception ex)
            {
                RetVal = null;
                throw ex;
            }
            finally
            {
            }

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


示例4: CreateInstance

        public static DIData CreateInstance(DIImportFileType importFileType, List<string> sourceFileNamesWPath,
            string tempFolderPath, DIConnection dbConnection, DIQueries dbQueries)
        {
            DIData RetVal = null;
            switch (importFileType)
            {
                case DIImportFileType.DataEntrySpreasheet:
                    break;
                case DIImportFileType.Database:
                    break;
                case DIImportFileType.Template:
                    break;
                case DIImportFileType.SDMXXml:
                    RetVal = new SDMX.SDMXXml(sourceFileNamesWPath, tempFolderPath, dbConnection, dbQueries);
                    break;
                default:
                    break;
            }

            if (RetVal != null)
            {
                RetVal.ImportFileType = importFileType;
            }
            return RetVal;
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:25,代码来源:DIDataFactory.cs


示例5: SummarySheetGenerator

 internal SummarySheetGenerator(bool isComparison,ref DIConnection dbConnection,ref DIConnection targetDBConnection,string targetFile,string sourceDB)
 {
     this.ForComparisonReport = isComparison;
     this.ReferenceDataBaseFile = sourceDB;
     this.RefDBConnection = dbConnection;
     this.TargetDBConnection = targetDBConnection;
 }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:7,代码来源:SummarySheetGenerator.cs


示例6: ExportOnlineDatabase

        internal ExportOnlineDatabase(UserSelection userSelection, DIConnection sourceDBConnection, DIQueries sourceDBQueries)
        {
            if (sourceDBConnection != null && userSelection != null)
            {
                this.UserSelection = userSelection;

                //--  Assign NIDs in userSelection.
                if (userSelection.ShowIUS)
                {
                    this.IUSNIDs = userSelection.IndicatorNIds;
                }
                else
                {
                    this.IndicatorNIDs = userSelection.IndicatorNIds;
                }

                this.AreaNIDs = userSelection.AreaNIds;
                this.TimePeriodNIDs = userSelection.TimePeriodNIds;
                this.SourceNIDs = userSelection.SourceNIds;
                this.ApplyMRD = userSelection.DataViewFilters.MostRecentData;

                this.SourceDBConnection = sourceDBConnection;
                this.SourceDBQueries = sourceDBQueries;         //new DIQueries(this.SourceDBConnection.DIDataSetDefault(), this.SourceDBConnection.DILanguageCodeDefault(this.SourceDBConnection.DIDataSetDefault()));
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:25,代码来源:ExportOnlineDatabase.cs


示例7: CategorySchemeUtility

        internal CategorySchemeUtility(CategorySchemeTypes categorySchemeType, bool completeOrSummaryFlag, string agencyId, string language, Header header, string outputFolder, Dictionary<string, string> DictIndicator, Dictionary<string, string> DictIndicatorMapping, DIConnection DIConnection, DIQueries DIQueries)
            : base(agencyId, language, header, outputFolder)
        {
            this._categorySchemeType = categorySchemeType;
            this._completeOrSummaryFlag = completeOrSummaryFlag;
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this.Language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this.Language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this.Language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }

            this._dictIndicator = DictIndicator;
            this._dictIndicatorMapping = DictIndicatorMapping;
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:30,代码来源:CategorySchemeUtility.cs


示例8: DI6ToDI5Converter

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fileNameWPath"></param>
        public DI6ToDI5Converter(string fileNameWPath)
        {
            this.DBConnection = new DIConnection(DIServerType.MsAccess, string.Empty, string.Empty, fileNameWPath, string.Empty, string.Empty);
            this.DBQueries = new DIQueries(this.DBConnection.DIDataSetDefault(), this.DBConnection.DILanguageCodeDefault("UT_"));

            this.FilenameWPath = fileNameWPath;
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:11,代码来源:DI6ToDI5Converter.cs


示例9: CreateTmpIndSearchTbl

        /// <summary>
        /// Create and insert into TmpDI7SearchIndicators table
        /// </summary>
        /// <param name="dbConnection"></param>
        /// <param name="tableNames"></param>
        /// <param name="searchIndicators"></param>
        /// <param name="isSearchForQS"></param>
        public static void CreateTmpIndSearchTbl(DIConnection dbConnection, DITables tableNames, string searchIndicators, bool isSearchForQS)
        {
            StringBuilder SBQry = new StringBuilder();
            string StrQry = string.Empty;

            string SearchLanguage = string.Empty;

            try
            {
                CacheUtility.CreateSearchIndicatorsTable(dbConnection);

                if (!string.IsNullOrEmpty(searchIndicators))
                {
                    CacheUtility.GetSplittedList(dbConnection, searchIndicators, ",", true);

                    SBQry.Remove(0, SBQry.Length);
                    SBQry.Append("INSERT INTO " + QDSConstants.QDSTables.SearchIndicators.TableName);
                    SBQry.Append(" (" + QDSConstants.QDSTables.SearchIndicators.Columns.IndicatorNId + ")");
                    SBQry.Append(" SELECT Ind."+ Indicator.IndicatorNId +" As IndicatorNId FROM "+ tableNames.Indicator +" As Ind");
                    SBQry.Append(" INNER JOIN " + QDSConstants.QDSTables.SplittedList.TableName + " L");
                    SBQry.Append(" ON Ind." + Indicator.IndicatorNId + " = L." + QDSConstants.QDSTables.SplittedList.Columns.Value);
                    StrQry = SBQry.ToString();
                    dbConnection.ExecuteNonQuery(StrQry);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:37,代码来源:DI7OfflineSPHelper.cs


示例10: GetDataQueryResponseJSON

    public string GetDataQueryResponseJSON(string dbNId, string language, string key)
    {
        string ResponseString;
        XmlDocument QueryDocument;

        ResponseString = string.Empty;
        QueryDocument = null;

        try
        {
            this.DIConnection = Global.GetDbConnection(Convert.ToInt32(dbNId));
            this.DIQueries = new DIQueries(this.DIConnection.DIDataSetDefault(), this.DIConnection.DILanguageCodeDefault(this.DIConnection.DIDataSetDefault()));

            QueryDocument = this.Get_Query(key, Constants.WSQueryStrings.ResponseFormatTypes.JSON, Constants.WSQueryStrings.SDMXFormatTypes.StructureSpecificTS, language);
            ResponseString = DATAUtility.Get_Data(QueryDocument, DataTypes.JSON, DIConnection, DIQueries);
        }
        catch (Exception ex)
        {
            Global.CreateExceptionString(ex, null);
            throw ex;
        }
        finally
        {
        }

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


示例11: ElementMapper

 public ElementMapper(DIConnection dbConnection, DIQueries dbQueries, Dictionary<TemplateMergeControlType, MergeTableInfo> mappedTables)
 {
     this.DBConnection = dbConnection;
     this.DBQueries = dbQueries;
     this.TemplateQueries = new MergeTemplateQueries(this.DBQueries.DataPrefix, this.DBQueries.LanguageCode);
     this.MappedTables = mappedTables;
 }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:7,代码来源:ElementMapper.cs


示例12: MetadataReportUtility

        internal MetadataReportUtility(string agencyId, string language, Header header, DIConnection DIConnection, DIQueries DIQueries)
        {
            this._agencyId = agencyId;
            this._header = header;
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this._language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this._language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this._language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:26,代码来源:MetadataReportUtility.cs


示例13: CodelistUtility

        internal CodelistUtility(CodelistTypes codelistType, bool completeOrSummaryFlag, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
            : base(agencyId, language, header, outputFolder)
        {
            this._codelistType = codelistType;
            this._completeOrSummaryFlag = completeOrSummaryFlag;
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this.Language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this.Language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this.Language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:27,代码来源:CodelistUtility.cs


示例14: MergeTextualandNumericDataValueColumn

        /// <summary>
        /// Rename Data_value and TextualValue column into OrgData_value and OrgTextualValue 
        /// and merge both column value into new column Data_Value
        /// </summary>
        /// <param name="dbConnection"></param>
        /// <param name="dbQueries"></param>
        public static void MergeTextualandNumericDataValueColumn(DIConnection dbConnection, DIQueries dbQueries)
        {
            try
            {
                if (!ISColumnExists(dbConnection, Constants.Data.Orginal_Data_valueColumn, dbQueries.TablesName.Data))
                {

                    //1. Rename Textual_Data_Value & Data_value  to orgTextual_Data_value & orgData_Value respectively
                    RenameOriganalDataTableColumnInDatabase(dbConnection, dbQueries, Data.TextualDataValue, Constants.Data.Orginal_Textual_Data_valueColumn, " Memo");
                    RenameOriganalDataTableColumnInDatabase(dbConnection, dbQueries, Data.DataValue, Constants.Data.Orginal_Data_valueColumn, " Double ");
                    System.Threading.Thread.Sleep(100);
                    //2. Create new column Data_Value of memo data type
                    string SqlQuery = "ALTER Table " + dbQueries.TablesName.Data + " Add Column " + Data.DataValue + " Memo NULL";
                    dbConnection.ExecuteNonQuery(SqlQuery);
                    System.Threading.Thread.Sleep(10);
                    //3. Merge all data values into Data_Value column
                    SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " SET " + Data.DataValue + "=" + Constants.Data.Orginal_Data_valueColumn;
                    dbConnection.ExecuteNonQuery(SqlQuery);

                    SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " SET " + Data.DataValue + "=" + Constants.Data.Orginal_Textual_Data_valueColumn + " WHERE " + Data.IsTextualData + "=" + true;
                    dbConnection.ExecuteNonQuery(SqlQuery);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:34,代码来源:DIDataValueHelper.cs


示例15: CategorizationUtility

        internal CategorizationUtility(string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
            : base(agencyId, language, header, outputFolder)
        {
            this._diConnection = DIConnection;
            this._diQueries = DIQueries;

            if (string.IsNullOrEmpty(language))
            {
                this.Language = this._diQueries.LanguageCode.Substring(1);
                this._multiLanguageHandlingRequired = true;
            }
            else
            {
                if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
                {
                    this.Language = language;
                    this._multiLanguageHandlingRequired = false;
                }
                else
                {
                    this.Language = this._diQueries.LanguageCode.Substring(1);
                    this._multiLanguageHandlingRequired = false;
                }
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:25,代码来源:CategorizationUtility.cs


示例16: CreateChildTbl

        public static int CreateChildTbl(DIConnection dbConnection, string languageCode)
        {
            int RetVal = -1;

            RetVal = CreateSearchResultCopyTable(dbConnection, QDSConstants.QDSTables.ChildTable.TableName, languageCode);

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


示例17: BaseQueryUtility

 internal BaseQueryUtility(Dictionary<string, string> dictUserSelections, DataReturnDetailTypes dataReturnDetailType, string agencyId, DIConnection DIConnection, DIQueries DIQueries)
 {
     this._dictUserSelections = dictUserSelections;
     this._dataReturnDetailType = dataReturnDetailType;
     this._agencyId = agencyId;
     this._diConnection = DIConnection;
     this._diQueries = DIQueries;
 }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:8,代码来源:BaseQueryUtility.cs


示例18: IUSBuilder

 public IUSBuilder(DIConnection connection, DIQueries queries)
 {
     this.DBConnection = connection;
     this.DBQueries = queries;
     this.DIIndicator = new IndicatorBuilder(connection, queries);
     this.DIUnit = new UnitBuilder(connection, queries);
     this.DISubgroupVal = new DI6SubgroupValBuilder(connection, queries);
     DIConnection.ConnectionType = this.DBConnection.ConnectionStringParameters.ServerType;
 }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:9,代码来源:IUSBuilder.cs


示例19: CreateListViewSource

        /// <summary>
        /// Returns the instance of BaseListViewSource. Based on Factory method.
        /// </summary>
        /// <param name="listType"></param>
        /// <param name="dbConnection"></param>
        /// <param name="dbQueries"></param>
        /// <param name="userprefenece"></param>
        /// <returns></returns>
        public static BaseListViewSource CreateListViewSource(ListViewType listType, DIConnection dbConnection, DIQueries dbQueries, UserPreference userprefenece)
        {
            BaseListViewSource RetVal = null;

            switch (listType)
            {
                case ListViewType.Indicator:
                    RetVal = new IndicatorListViewSource();
                    RetVal.RaiseInitializedIndicatorListViewEvent();
                    break;

                case ListViewType.Timeperiod:
                    RetVal = new TimeperiodListViewSource();
                    RetVal.RaiseInitializedTimperiodListViewEvent();
                    break;

                case ListViewType.Area:
                    RetVal = new AreaListViewSource();
                    RetVal.RaiseInitializedAreaListViewEvent();
                    break;

                case ListViewType.Source:
                    RetVal = new DISourceListViewSource();
                    RetVal.RaiseInitializedDISourceListViewEvent();
                    break;

                case ListViewType.Unit:
                    RetVal = new UnitListViewSource();
                    RetVal.RaiseInitializedUnitListViewEvent();
                    break;

                case ListViewType.SubgroupVal:
                    RetVal = new SubgroupValListViewSource();
                    RetVal.RaiseInitializedUnitListViewEvent();
                    break;

                case ListViewType.IC:
                    RetVal = new ICListViewSource();
                    break;

                default:
                    break;
            }

            if (RetVal != null)
            {
                //set variables
                RetVal.DBConnection = dbConnection;
                RetVal.DBQueries = dbQueries;
                RetVal.DIUserPreference = userprefenece;

                //set columns
                RetVal.SetColumnInfo();
            }

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


示例20: IndicatorClassificationSelections

 public IndicatorClassificationSelections(DIConnection dIConnection,DIQueries dIQueries)
 {
     // -- DAL connection object
     this.DbConnection = dIConnection;
     // -- DAL query object
     this.DbQueries = dIQueries;
     // -- Intialize the string builder object
     this._XMLString = new StringBuilder();
 }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:9,代码来源:IndicatorClassificationSelections.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Sql.Expression类代码示例发布时间:2022-05-24
下一篇:
C# SuperGrid.GridColumn类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap