markus / ConvertService / ServiceController / StationControllerService / DataService.svc.cs @ 5c387707
이력 | 보기 | 이력해설 | 다운로드 (10.3 KB)
1 | 5c387707 | semi | 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 | |||
16 | 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) |
||
17 | { |
||
18 | List<SELECT_CONVERT_ITEM_Result> result = new List<SELECT_CONVERT_ITEM_Result>(); |
||
19 | |||
20 | try |
||
21 | { |
||
22 | var connectionstring = Properties.Resources.ConnectionString; |
||
23 | |||
24 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
25 | { |
||
26 | 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(); |
||
27 | |||
28 | //System.Diagnostics.Debug.WriteLine("GET_SELECT_CONVERT_ITEM result count :" + result.Count()); |
||
29 | } |
||
30 | } |
||
31 | catch (Exception) |
||
32 | { |
||
33 | throw new FaultException("GET_SELECT_CONVERT_ITEM"); |
||
34 | } |
||
35 | |||
36 | return result; |
||
37 | } |
||
38 | |||
39 | 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) |
||
40 | { |
||
41 | int result; |
||
42 | |||
43 | try |
||
44 | { |
||
45 | var connectionstring = Properties.Resources.ConnectionString; |
||
46 | |||
47 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
48 | { |
||
49 | result = entities.SELECT_RERECONVERT_ITEM(p_ID, p_RECONVERTER, p_CREATE_DATETIME, p_STATUS, p_END_DATETIME); |
||
50 | } |
||
51 | } |
||
52 | catch (Exception) |
||
53 | { |
||
54 | throw new FaultException("GET_SELECT_RERECONVERT_ITEM"); |
||
55 | } |
||
56 | |||
57 | return result; |
||
58 | } |
||
59 | |||
60 | public int GET_SELECT_CONVERT_DELETE(string p_ID) |
||
61 | { |
||
62 | int result; |
||
63 | |||
64 | try |
||
65 | { |
||
66 | var connectionstring = Properties.Resources.ConnectionString; |
||
67 | |||
68 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
69 | { |
||
70 | result = entities.SELECT_CONVERT_DELETE(p_ID); |
||
71 | } |
||
72 | } |
||
73 | catch (Exception) |
||
74 | { |
||
75 | throw new FaultException("GET_SELECT_CONVERT_DELETE"); |
||
76 | } |
||
77 | |||
78 | return result; |
||
79 | } |
||
80 | |||
81 | public List<SELECT_RUN_PROJECTS_Result> GET_SELECT_RUN_PROJECTS(int p_RUN_PROJECTS) |
||
82 | { |
||
83 | List<SELECT_RUN_PROJECTS_Result> result = new List<SELECT_RUN_PROJECTS_Result>(); |
||
84 | |||
85 | try |
||
86 | { |
||
87 | var connectionstring = Properties.Resources.ConnectionString; |
||
88 | |||
89 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
90 | { |
||
91 | result = entities.SELECT_RUN_PROJECTS(p_RUN_PROJECTS).ToList(); |
||
92 | } |
||
93 | } |
||
94 | catch (Exception) |
||
95 | { |
||
96 | throw new FaultException("GET_SELECT_RUN_PROJECTS"); |
||
97 | } |
||
98 | |||
99 | return result; |
||
100 | } |
||
101 | |||
102 | public int GET_SELECT_CONVERT_INSERT(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_URL, string p_DOCUMENT_ID) |
||
103 | { |
||
104 | int result; |
||
105 | |||
106 | try |
||
107 | { |
||
108 | var connectionstring = Properties.Resources.ConnectionString; |
||
109 | |||
110 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
111 | { |
||
112 | result = entities.SELECT_CONVERT_INSERT(p_ID, p_PROJECT_NO, p_DOCUMENT_URL, p_DOCUMENT_ID); |
||
113 | } |
||
114 | } |
||
115 | catch (Exception) |
||
116 | { |
||
117 | throw new FaultException("GET_SELECT_FINAL_PDF_INSERT"); |
||
118 | } |
||
119 | |||
120 | return result; |
||
121 | } |
||
122 | |||
123 | 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) |
||
124 | { |
||
125 | List<SELECT_FINAL_PDF_ITEM_Result> result = new List<SELECT_FINAL_PDF_ITEM_Result>(); |
||
126 | |||
127 | try |
||
128 | { |
||
129 | var connectionstring = Properties.Resources.ConnectionString; |
||
130 | |||
131 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
132 | { |
||
133 | 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(); |
||
134 | } |
||
135 | } |
||
136 | catch (Exception) |
||
137 | { |
||
138 | throw new FaultException("GET_SELECT_FINAL_PDF_ITEM"); |
||
139 | } |
||
140 | |||
141 | return result; |
||
142 | } |
||
143 | |||
144 | public int GET_SELECT_FINAL_PDF_DELETE(string p_ID) |
||
145 | { |
||
146 | int result; |
||
147 | |||
148 | try |
||
149 | { |
||
150 | var connectionstring = Properties.Resources.ConnectionString; |
||
151 | |||
152 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
153 | { |
||
154 | result = entities.SELECT_FINAL_PDF_DELETE(p_ID); |
||
155 | } |
||
156 | } |
||
157 | catch (Exception) |
||
158 | { |
||
159 | throw new FaultException("GET_SELECT_FINAL_PDF_DELETE"); |
||
160 | } |
||
161 | |||
162 | return result; |
||
163 | } |
||
164 | |||
165 | public int GET_SELECT_FINAL_PDF_INSERT(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_URL, string p_DOCUMENT_ID) |
||
166 | { |
||
167 | int result; |
||
168 | |||
169 | try |
||
170 | { |
||
171 | var connectionstring = Properties.Resources.ConnectionString; |
||
172 | |||
173 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
174 | { |
||
175 | result = entities.SELECT_FINAL_PDF_INSERT(p_ID, p_PROJECT_NO, p_DOCUMENT_URL, p_DOCUMENT_ID); |
||
176 | } |
||
177 | } |
||
178 | catch (Exception) |
||
179 | { |
||
180 | throw new FaultException("GET_SELECT_FINAL_PDF_INSERT"); |
||
181 | } |
||
182 | |||
183 | return result; |
||
184 | } |
||
185 | |||
186 | 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) |
||
187 | { |
||
188 | |||
189 | List<FINALPDF_COUNT_Result> result = new List<FINALPDF_COUNT_Result>(); |
||
190 | |||
191 | try |
||
192 | { |
||
193 | var connectionstring = Properties.Resources.ConnectionString; |
||
194 | |||
195 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
196 | { |
||
197 | result = entities.FINALPDF_COUNT(p_STATUS, p_BEGIN_CREATE_DATETIME, p_FINISH_CREATE_DATETIME).ToList(); |
||
198 | } |
||
199 | } |
||
200 | catch (Exception) |
||
201 | { |
||
202 | throw new FaultException("GET_FINALPDF_COUNT"); |
||
203 | } |
||
204 | |||
205 | return result; |
||
206 | } |
||
207 | |||
208 | 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) |
||
209 | { |
||
210 | |||
211 | List<CONVERT_COUNT_Result> result = new List<CONVERT_COUNT_Result>(); |
||
212 | |||
213 | try |
||
214 | { |
||
215 | var connectionstring = Properties.Resources.ConnectionString; |
||
216 | |||
217 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
218 | { |
||
219 | result = entities.CONVERT_COUNT(p_STATUS, p_BEGIN_CREATE_DATETIME, p_FINISH_CREATE_DATETIME).ToList(); |
||
220 | } |
||
221 | } |
||
222 | catch (Exception) |
||
223 | { |
||
224 | throw new FaultException("GET_CONVERT_COUNT"); |
||
225 | } |
||
226 | |||
227 | return result; |
||
228 | } |
||
229 | |||
230 | public List<SELECT_DOCUMENT_ITEM_Result> GET_DOCUMENT_ITEM(Nullable<int> p_TAKE_COUNT, string p_REVISION, string p_DOCUMENT_N0, string p_DOCUMENT_NAME, string p_GROUP_N0, string p_ORIGINAL_FILE, string p_DOCUMENT_ID, string p_PROJECT_NO) |
||
231 | { |
||
232 | |||
233 | List<SELECT_DOCUMENT_ITEM_Result> result = new List<SELECT_DOCUMENT_ITEM_Result>(); |
||
234 | |||
235 | try |
||
236 | { |
||
237 | var connectionstring = Properties.Resources.ConnectionString; |
||
238 | |||
239 | using (markusEntities entities = new markusEntities(connectionstring)) |
||
240 | { |
||
241 | result = entities.SELECT_DOCUMENT_ITEM(p_TAKE_COUNT, p_REVISION, p_DOCUMENT_N0, p_DOCUMENT_NAME, p_GROUP_N0, p_ORIGINAL_FILE, p_DOCUMENT_ID, p_PROJECT_NO).ToList(); |
||
242 | } |
||
243 | } |
||
244 | catch (Exception) |
||
245 | { |
||
246 | throw new FaultException("GET_DOCUMENT_ITEM"); |
||
247 | } |
||
248 | |||
249 | return result; |
||
250 | } |
||
251 | } |
||
252 | } |