개정판 4622d687
dev issue #1230 : set mapping info
Change-Id: I164bc1d6e35560ab97dcf2afd1da03f9b658a447
DTI_PID/APIDConverter/AvevaInfo.cs | ||
---|---|---|
41 | 41 |
private static void SetSymbolInfo() |
42 | 42 |
{ |
43 | 43 |
avevaInfo.SymbolInfo = new List<SymbolInfo>(); |
44 |
|
|
44 |
DataTable dt = Project_DB.GetSymbolMappingTableOnlySymbol(); |
|
45 |
foreach (DataRow row in dt.Rows) |
|
46 |
{ |
|
47 |
SymbolInfo info = new SymbolInfo(); |
|
48 |
info.UID = DBNull.Value.Equals(row["UID"]) ? string.Empty : row["UID"].ToString(); |
|
49 |
info.NAME = DBNull.Value.Equals(row["NAME"]) ? string.Empty : row["NAME"].ToString(); |
|
50 |
info.APID_SYMBOL = DBNull.Value.Equals(row["APID_SYMBOL"]) ? string.Empty : row["APID_SYMBOL"].ToString(); |
|
51 |
info.DATA1 = DBNull.Value.Equals(row["DATA1"]) ? string.Empty : row["DATA1"].ToString(); |
|
52 |
avevaInfo.SymbolInfo.Add(info); |
|
53 |
} |
|
54 |
dt.Dispose(); |
|
45 | 55 |
} |
46 | 56 |
|
47 | 57 |
private static void SetAttributeInfo() |
48 | 58 |
{ |
49 | 59 |
avevaInfo.AttributeInfo = new List<AttributeInfo>(); |
50 |
|
|
60 |
DataTable dt = Project_DB.GetAttributeMappingTableOnlyAttribute(); |
|
61 |
foreach (DataRow row in dt.Rows) |
|
62 |
{ |
|
63 |
AttributeInfo info = new AttributeInfo(); |
|
64 |
info.UID = DBNull.Value.Equals(row["UID"]) ? string.Empty : row["UID"].ToString(); |
|
65 |
info.APID_ATTRIBUTE = DBNull.Value.Equals(row["APID_ATTRIBUTE"]) ? string.Empty : row["APID_ATTRIBUTE"].ToString(); |
|
66 |
info.APID_ATTRIBUTE_TYPE = DBNull.Value.Equals(row["APID_ATTRIBUTE_TYPE"]) ? string.Empty : row["APID_ATTRIBUTE_TYPE"].ToString(); |
|
67 |
avevaInfo.AttributeInfo.Add(info); |
|
68 |
} |
|
69 |
dt.Dispose(); |
|
51 | 70 |
} |
52 | 71 |
} |
53 | 72 |
|
내보내기 Unified diff