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


C# DataDictionary.setLevel方法代码示例

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


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

示例1: importInitialValues

        /// <summary>
        /// Imports the subsequence stored in the database
        /// </summary>
        /// <param name="frame"></param>
        private void importInitialValues(DataDictionary.Tests.SubSequence subSequence, int subSequenceID)
        {
            // Level is a reserved word...
            string sql = "SELECT D_LRBG, TSW_TestSeqSCItl.Level, Mode, NID_LRBG, Q_DIRLRBG, Q_DIRTRAIN, Q_DLRBG, RBC_ID, RBCPhone FROM TSW_TestSeqSCItl WHERE TestSequenceID = " + subSequenceID;

            OleDbDataAdapter adapter = new OleDbDataAdapter(sql, Connection);
            DataSet dataSet = new DataSet();

            adapter.Fill(dataSet);
            if (dataSet.Tables.Count > 0)
            {
                foreach (DataRow dataRow in dataSet.Tables[0].Rows)
                {
                    int i = 0;
                    string D_LRBG = dataRow.ItemArray.GetValue(i++) as string;
                    string Level = dataRow.ItemArray.GetValue(i++) as string;
                    string Mode = dataRow.ItemArray.GetValue(i++) as string;
                    string NID_LRBG = dataRow.ItemArray.GetValue(i++) as string;
                    string Q_DIRLRBG = dataRow.ItemArray.GetValue(i++) as string;
                    string Q_DIRTRAIN = dataRow.ItemArray.GetValue(i++) as string;
                    string Q_DLRBG = dataRow.ItemArray.GetValue(i++) as string;
                    string RBC_ID = dataRow.ItemArray.GetValue(i++) as string;
                    string RBCPhone = dataRow.ItemArray.GetValue(i++) as string;

                    subSequence.setD_LRBG(D_LRBG);
                    subSequence.setLevel(Level);
                    subSequence.setMode(Mode);
                    subSequence.setNID_LRBG(NID_LRBG);
                    subSequence.setQ_DIRLRBG(Q_DIRLRBG);
                    subSequence.setQ_DIRTRAIN(Q_DIRTRAIN);
                    subSequence.setQ_DLRBG(Q_DLRBG);
                    subSequence.setRBC_ID(RBC_ID);
                    subSequence.setRBCPhone(RBCPhone);

                    DataDictionary.Tests.TestCase testCase = (DataDictionary.Tests.TestCase)DataDictionary.Generated.acceptor.getFactory().createTestCase();
                    testCase.Name = "Setup";
                    subSequence.appendTestCases(testCase);

                    DataDictionary.Tests.Step initializeTrainDataStep = (DataDictionary.Tests.Step)DataDictionary.Generated.acceptor.getFactory().createStep(); ;
                    initializeTrainDataStep.setTCS_Order(0);
                    initializeTrainDataStep.setDistance(0);
                    initializeTrainDataStep.setDescription("Initialize train data");
                    initializeTrainDataStep.setTranslationRequired(true);
                    testCase.appendSteps(initializeTrainDataStep);

                    DataDictionary.Tests.Step setupStep = (DataDictionary.Tests.Step)DataDictionary.Generated.acceptor.getFactory().createStep(); ;
                    setupStep.setTCS_Order(0);
                    setupStep.setDistance(0);
                    setupStep.setDescription("Setup test sequence");
                    setupStep.setTranslationRequired(true);
                    testCase.appendSteps(setupStep);

                    DataDictionary.Tests.Step manualSetupStep = (DataDictionary.Tests.Step)DataDictionary.Generated.acceptor.getFactory().createStep(); ;
                    manualSetupStep.setTCS_Order(0);
                    manualSetupStep.setDistance(0);
                    manualSetupStep.setDescription("Manual setup test sequence");
                    manualSetupStep.setTranslationRequired(true);
                    testCase.appendSteps(manualSetupStep);
                }
            }
            else
            {
                Log.Error("Cannot find entry in table TSW_TestSeqSCItl WHERE TestSequenceID = " + subSequenceID);
            }
        }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:69,代码来源:TestImporter.cs


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