개정판 aa826cf3
dev issue #000 : edit master
DTI_PID/SPPIDConverter_AutoModeling/DB/DB.cs | ||
---|---|---|
424 | 424 |
|
425 | 425 |
return attributes.Distinct().ToList(); |
426 | 426 |
} |
427 |
|
|
428 |
public static bool CheckFluidCode(string value, out string code) |
|
429 |
{ |
|
430 |
bool bResult = false; |
|
431 |
code = ""; |
|
432 |
|
|
433 |
DBInformation dbInfo = DBInformation.GetInstance(); |
|
434 |
try |
|
435 |
{ |
|
436 |
if (dbInfo.DBType == "ORACLE") |
|
437 |
{ |
|
438 |
string connString = string.Format(oConnString, dbInfo.ServerIP, dbInfo.Port, dbInfo.Service); |
|
439 |
connString = "Data Source=" + connString + ";User Id=" + dbInfo.DBUser + ";Password=" + dbInfo.DBPassword; |
|
440 |
|
|
441 |
using (OracleConnection conn = new OracleConnection(connString)) |
|
442 |
{ |
|
443 |
conn.Open(); |
|
444 |
if (conn.State == System.Data.ConnectionState.Open) |
|
445 |
{ |
|
446 |
using (OracleCommand cmd = new OracleCommand()) |
|
447 |
{ |
|
448 |
cmd.Connection = conn; |
|
449 |
cmd.CommandText = string.Format(CultureInfo.CurrentCulture, "SELECT CODELIST_INDEX FROM {0}.CODELISTS WHERE CODELIST_NUMBER = 19 AND CODELIST_TEXT = '{1}'", dbInfo.PlantPIDDic, value); |
|
450 |
|
|
451 |
using (OracleDataReader reader = cmd.ExecuteReader()) |
|
452 |
{ |
|
453 |
while (reader.Read()) |
|
454 |
{ |
|
455 |
code = reader["CODELIST_INDEX"].ToString(); |
|
456 |
bResult = true; |
|
457 |
break; |
|
458 |
} |
|
459 |
} |
|
460 |
} |
|
461 |
} |
|
462 |
} |
|
463 |
} |
|
464 |
else |
|
465 |
{ |
|
466 |
|
|
467 |
} |
|
468 |
} |
|
469 |
catch (Exception ex) |
|
470 |
{ |
|
471 |
|
|
472 |
} |
|
473 |
|
|
474 |
return bResult; |
|
475 |
} |
|
476 | 427 |
} |
477 | 428 |
} |
DTI_PID/SPPIDConverter_AutoModeling/Model/SPPID/Symbol.cs | ||
---|---|---|
157 | 157 |
string sMappingName = symoblChild.SPPIDMAPPINGNAME; |
158 | 158 |
|
159 | 159 |
double dChildAngle = 0; |
160 |
//if (sArrow == "UP")
|
|
161 |
// dChildAngle = 0;
|
|
162 |
//else if (sArrow == "RIGHT")
|
|
163 |
// dChildAngle = 270 * Math.PI / 180;
|
|
164 |
// //dChildAngle = 90 * Math.PI / 180;
|
|
165 |
//else if (sArrow == "DOWN")
|
|
166 |
// dChildAngle = Math.PI;
|
|
167 |
//else
|
|
168 |
// dChildAngle = 90 * Math.PI / 180;
|
|
169 |
// //dChildAngle = 270 * Math.PI / 180;
|
|
160 |
if (sArrow == "UP") |
|
161 |
dChildAngle = 0; |
|
162 |
else if (sArrow == "RIGHT") |
|
163 |
dChildAngle = 270 * Math.PI / 180; |
|
164 |
//dChildAngle = 90 * Math.PI / 180; |
|
165 |
else if (sArrow == "DOWN") |
|
166 |
dChildAngle = Math.PI; |
|
167 |
else |
|
168 |
dChildAngle = 90 * Math.PI / 180; |
|
169 |
//dChildAngle = 270 * Math.PI / 180; |
|
170 | 170 |
|
171 | 171 |
LMSymbol _childLmSymbol = _placement.PIDPlaceSymbol(sMappingName, LOCATION_X, LOCATION_Y, Mirror: 0, Rotation: dChildAngle, TargetItem: SPPID_ITEM_OBJECT); |
172 | 172 |
_childLmSymbol.Commit(); |
내보내기 Unified diff