markus / KCOM / Events / Load.cs @ 787a4489
이력 | 보기 | 이력해설 | 다운로드 (3.67 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.IO; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
//using MarkupToPDF.Service; |
7 |
using IKCOM; |
8 |
using KCOMDataModel.DataModel; |
9 |
using KCOMDataModel.Common; |
10 |
using System.Windows.Controls; |
11 |
using MarkupToPDF.Controls.Parsing; |
12 |
//강인구 추가 |
13 |
namespace KCOM.Event |
14 |
{ |
15 |
public class Load |
16 |
{ |
17 | |
18 |
public string document_id |
19 |
{ |
20 |
get; |
21 |
set; |
22 |
} |
23 |
public int Page_No |
24 |
{ |
25 |
get; |
26 |
set; |
27 |
} |
28 |
public string User_Id |
29 |
{ |
30 |
get; |
31 |
set; |
32 |
} |
33 |
public string DisplayColor |
34 |
{ |
35 |
get; |
36 |
set; |
37 |
} |
38 |
public string Markupinfoid |
39 |
{ |
40 |
get; |
41 |
set; |
42 |
} |
43 | |
44 |
//마크업 불러오기 |
45 |
public void Markup_Load(Canvas printCanvas) |
46 |
{ |
47 |
LayerControl layerControl = new LayerControl(); |
48 |
using (CIEntities Entity = new CIEntities(KCOMDataModel.Common.ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString())) |
49 |
{ |
50 |
DOCINFO doc_info = new DOCINFO(); |
51 |
List<string> markup_info = new List<string>(); |
52 |
MARKUP_INFO_VERSION markup_info_version = new MARKUP_INFO_VERSION(); |
53 |
//string markupdata = ""; |
54 |
List<string> markupdata = new List<string>(); |
55 | |
56 |
#region Docinfo정보 가져오기 |
57 | |
58 |
//doc_info = (from info in Entity.DOCINFO |
59 |
// where info.DOCUMENT_ID == document_id |
60 |
// select info).First(); |
61 |
#endregion |
62 | |
63 |
#region Markup정보 가져오기 |
64 | |
65 |
//if (User_Id == null) |
66 |
//{ |
67 |
// markup_info = (from info in Entity.MARKUP_INFO |
68 |
// where info.DOCINFO_ID == doc_info.ID |
69 |
// select info.ID).ToList(); |
70 |
//} |
71 |
//else |
72 |
//{ |
73 |
// markup_info = (from info in Entity.MARKUP_INFO |
74 |
// where info.DOCINFO_ID == doc_info.ID |
75 |
// && info.USER_ID == User_Id |
76 |
// select info.ID).ToList(); |
77 |
//} |
78 | |
79 | |
80 |
//foreach (string id in markup_info) |
81 |
//{ |
82 |
//try |
83 |
//{ |
84 |
markup_info_version = (from version in Entity.MARKUP_INFO_VERSION |
85 |
where version.MARKUPINFO_ID == Markupinfoid |
86 |
orderby version.CREATE_DATE descending |
87 |
select version).First(); |
88 | |
89 |
markupdata = (from data in Entity.MARKUP_DATA |
90 |
where data.MARKUPINFO_VERSION_ID == markup_info_version.ID && data.PAGENUMBER == Page_No |
91 |
select data.DATA).ToList(); |
92 | |
93 |
foreach (string data in markupdata) |
94 |
{ |
95 |
MarkupToPDF.Controls.Parsing.LayerControl layer = new LayerControl(); |
96 |
//layer.markupParse(data, printCanvas, "", "", id); |
97 |
layerControl.ProjectNo = App.ViewInfo.ProjectNO; |
98 |
layerControl.markupParse(data, printCanvas, DisplayColor, ""); |
99 |
} |
100 |
//} |
101 |
//catch |
102 |
//{ |
103 |
//} |
104 |
//} |
105 |
#endregion |
106 | |
107 |
List<string> MarkupString = new List<string>(); |
108 |
} |
109 |
} |
110 |
} |
111 |
} |