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