markus / ConvertService / ServiceBase / IServiceBase / ConvertItem.cs @ b63dcfbb
이력 | 보기 | 이력해설 | 다운로드 (13.8 KB)
1 |
using System; |
---|---|
2 |
using System.ComponentModel; |
3 |
using System.Runtime.Serialization; |
4 |
using System.Linq.Expressions; |
5 |
using Markus.Message; |
6 |
namespace Markus.Service.Interface |
7 |
{ |
8 |
[DataContract] |
9 |
public class ConvertItem :IEquatable<ConvertItem> ,INotifyPropertyChanged |
10 |
{ |
11 |
public bool Equals(ConvertItem other) |
12 |
{ |
13 |
if (other is null) |
14 |
return false; |
15 |
|
16 |
return this.ConvertID == other.ConvertID && this.ProjectNumber == other.ProjectNumber; |
17 |
} |
18 |
|
19 |
public override bool Equals(object obj) => Equals(obj as ConvertItem); |
20 |
public override int GetHashCode() |
21 |
{ |
22 |
var id = (ConvertID != null) ? ConvertID : ""; |
23 |
var project = (ProjectNumber != null) ? ProjectNumber : ""; |
24 |
|
25 |
return (id + project).GetHashCode(); |
26 |
} |
27 |
|
28 |
public ConvertItem() |
29 |
{ |
30 |
|
31 |
} |
32 |
|
33 |
public ConvertItem(string ProjectNo, string ID) |
34 |
{ |
35 |
this._projectNumber = ProjectNo; |
36 |
this._convertID = ID; |
37 |
} |
38 |
|
39 |
public ConvertItem(string key, string ProjectNo, string ID, string originfilePath) |
40 |
{ |
41 |
this._uniqueKey = key; |
42 |
this._projectNumber = ProjectNo; |
43 |
this._convertID = ID; |
44 |
this._originfilePath = originfilePath; |
45 |
|
46 |
string result = ""; |
47 |
if (originfilePath.Contains("/")) |
48 |
{ |
49 |
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
50 |
} |
51 |
else |
52 |
{ |
53 |
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
54 |
} |
55 |
this._FileName = result; |
56 |
} |
57 |
|
58 |
public ConvertItem(string key, string ProjectNo, string ID,string originfilePath,string convertPath) |
59 |
{ |
60 |
this._uniqueKey = key; |
61 |
this._projectNumber = ProjectNo; |
62 |
this._convertID = ID; |
63 |
this._originfilePath = originfilePath; |
64 |
this._convertPath = convertPath; |
65 |
|
66 |
string result = ""; |
67 |
if (originfilePath.Contains("/")) |
68 |
{ |
69 |
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
70 |
} |
71 |
else |
72 |
{ |
73 |
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
74 |
} |
75 |
this._FileName = result; |
76 |
} |
77 |
|
78 |
public ConvertItem(string key, string ProjectNo, string ID, string originfilePath, string convertPath, StatusCodeType Status,int currentPageNo,int totalPage,string exception) |
79 |
{ |
80 |
this._uniqueKey = key; |
81 |
this._projectNumber = ProjectNo; |
82 |
this._convertID = ID; |
83 |
this._originfilePath = originfilePath; |
84 |
this._convertPath = convertPath; |
85 |
this._convertState = (StatusCodeType)Status; |
86 |
this._currentPageNo = currentPageNo; |
87 |
this._totalPage = totalPage; |
88 |
this._exception = exception; |
89 |
|
90 |
string result = ""; |
91 |
if (originfilePath.Contains("/")) |
92 |
{ |
93 |
result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1); |
94 |
} |
95 |
else |
96 |
{ |
97 |
result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1); |
98 |
} |
99 |
this._FileName = result; |
100 |
} |
101 |
|
102 |
//DataSearch 상단 그리드 Search |
103 |
public ConvertItem(string ConvertId ,string ProjectNo, int Status, string documentID, string documentName, string documentNo, string document_URL, string revision, int currentPageNo, int totalPage, string exception, string groupNo) |
104 |
{//세미 |
105 |
ConvertID = ConvertId; |
106 |
ProjectNumber = ProjectNo; |
107 |
ConvertState = (StatusCodeType)Status; |
108 |
DocumentID = documentID; |
109 |
DocumnetName = documentName; |
110 |
DocumnetNo = documentNo; |
111 |
DocumnetURL = document_URL; |
112 |
Revision = revision; |
113 |
CurrentPageNo = currentPageNo; |
114 |
TotalPage = totalPage; |
115 |
Exception = exception; |
116 |
GroupNo = groupNo; |
117 |
} |
118 |
|
119 |
|
120 |
string _uniqueKey; |
121 |
string _projectNumber; |
122 |
string _convertID; |
123 |
string _serviceID; |
124 |
int _reConverter; |
125 |
string _originfilePath; |
126 |
string _FileName; |
127 |
string _convertPath; |
128 |
StatusCodeType _convertState; |
129 |
int _currentPageNo; |
130 |
int _totalPage; |
131 |
string _exception; |
132 |
string _revision;//↓ DOCUMENT_ITEM |
133 |
string _documentNo; |
134 |
string _docuemnt_Name; |
135 |
string _GroupName; |
136 |
string _documentID; |
137 |
string _documentURL; |
138 |
string _validation; |
139 |
string _MarkusLink; |
140 |
|
141 |
|
142 |
DateTime _createtime; |
143 |
DateTime? _starttime; |
144 |
DateTime? _endtime; |
145 |
|
146 |
public event PropertyChangedEventHandler PropertyChanged; |
147 |
|
148 |
private void OnPropertyChanged(string propertyName) |
149 |
{ |
150 |
if (PropertyChanged != null) |
151 |
{ |
152 |
PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); |
153 |
} |
154 |
} |
155 |
|
156 |
[DataMember] |
157 |
public string ConvertID |
158 |
{ |
159 |
get |
160 |
{ |
161 |
return _convertID; |
162 |
} |
163 |
set |
164 |
{ |
165 |
if (_convertID != value) |
166 |
{ |
167 |
_convertID = value; |
168 |
OnPropertyChanged("ConvertID"); |
169 |
} |
170 |
} |
171 |
} |
172 |
|
173 |
[DataMember] |
174 |
public string ServiceID |
175 |
{ |
176 |
get |
177 |
{ |
178 |
return _serviceID; |
179 |
} |
180 |
set |
181 |
{ |
182 |
if (_serviceID != value) |
183 |
{ |
184 |
_serviceID = value; |
185 |
OnPropertyChanged("ServiceID"); |
186 |
} |
187 |
} |
188 |
} |
189 |
|
190 |
[DataMember] |
191 |
public int ReConverter |
192 |
{ |
193 |
get |
194 |
{ |
195 |
return _reConverter; |
196 |
} |
197 |
set |
198 |
{ |
199 |
if (_reConverter != value) |
200 |
{ |
201 |
_reConverter = value; |
202 |
OnPropertyChanged("ReConverter"); |
203 |
} |
204 |
} |
205 |
} |
206 |
|
207 |
[DataMember] |
208 |
public string OriginfilePath |
209 |
{ |
210 |
get |
211 |
{ |
212 |
return _originfilePath; |
213 |
} |
214 |
set |
215 |
{ |
216 |
if (_originfilePath != value) |
217 |
{ |
218 |
_originfilePath = value; |
219 |
OnPropertyChanged("OriginfilePath"); |
220 |
} |
221 |
} |
222 |
} |
223 |
|
224 |
|
225 |
[DataMember] |
226 |
public string FileName |
227 |
{ |
228 |
get |
229 |
{ |
230 |
return _FileName; |
231 |
} |
232 |
set |
233 |
{ |
234 |
if (_FileName != value) |
235 |
{ |
236 |
_FileName = value; |
237 |
OnPropertyChanged("FileName"); |
238 |
} |
239 |
} |
240 |
} |
241 |
|
242 |
|
243 |
[DataMember] |
244 |
public string ConvertPath |
245 |
{ |
246 |
get |
247 |
{ |
248 |
return _convertPath; |
249 |
} |
250 |
set |
251 |
{ |
252 |
if (_convertPath != value) |
253 |
{ |
254 |
_convertPath = value; |
255 |
OnPropertyChanged("ConvertPath"); |
256 |
} |
257 |
} |
258 |
} |
259 |
|
260 |
[DataMember] |
261 |
public StatusCodeType ConvertState |
262 |
{ |
263 |
get |
264 |
{ |
265 |
return _convertState; |
266 |
} |
267 |
set |
268 |
{ |
269 |
if (_convertState != value) |
270 |
{ |
271 |
_convertState = value; |
272 |
OnPropertyChanged("ConvertState"); |
273 |
} |
274 |
} |
275 |
} |
276 |
|
277 |
[DataMember] |
278 |
public string ProjectNumber |
279 |
{ |
280 |
get |
281 |
{ |
282 |
return _projectNumber; |
283 |
} |
284 |
set |
285 |
{ |
286 |
if (_projectNumber != value) |
287 |
{ |
288 |
_projectNumber = value; |
289 |
OnPropertyChanged("ProjectNumber"); |
290 |
} |
291 |
} |
292 |
} |
293 |
|
294 |
[DataMember] |
295 |
public int TotalPage |
296 |
{ |
297 |
get |
298 |
{ |
299 |
return _totalPage; |
300 |
} |
301 |
set |
302 |
{ |
303 |
if (_totalPage != value) |
304 |
{ |
305 |
_totalPage = value; |
306 |
OnPropertyChanged("TotalPage"); |
307 |
} |
308 |
} |
309 |
} |
310 |
|
311 |
[DataMember] |
312 |
public int CurrentPageNo |
313 |
{ |
314 |
get |
315 |
{ |
316 |
return _currentPageNo; |
317 |
} |
318 |
set |
319 |
{ |
320 |
if (_currentPageNo != value) |
321 |
{ |
322 |
_currentPageNo = value; |
323 |
OnPropertyChanged("CurrentPageNo"); |
324 |
} |
325 |
} |
326 |
} |
327 |
|
328 |
[DataMember] |
329 |
public DateTime CreateTime |
330 |
{ |
331 |
get |
332 |
{ |
333 |
return _createtime; |
334 |
} |
335 |
set |
336 |
{ |
337 |
if (_createtime != value) |
338 |
{ |
339 |
_createtime = value; |
340 |
OnPropertyChanged("CreateTime"); |
341 |
} |
342 |
} |
343 |
} |
344 |
|
345 |
[DataMember] |
346 |
public DateTime? StartTime |
347 |
{ |
348 |
get |
349 |
{ |
350 |
return _starttime; |
351 |
} |
352 |
set |
353 |
{ |
354 |
if (value == null) |
355 |
{ |
356 |
_starttime = null; |
357 |
OnPropertyChanged("StartTime"); |
358 |
} |
359 |
else if (_starttime != value) |
360 |
{ |
361 |
_starttime = value; |
362 |
OnPropertyChanged("StartTime"); |
363 |
} |
364 |
} |
365 |
} |
366 |
|
367 |
[DataMember] |
368 |
public DateTime? EndTime |
369 |
{ |
370 |
get |
371 |
{ |
372 |
return _endtime; |
373 |
} |
374 |
set |
375 |
{ |
376 |
if (value == null) |
377 |
{ |
378 |
_endtime = null; |
379 |
OnPropertyChanged("EndTime"); |
380 |
} |
381 |
else if (_endtime != value) |
382 |
{ |
383 |
_endtime = value; |
384 |
OnPropertyChanged("EndTime"); |
385 |
} |
386 |
} |
387 |
} |
388 |
|
389 |
[DataMember] |
390 |
public string UniqueKey |
391 |
{ |
392 |
get |
393 |
{ |
394 |
return _uniqueKey; |
395 |
} |
396 |
set |
397 |
{ |
398 |
if (_uniqueKey != value) |
399 |
{ |
400 |
_uniqueKey = value; |
401 |
OnPropertyChanged("UniqueKey"); |
402 |
} |
403 |
} |
404 |
} |
405 |
|
406 |
|
407 |
[DataMember] |
408 |
public string Exception |
409 |
{ |
410 |
get |
411 |
{ |
412 |
return _exception; |
413 |
} |
414 |
set |
415 |
{ |
416 |
if (_exception != value) |
417 |
{ |
418 |
_exception = value; |
419 |
OnPropertyChanged("Exception"); |
420 |
|
421 |
} |
422 |
} |
423 |
} |
424 |
|
425 |
[DataMember] |
426 |
public Int64 ProcessorAffinity { get; set; } |
427 |
|
428 |
[DataMember] |
429 |
public string Revision |
430 |
{ |
431 |
get |
432 |
{ |
433 |
return _revision; |
434 |
} |
435 |
set |
436 |
{ |
437 |
if (_revision != value) |
438 |
{ |
439 |
_revision = value; |
440 |
OnPropertyChanged("REVISION"); |
441 |
|
442 |
} |
443 |
} |
444 |
} |
445 |
|
446 |
[DataMember] |
447 |
public string DocumnetNo |
448 |
{ |
449 |
get |
450 |
{ |
451 |
return _documentNo; |
452 |
} |
453 |
set |
454 |
{ |
455 |
if (_documentNo != value) |
456 |
{ |
457 |
_documentNo = value; |
458 |
OnPropertyChanged("DOCUMENT_NO"); |
459 |
|
460 |
} |
461 |
} |
462 |
} |
463 |
|
464 |
[DataMember] |
465 |
public string DocumnetName |
466 |
{ |
467 |
get |
468 |
{ |
469 |
return _docuemnt_Name; |
470 |
} |
471 |
set |
472 |
{ |
473 |
if (_docuemnt_Name != value) |
474 |
{ |
475 |
_docuemnt_Name = value; |
476 |
OnPropertyChanged("DOCUMENT_NAME"); |
477 |
|
478 |
} |
479 |
} |
480 |
} |
481 |
|
482 |
[DataMember] |
483 |
public string DocumnetURL |
484 |
{ |
485 |
get |
486 |
{ |
487 |
return _documentURL; |
488 |
} |
489 |
set |
490 |
{ |
491 |
if (_documentURL != value) |
492 |
{ |
493 |
_documentURL = value; |
494 |
OnPropertyChanged("_documentURL"); |
495 |
|
496 |
} |
497 |
} |
498 |
} |
499 |
|
500 |
|
501 |
|
502 |
[DataMember] |
503 |
public string GroupNo |
504 |
{ |
505 |
get |
506 |
{ |
507 |
return _GroupName; |
508 |
} |
509 |
set |
510 |
{ |
511 |
if (_GroupName != value) |
512 |
{ |
513 |
_GroupName = value; |
514 |
OnPropertyChanged("GROUP_NO"); |
515 |
|
516 |
} |
517 |
} |
518 |
} |
519 |
|
520 |
|
521 |
[DataMember] |
522 |
public string DocumentID |
523 |
{ |
524 |
get |
525 |
{ |
526 |
return _documentID; |
527 |
} |
528 |
set |
529 |
{ |
530 |
if (_documentID != value) |
531 |
{ |
532 |
_documentID = value; |
533 |
OnPropertyChanged("DocumentID"); |
534 |
|
535 |
} |
536 |
} |
537 |
} |
538 |
|
539 |
|
540 |
[DataMember] |
541 |
public string Validation |
542 |
{ |
543 |
get |
544 |
{ |
545 |
return _validation; |
546 |
} |
547 |
set |
548 |
{ |
549 |
if (_validation != value) |
550 |
{ |
551 |
_validation = value; |
552 |
OnPropertyChanged("Validation"); |
553 |
|
554 |
} |
555 |
} |
556 |
} |
557 |
|
558 |
[DataMember] |
559 |
public string MarkusLink |
560 |
{ |
561 |
get |
562 |
{ |
563 |
return _MarkusLink; |
564 |
} |
565 |
set |
566 |
{ |
567 |
if (_MarkusLink != value) |
568 |
{ |
569 |
_MarkusLink = value; |
570 |
OnPropertyChanged("MarkusLink"); |
571 |
|
572 |
} |
573 |
} |
574 |
} |
575 |
|
576 |
} |
577 |
} |