개정판 69b7387a
dev issue #498 : OPC Button 추가 및 cs File 추가
Change-Id: I1b3a1cb59c69134d794fe7719b40ad5713060c72
DTI_PID/SPPIDConverter/DB/Project_DB.cs | ||
---|---|---|
647 | 647 |
} |
648 | 648 |
return true; |
649 | 649 |
} |
650 |
|
|
651 |
public static bool InsertDrawingInfo() |
|
652 |
{ |
|
653 |
Project_Info projectInfo = Project_Info.GetInstance(); |
|
654 |
using (SQLiteConnection connection = new SQLiteConnection(string.Format(CultureInfo.CurrentCulture, "Data Source = {0}", projectInfo.DBFilePath))) |
|
655 |
{ |
|
656 |
try |
|
657 |
{ |
|
658 |
connection.Open(); |
|
659 |
using (SQLiteTransaction transaction = connection.BeginTransaction()) |
|
660 |
{ |
|
661 |
try |
|
662 |
{ |
|
663 |
//using (SQLiteCommand cmd = connection.CreateCommand()) |
|
664 |
//{ |
|
665 |
// cmd.CommandText = string.Format("INSERT OR REPLACE INTO {0} (UID, LOCATION, LEADERLINE) VALUES (@UID, @LOCATION, @LEADERLINE)", SPPID_LABEL_INFO_TABLE); |
|
666 |
// cmd.Parameters.AddWithValue("@UID", item.Item1); |
|
667 |
// cmd.Parameters.AddWithValue("@LOCATION", item.Item2); |
|
668 |
// cmd.Parameters.AddWithValue("@LEADERLINE", item.Item3); |
|
669 |
// cmd.ExecuteNonQuery(); |
|
670 |
//} |
|
671 |
//transaction.Commit(); |
|
672 |
//connection.Close(); |
|
673 |
} |
|
674 |
catch (Exception ex) |
|
675 |
{ |
|
676 |
transaction.Rollback(); |
|
677 |
} |
|
678 |
finally |
|
679 |
{ |
|
680 |
transaction.Dispose(); |
|
681 |
} |
|
682 |
} |
|
683 |
} |
|
684 |
catch (Exception ex) |
|
685 |
{ |
|
686 |
return false; |
|
687 |
} |
|
688 |
finally |
|
689 |
{ |
|
690 |
connection.Dispose(); |
|
691 |
} |
|
692 |
} |
|
693 |
return true; |
|
694 |
} |
|
650 | 695 |
} |
651 | 696 |
} |
내보내기 Unified diff