本文整理汇总了C#中DataDictionary.getTCS_Order方法的典型用法代码示例。如果您正苦于以下问题:C# DataDictionary.getTCS_Order方法的具体用法?C# DataDictionary.getTCS_Order怎么用?C# DataDictionary.getTCS_Order使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataDictionary
的用法示例。
在下文中一共展示了DataDictionary.getTCS_Order方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: importStepMessages
/// <summary>
/// Imports all the messages used by this step
/// </summary>
/// <param name="aStep"></param>
private void importStepMessages(DataDictionary.Tests.Step aStep)
{
string sql = "SELECT TCSOrder, MessageOrder, MessageType, Var_Name, Var_Value FROM TSW_MessageHeader ORDER BY MessageOrder, Var_Row";
OleDbDataAdapter adapter = new OleDbDataAdapter(sql, Connection);
DataSet dataSet = new DataSet();
adapter.Fill(dataSet);
if (dataSet.Tables.Count > 0)
{
int messageNumber = 0;
DataDictionary.Tests.DBElements.DBMessage message = null;
int order = -1;
foreach (DataRow dataRow in dataSet.Tables[0].Rows)
{
object[] items = dataRow.ItemArray;
order = (int)items[0];
if (order == aStep.getTCS_Order())
{
short messageOrder = (short)items[1];
if (messageNumber != messageOrder) // we create a new Message
{
if (messageNumber != 0)
{
aStep.AddMessage(message);
importPackets(message, order);
}
short messageTypeNumber = (short)items[2];
DataDictionary.Generated.acceptor.DBMessageType messageType = DataDictionary.Generated.acceptor.DBMessageType.defaultDBMessageType;
switch (messageTypeNumber)
{
case 0:
messageType = DataDictionary.Generated.acceptor.DBMessageType.aEUROBALISE;
break;
case 1:
messageType = DataDictionary.Generated.acceptor.DBMessageType.aEUROLOOP;
break;
case 2:
messageType = DataDictionary.Generated.acceptor.DBMessageType.aEURORADIO;
break;
}
message = (DataDictionary.Tests.DBElements.DBMessage)DataDictionary.Generated.acceptor.getFactory().createDBMessage();
message.MessageOrder = messageOrder;
message.MessageType = messageType;
messageNumber = messageOrder;
}
DataDictionary.Tests.DBElements.DBField field = (DataDictionary.Tests.DBElements.DBField)DataDictionary.Generated.acceptor.getFactory().createDBField();
string variable = items[3] as string;
if (variable != null)
{
field.Variable = variable;
}
string value = items[4] as string;
if (value != null)
{
field.Value = DataDictionary.Tests.Translations.Translation.format_decimal(value);
}
message.AddField(field);
}
}
if (message != null)
{
aStep.AddMessage(message);
importPackets(message, aStep.getTCS_Order());
}
}
}