本文整理汇总了C#中ModelDoc2.GetCustomInfoType3方法的典型用法代码示例。如果您正苦于以下问题:C# ModelDoc2.GetCustomInfoType3方法的具体用法?C# ModelDoc2.GetCustomInfoType3怎么用?C# ModelDoc2.GetCustomInfoType3使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelDoc2
的用法示例。
在下文中一共展示了ModelDoc2.GetCustomInfoType3方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: sendAttributes
private void sendAttributes(ModelDoc2 model, Collection<AttributeInfo> componentsAttributesCollection, string path, string orderNumber, int fileType, string filePath, string fileName, string configuration)
{
string[] attributeNames = model.GetCustomInfoNames2(configuration);
foreach (string attributeName in attributeNames)
{
string attributeValue = model.GetCustomInfoValue(configuration, attributeName);
//Проверка записано ли свойство такого файла
AttributeInfo attributeInfo = new AttributeInfo { Path = path, AttributeName = attributeName, AttributeValue = attributeValue };
KeyValuePair<string, string> componentAttribute = new KeyValuePair<string, string>(path, attributeName);
if (!componentsAttributesCollection.Contains(attributeInfo))
{
componentsAttributesCollection.Add(attributeInfo);
//конвертация булевых атрибутов в формат БД
if (model.GetCustomInfoType3(configuration, attributeName) == 11)
attributeValue = (attributeValue == "Yes") ? "T" : "F";
//пропуск свойств без значений
if (!string.IsNullOrEmpty(attributeValue))
using (OracleCommand cmd = new OracleCommand())
{
cmd.Connection = Connection;
cmd.CommandText = "GENERAL.SWR_FILEDATA_ADD_SW";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("P_NUMAGREE", OracleDbType.Varchar2).Value = orderNumber;
cmd.Parameters.Add("P_CODEFILETYPE", OracleDbType.Int32).Value = fileType;
cmd.Parameters.Add("P_FILEPATH", OracleDbType.Varchar2).Value = filePath;
cmd.Parameters.Add("P_FILENAME", OracleDbType.Varchar2).Value = fileName;
cmd.Parameters.Add("P_IDFILEATTRIBUTE", OracleDbType.Varchar2).Value = attributeName;
cmd.Parameters.Add("P_ATTRIBUTEVALUE", OracleDbType.Varchar2).Value = attributeValue;
cmd.Parameters.Add("P_COMMIT", OracleDbType.Char).Value = 'T';
cmd.ExecuteNonQuery();
}
}
else
{
}
}
}