개정판 59184d1b
dev issue #1240 : add create drawing Method
Change-Id: I6a163a8f0eeb1133176c4aadc7cb4b7402994294
DTI_PID/APIDConverter/DB/Project_DB.cs | ||
---|---|---|
611 | 611 |
return strConn; |
612 | 612 |
} |
613 | 613 |
|
614 |
public static string GetDirectiveValue(string name) |
|
615 |
{ |
|
616 |
string result = null; |
|
617 |
|
|
618 |
using (SqlConnection connection = new SqlConnection()) |
|
619 |
{ |
|
620 |
connection.ConnectionString = GetAvevaConnectionString_Admin(); |
|
621 |
connection.Open(); |
|
622 |
using (SqlCommand cmd = connection.CreateCommand()) |
|
623 |
{ |
|
624 |
cmd.CommandText = string.Format("select DirectiveValue from ProjectDirectives where DirectiveName = '{0}'", name); |
|
625 |
using (SqlDataReader dr = cmd.ExecuteReader()) |
|
626 |
{ |
|
627 |
if (dr.Read()) |
|
628 |
result = dr.GetString(0); |
|
629 |
} |
|
630 |
} |
|
631 |
connection.Close(); |
|
632 |
} |
|
633 |
|
|
634 |
return result; |
|
635 |
} |
|
636 |
|
|
637 |
public static DataTable GetDrawingTemplate() |
|
638 |
{ |
|
639 |
DataTable dt = new DataTable(); |
|
640 |
|
|
641 |
using (SqlConnection connection = new SqlConnection()) |
|
642 |
{ |
|
643 |
connection.ConnectionString = GetAvevaConnectionString_Reports(); |
|
644 |
connection.Open(); |
|
645 |
using (SqlCommand cmd = connection.CreateCommand()) |
|
646 |
{ |
|
647 |
cmd.CommandText = "select ID, Name,IsDWG,DateCreation,MachineName,FutureUse1,FutureUse2 from DrawingTemplates where IsDWG=0"; |
|
648 |
using (SqlDataReader dr = cmd.ExecuteReader()) |
|
649 |
dt.Load(dr); |
|
650 |
} |
|
651 |
connection.Close(); |
|
652 |
} |
|
653 |
|
|
654 |
return dt; |
|
655 |
} |
|
656 |
|
|
614 | 657 |
public static DataTable SelectStandardSymbolTable() |
615 | 658 |
{ |
616 | 659 |
DataTable dt = new DataTable(); |
내보내기 Unified diff