개정판 f6c9db1a
issue #000: From/To blank 나오는 현상 수정
Change-Id: Ib1217b8a2c32e8fea3c56f4e952d1e7337969fa3
DTI_PID/ID2PSN/PSN.cs | ||
---|---|---|
2447 | 2447 |
{ |
2448 | 2448 |
change = true; |
2449 | 2449 |
DataRow[] pathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", dataRow["OID"])); |
2450 |
int insertIndex = PathItems.Rows.IndexOf(pathItemRows.First()) + pathItemRows.Count() - 1; |
|
2450 |
//int insertIndex = PathItems.Rows.IndexOf(pathItemRows.First()) + pathItemRows.Count() - 1; |
|
2451 |
DataRow dr = pathItemRows.Last(); |
|
2452 |
if (change) |
|
2453 |
dr = pathItemRows[pathItemRows.Count() - bCount]; |
|
2454 |
|
|
2455 |
int insertIndex = PathItems.Rows.IndexOf(dr) + 1; |
|
2451 | 2456 |
|
2452 | 2457 |
Item item = PSNItem.Groups.Last().Items.Last(); |
2453 | 2458 |
try |
... | ... | |
2475 | 2480 |
|
2476 | 2481 |
tieInPointIndex++; |
2477 | 2482 |
|
2478 |
if (!bCheck)
|
|
2483 |
if (item.ItemType == ItemType.Line)
|
|
2479 | 2484 |
{ |
2480 |
if (item.ItemType == ItemType.Line) |
|
2481 |
{ |
|
2482 |
PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex + 1); |
|
2483 |
} |
|
2484 |
else |
|
2485 |
{ |
|
2486 |
PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex + 1); |
|
2487 |
PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex + 1); |
|
2488 |
} |
|
2485 |
PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex); |
|
2489 | 2486 |
} |
2490 | 2487 |
else |
2491 | 2488 |
{ |
2492 |
if (item.ItemType == ItemType.Line) |
|
2493 |
{ |
|
2494 |
PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows[pathItemRows.Count() - bCount], TO_DATA), insertIndex + 1); |
|
2495 |
} |
|
2496 |
else |
|
2497 |
{ |
|
2498 |
PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows[pathItemRows.Count() - bCount], TO_DATA), insertIndex + 1); |
|
2499 |
PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex + 1); |
|
2500 |
} |
|
2489 |
PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex); |
|
2490 |
PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex); |
|
2501 | 2491 |
} |
2502 | 2492 |
|
2493 |
//if (!bCheck) |
|
2494 |
//{ |
|
2495 |
// if (item.ItemType == ItemType.Line) |
|
2496 |
// { |
|
2497 |
// PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex + 1); |
|
2498 |
// } |
|
2499 |
// else |
|
2500 |
// { |
|
2501 |
// PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex + 1); |
|
2502 |
// PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex + 1); |
|
2503 |
// } |
|
2504 |
//} |
|
2505 |
//else |
|
2506 |
//{ |
|
2507 |
// if (item.ItemType == ItemType.Line) |
|
2508 |
// { |
|
2509 |
// PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows[pathItemRows.Count() - bCount], TO_DATA), insertIndex + 1); |
|
2510 |
// } |
|
2511 |
// else |
|
2512 |
// { |
|
2513 |
// PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows[pathItemRows.Count() - bCount], TO_DATA), insertIndex + 1); |
|
2514 |
// PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex + 1); |
|
2515 |
// } |
|
2516 |
//} |
|
2517 |
|
|
2503 | 2518 |
|
2504 | 2519 |
PSNItem.EndType = PSNType.Equipment; |
2505 | 2520 |
} |
... | ... | |
2911 | 2926 |
Status += ", Missing LineNumber_1"; |
2912 | 2927 |
result = item.MissingLineNumber1 && item.LineNumber != null && !string.IsNullOrEmpty(item.LineNumber.Name) ? item.LineNumber.Name : "Empty LineNumber"; |
2913 | 2928 |
} |
2929 |
else |
|
2930 |
result = !string.IsNullOrEmpty(item.LineNumber.Name) ? item.LineNumber.Name : "Empty LineNumber"; |
|
2914 | 2931 |
} |
2915 | 2932 |
else |
2916 | 2933 |
result = "Unknown"; |
... | ... | |
3033 | 3050 |
Status += ", Missing LineNumber_1"; |
3034 | 3051 |
result = item.MissingLineNumber1 && item.LineNumber != null && !string.IsNullOrEmpty(item.LineNumber.Name) ? item.LineNumber.Name : "Empty LineNumber"; |
3035 | 3052 |
} |
3053 |
else |
|
3054 |
result = !string.IsNullOrEmpty(item.LineNumber.Name) ? item.LineNumber.Name : "Empty LineNumber"; |
|
3036 | 3055 |
} |
3037 | 3056 |
else |
3038 | 3057 |
result = "Unknown"; |
내보내기 Unified diff