개정판 a999464f
dev issue #1225 : end line mapping
Change-Id: I458ff370c089709148de81c3d918680a09eedfbd
DTI_PID/APIDConverter/Model/PlantItem/Document.cs | ||
---|---|---|
526 | 526 |
{ |
527 | 527 |
return LINES.Find(x => x.UID == uid); |
528 | 528 |
} |
529 |
|
|
530 |
public bool SetAvevaInfo(DataTable lineMappingTable) |
|
531 |
{ |
|
532 |
bool result = true; |
|
533 |
foreach (var item in LINES) |
|
534 |
{ |
|
535 |
DataRow[] rows = lineMappingTable.Select(string.Format("UID = '{0}'", item.TYPEUID)); |
|
536 |
if (rows.Length == 1 && !DBNull.Value.Equals(rows[0]["APID_SYMBOL"]) && !string.IsNullOrEmpty((string)rows[0]["APID_SYMBOL"])) |
|
537 |
{ |
|
538 |
item.Aveva = new AvevaLineInfo(); |
|
539 |
item.Aveva.Name = (string)rows[0]["APID_SYMBOL"]; |
|
540 |
item.Aveva.Start_X = item.Start_X; |
|
541 |
item.Aveva.Start_Y = item.Start_Y; |
|
542 |
item.Aveva.End_X = item.End_X; |
|
543 |
item.Aveva.End_Y = item.End_Y; |
|
544 |
} |
|
545 |
else |
|
546 |
{ |
|
547 |
result = false; |
|
548 |
} |
|
549 |
} |
|
550 |
|
|
551 |
return result; |
|
552 |
} |
|
529 | 553 |
} |
530 | 554 |
} |
내보내기 Unified diff