markus / ConvertService / ServiceBase / StationControllerService / DataService.svc.cs @ 037ab674
이력 | 보기 | 이력해설 | 다운로드 (9.41 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Data.Entity.Core.Objects; |
4 |
using System.Linq; |
5 |
using System.Runtime.Serialization; |
6 |
using System.ServiceModel; |
7 |
using System.Text; |
8 |
|
9 |
namespace StationControllerService |
10 |
{ |
11 |
// 참고: "리팩터링" 메뉴에서 "이름 바꾸기" 명령을 사용하여 코드, svc 및 config 파일에서 클래스 이름 "DataService"을 변경할 수 있습니다. |
12 |
// 참고: 이 서비스를 테스트하기 위해 WCF 테스트 클라이언트를 시작하려면 솔루션 탐색기에서 DataService.svc나 DataService.svc.cs를 선택하고 디버깅을 시작하십시오. |
13 |
public class DataService : IDataService |
14 |
{ |
15 |
public List<SELECT_CONVERT_ITEM_Result> GET_SELECT_CONVERT_ITEM(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_ID, Nullable<int> p_STATUS, Nullable<int> p_TAKE_COUNT, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME, Nullable<System.DateTime> p_BEGIN_START_DATETIE, Nullable<System.DateTime> p_FINISH_START_DATETIME, Nullable<System.DateTime> p_BEGIN_END_DATETIME, Nullable<System.DateTime> p_FINISH_END_DATETIME, string p_GROUP_NO, string p_DOCUMENT_NAME, string p_DOCUMENT_NO, string p_REVISION, string p_SERVICE_ID, Nullable<int> p_RECONVERTER, string p_DOCUMENT_URL, Nullable<bool> p_ExcptionCheck) |
16 |
{ |
17 |
List<SELECT_CONVERT_ITEM_Result> result = new List<SELECT_CONVERT_ITEM_Result>(); |
18 |
|
19 |
try |
20 |
{ |
21 |
var connectionstring = Properties.Resources.ConnectionString; |
22 |
|
23 |
using (markusEntities entities = new markusEntities(connectionstring)) |
24 |
{ |
25 |
result = entities.SELECT_CONVERT_ITEM(p_ID, p_PROJECT_NO, p_DOCUMENT_ID, p_STATUS, p_TAKE_COUNT, p_BEGIN_CREATE_DATETIME, p_FINISH_CREATE_DATETIME, p_BEGIN_START_DATETIE, p_FINISH_START_DATETIME, p_BEGIN_END_DATETIME, p_FINISH_END_DATETIME, p_GROUP_NO, p_DOCUMENT_NAME, p_DOCUMENT_NO, p_REVISION, p_SERVICE_ID, p_RECONVERTER, p_DOCUMENT_URL, p_ExcptionCheck).ToList(); |
26 |
|
27 |
System.Diagnostics.Debug.WriteLine("GET_SELECT_CONVERT_ITEM result count :" + result.Count()); |
28 |
} |
29 |
} |
30 |
catch (Exception) |
31 |
{ |
32 |
throw new FaultException("GET_SELECT_CONVERT_ITEM"); |
33 |
} |
34 |
|
35 |
return result; |
36 |
} |
37 |
|
38 |
public int GET_SELECT_RERECONVERT_ITEM(string p_ID, Nullable<int> p_RECONVERTER, Nullable<System.DateTime> p_CREATE_DATETIME, Nullable<int> p_STATUS, Nullable<System.DateTime> p_END_DATETIME) |
39 |
{ |
40 |
int result; |
41 |
|
42 |
try |
43 |
{ |
44 |
var connectionstring = Properties.Resources.ConnectionString; |
45 |
|
46 |
using (markusEntities entities = new markusEntities(connectionstring)) |
47 |
{ |
48 |
result = entities.SELECT_RERECONVERT_ITEM(p_ID, p_RECONVERTER, p_CREATE_DATETIME, p_STATUS, p_END_DATETIME); |
49 |
} |
50 |
} |
51 |
catch (Exception) |
52 |
{ |
53 |
throw new FaultException("GET_SELECT_RERECONVERT_ITEM"); |
54 |
} |
55 |
|
56 |
return result; |
57 |
} |
58 |
|
59 |
public int GET_SELECT_CONVERT_DELETE(string p_ID) |
60 |
{ |
61 |
int result; |
62 |
|
63 |
try |
64 |
{ |
65 |
var connectionstring = Properties.Resources.ConnectionString; |
66 |
|
67 |
using (markusEntities entities = new markusEntities(connectionstring)) |
68 |
{ |
69 |
result = entities.SELECT_CONVERT_DELETE(p_ID); |
70 |
} |
71 |
} |
72 |
catch (Exception) |
73 |
{ |
74 |
throw new FaultException("GET_SELECT_CONVERT_DELETE"); |
75 |
} |
76 |
|
77 |
return result; |
78 |
} |
79 |
|
80 |
public List<SELECT_RUN_PROJECTS_Result> GET_SELECT_RUN_PROJECTS(int p_RUN_PROJECTS) |
81 |
{ |
82 |
List<SELECT_RUN_PROJECTS_Result> result = new List<SELECT_RUN_PROJECTS_Result>(); |
83 |
|
84 |
try |
85 |
{ |
86 |
var connectionstring = Properties.Resources.ConnectionString; |
87 |
|
88 |
using (markusEntities entities = new markusEntities(connectionstring)) |
89 |
{ |
90 |
result = entities.SELECT_RUN_PROJECTS(p_RUN_PROJECTS).ToList(); |
91 |
} |
92 |
} |
93 |
catch (Exception) |
94 |
{ |
95 |
throw new FaultException("GET_SELECT_RUN_PROJECTS"); |
96 |
} |
97 |
|
98 |
return result; |
99 |
} |
100 |
|
101 |
public int GET_SELECT_CONVERT_INSERT(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_URL, string p_DOCUMENT_ID) |
102 |
{ |
103 |
int result; |
104 |
|
105 |
try |
106 |
{ |
107 |
var connectionstring = Properties.Resources.ConnectionString; |
108 |
|
109 |
using (markusEntities entities = new markusEntities(connectionstring)) |
110 |
{ |
111 |
result = entities.SELECT_CONVERT_INSERT(p_ID, p_PROJECT_NO, p_DOCUMENT_URL, p_DOCUMENT_ID); |
112 |
} |
113 |
} |
114 |
catch (Exception) |
115 |
{ |
116 |
throw new FaultException("GET_SELECT_FINAL_PDF_INSERT"); |
117 |
} |
118 |
|
119 |
return result; |
120 |
} |
121 |
|
122 |
public List<SELECT_FINAL_PDF_ITEM_Result> GET_SELECT_FINAL_PDF_ITEM(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_ID, string p_MARKUPINFO_ID, string p_DOCINFO_ID, string p_DOCUMENT_NAME, string p_DOCUMENT_NO, string p_CREATE_USER_ID, Nullable<int> p_STATUS, Nullable<int> p_TAKE_COUNT, string p_GROUP_NO, string p_REVISION, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME, Nullable<System.DateTime> p_BEGIN_START_DATETIE, Nullable<System.DateTime> p_FINISH_START_DATETIME, Nullable<System.DateTime> p_BEGIN_END_DATETIME, Nullable<System.DateTime> p_FINISH_END_DATETIME, string p_DOCUMENT_URL, Nullable<bool> p_ExcptionCheck) |
123 |
{ |
124 |
List<SELECT_FINAL_PDF_ITEM_Result> result = new List<SELECT_FINAL_PDF_ITEM_Result>(); |
125 |
|
126 |
try |
127 |
{ |
128 |
var connectionstring = Properties.Resources.ConnectionString; |
129 |
|
130 |
using (markusEntities entities = new markusEntities(connectionstring)) |
131 |
{ |
132 |
result = entities.SELECT_FINAL_PDF_ITEM(p_ID, p_PROJECT_NO, p_DOCUMENT_ID, p_MARKUPINFO_ID, p_DOCINFO_ID, p_DOCUMENT_NAME, p_DOCUMENT_NO, p_CREATE_USER_ID, p_STATUS, p_TAKE_COUNT, p_GROUP_NO, p_REVISION, p_BEGIN_CREATE_DATETIME, p_FINISH_CREATE_DATETIME, p_BEGIN_START_DATETIE, p_FINISH_START_DATETIME, p_BEGIN_END_DATETIME, p_FINISH_END_DATETIME, p_DOCUMENT_URL, p_ExcptionCheck).ToList(); |
133 |
} |
134 |
} |
135 |
catch (Exception) |
136 |
{ |
137 |
throw new FaultException("GET_SELECT_FINAL_PDF_ITEM"); |
138 |
} |
139 |
|
140 |
return result; |
141 |
} |
142 |
|
143 |
public int GET_SELECT_FINAL_PDF_DELETE(string p_ID) |
144 |
{ |
145 |
int result; |
146 |
|
147 |
try |
148 |
{ |
149 |
var connectionstring = Properties.Resources.ConnectionString; |
150 |
|
151 |
using (markusEntities entities = new markusEntities(connectionstring)) |
152 |
{ |
153 |
result = entities.SELECT_FINAL_PDF_DELETE(p_ID); |
154 |
} |
155 |
} |
156 |
catch (Exception) |
157 |
{ |
158 |
throw new FaultException("GET_SELECT_FINAL_PDF_DELETE"); |
159 |
} |
160 |
|
161 |
return result; |
162 |
} |
163 |
|
164 |
public int GET_SELECT_FINAL_PDF_INSERT(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_URL, string p_DOCUMENT_ID) |
165 |
{ |
166 |
int result; |
167 |
|
168 |
try |
169 |
{ |
170 |
var connectionstring = Properties.Resources.ConnectionString; |
171 |
|
172 |
using (markusEntities entities = new markusEntities(connectionstring)) |
173 |
{ |
174 |
result = entities.SELECT_FINAL_PDF_INSERT(p_ID, p_PROJECT_NO, p_DOCUMENT_URL, p_DOCUMENT_ID); |
175 |
} |
176 |
} |
177 |
catch (Exception) |
178 |
{ |
179 |
throw new FaultException("GET_SELECT_FINAL_PDF_INSERT"); |
180 |
} |
181 |
|
182 |
return result; |
183 |
} |
184 |
|
185 |
public List<FINALPDF_COUNT_Result> GET_FINALPDF_COUNT(Nullable<int> p_STATUS, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME) |
186 |
{ |
187 |
|
188 |
List<FINALPDF_COUNT_Result> result = new List<FINALPDF_COUNT_Result>(); |
189 |
|
190 |
try |
191 |
{ |
192 |
var connectionstring = Properties.Resources.ConnectionString; |
193 |
|
194 |
using (markusEntities entities = new markusEntities(connectionstring)) |
195 |
{ |
196 |
result = entities.FINALPDF_COUNT(p_STATUS, p_BEGIN_CREATE_DATETIME, p_FINISH_CREATE_DATETIME).ToList(); |
197 |
} |
198 |
} |
199 |
catch (Exception) |
200 |
{ |
201 |
throw new FaultException("GET_FINALPDF_COUNT"); |
202 |
} |
203 |
|
204 |
return result; |
205 |
} |
206 |
|
207 |
public List<CONVERT_COUNT_Result> GET_CONVERT_COUNT(Nullable<int> p_STATUS, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME) |
208 |
{ |
209 |
|
210 |
List<CONVERT_COUNT_Result> result = new List<CONVERT_COUNT_Result>(); |
211 |
|
212 |
try |
213 |
{ |
214 |
var connectionstring = Properties.Resources.ConnectionString; |
215 |
|
216 |
using (markusEntities entities = new markusEntities(connectionstring)) |
217 |
{ |
218 |
result = entities.CONVERT_COUNT(p_STATUS, p_BEGIN_CREATE_DATETIME, p_FINISH_CREATE_DATETIME).ToList(); |
219 |
} |
220 |
} |
221 |
catch (Exception) |
222 |
{ |
223 |
throw new FaultException("GET_CONVERT_COUNT"); |
224 |
} |
225 |
|
226 |
return result; |
227 |
} |
228 |
} |
229 |
} |