markus / ConvertService / ServiceBase / IServiceBase / ConvertItem.cs @ 3bde451b
이력 | 보기 | 이력해설 | 다운로드 (17.8 KB)
1 |
using System; |
---|---|
2 |
using System.ComponentModel; |
3 |
using System.Runtime.Serialization; |
4 |
using System.Linq.Expressions; |
5 |
using Markus.Message; |
6 |
using System.IO; |
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 |
DocumnetName = documentName; |
116 |
DocumnetNo = 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 |
DocumnetName = documentName; |
157 |
DocumnetNo = 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 _docuemnt_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 |
[DataMember] |
226 |
public string ConvertID |
227 |
{ |
228 |
get |
229 |
{ |
230 |
return _convertID; |
231 |
} |
232 |
set |
233 |
{ |
234 |
if (_convertID != value) |
235 |
{ |
236 |
_convertID = value; |
237 |
OnPropertyChanged("ConvertID"); |
238 |
} |
239 |
} |
240 |
} |
241 |
|
242 |
[DataMember] |
243 |
public string ServiceID |
244 |
{ |
245 |
get |
246 |
{ |
247 |
return _serviceID; |
248 |
} |
249 |
set |
250 |
{ |
251 |
if (_serviceID != value) |
252 |
{ |
253 |
_serviceID = value; |
254 |
OnPropertyChanged("ServiceID"); |
255 |
} |
256 |
} |
257 |
} |
258 |
|
259 |
[DataMember] |
260 |
public int? ReConverter |
261 |
{ |
262 |
get |
263 |
{ |
264 |
return _reConverter; |
265 |
} |
266 |
set |
267 |
{ |
268 |
if (_reConverter != value) |
269 |
{ |
270 |
_reConverter = value; |
271 |
OnPropertyChanged("ReConverter"); |
272 |
} |
273 |
} |
274 |
} |
275 |
|
276 |
[DataMember] |
277 |
public string OriginfilePath |
278 |
{ |
279 |
get |
280 |
{ |
281 |
return _originfilePath; |
282 |
} |
283 |
set |
284 |
{ |
285 |
if (_originfilePath != value) |
286 |
{ |
287 |
_originfilePath = value; |
288 |
OnPropertyChanged("OriginfilePath"); |
289 |
} |
290 |
} |
291 |
} |
292 |
|
293 |
|
294 |
[DataMember] |
295 |
public string FileName |
296 |
{ |
297 |
get |
298 |
{ |
299 |
return _FileName; |
300 |
} |
301 |
set |
302 |
{ |
303 |
if (_FileName != value) |
304 |
{ |
305 |
_FileName = value; |
306 |
OnPropertyChanged("FileName"); |
307 |
} |
308 |
} |
309 |
} |
310 |
|
311 |
|
312 |
[DataMember] |
313 |
public string ConvertPath |
314 |
{ |
315 |
get |
316 |
{ |
317 |
return _convertPath; |
318 |
} |
319 |
set |
320 |
{ |
321 |
if (_convertPath != value) |
322 |
{ |
323 |
_convertPath = value; |
324 |
OnPropertyChanged("ConvertPath"); |
325 |
} |
326 |
} |
327 |
} |
328 |
|
329 |
[DataMember] |
330 |
public StatusCodeType ConvertState |
331 |
{ |
332 |
get |
333 |
{ |
334 |
return _convertState; |
335 |
} |
336 |
set |
337 |
{ |
338 |
if (_convertState != value) |
339 |
{ |
340 |
_convertState = value; |
341 |
OnPropertyChanged("ConvertState"); |
342 |
} |
343 |
} |
344 |
} |
345 |
|
346 |
[DataMember] |
347 |
public string ProjectNumber |
348 |
{ |
349 |
get |
350 |
{ |
351 |
return _projectNumber; |
352 |
} |
353 |
set |
354 |
{ |
355 |
if (_projectNumber != value) |
356 |
{ |
357 |
_projectNumber = value; |
358 |
OnPropertyChanged("ProjectNumber"); |
359 |
} |
360 |
} |
361 |
} |
362 |
|
363 |
[DataMember] |
364 |
public int TotalPage |
365 |
{ |
366 |
get |
367 |
{ |
368 |
return _totalPage; |
369 |
} |
370 |
set |
371 |
{ |
372 |
if (_totalPage != value) |
373 |
{ |
374 |
_totalPage = value; |
375 |
OnPropertyChanged("TotalPage"); |
376 |
} |
377 |
} |
378 |
} |
379 |
|
380 |
[DataMember] |
381 |
public int CurrentPageNo |
382 |
{ |
383 |
get |
384 |
{ |
385 |
return _currentPageNo; |
386 |
} |
387 |
set |
388 |
{ |
389 |
if (_currentPageNo != value) |
390 |
{ |
391 |
_currentPageNo = value; |
392 |
OnPropertyChanged("CurrentPageNo"); |
393 |
} |
394 |
} |
395 |
} |
396 |
|
397 |
[DataMember] |
398 |
public DateTime CreateTime |
399 |
{ |
400 |
get |
401 |
{ |
402 |
return _createtime; |
403 |
} |
404 |
set |
405 |
{ |
406 |
if (_createtime != value) |
407 |
{ |
408 |
_createtime = value; |
409 |
OnPropertyChanged("CreateTime"); |
410 |
} |
411 |
} |
412 |
} |
413 |
|
414 |
[DataMember] |
415 |
public DateTime? StartTime |
416 |
{ |
417 |
get |
418 |
{ |
419 |
return _starttime; |
420 |
} |
421 |
set |
422 |
{ |
423 |
if (value == null) |
424 |
{ |
425 |
_starttime = null; |
426 |
OnPropertyChanged("StartTime"); |
427 |
} |
428 |
else if (_starttime != value) |
429 |
{ |
430 |
_starttime = value; |
431 |
OnPropertyChanged("StartTime"); |
432 |
} |
433 |
} |
434 |
} |
435 |
|
436 |
[DataMember] |
437 |
public DateTime? EndTime |
438 |
{ |
439 |
get |
440 |
{ |
441 |
return _endtime; |
442 |
} |
443 |
set |
444 |
{ |
445 |
if (value == null) |
446 |
{ |
447 |
_endtime = null; |
448 |
OnPropertyChanged("EndTime"); |
449 |
} |
450 |
else if (_endtime != value) |
451 |
{ |
452 |
_endtime = value; |
453 |
OnPropertyChanged("EndTime"); |
454 |
} |
455 |
} |
456 |
} |
457 |
|
458 |
[DataMember] |
459 |
public string UniqueKey |
460 |
{ |
461 |
get |
462 |
{ |
463 |
return _uniqueKey; |
464 |
} |
465 |
set |
466 |
{ |
467 |
if (_uniqueKey != value) |
468 |
{ |
469 |
_uniqueKey = value; |
470 |
OnPropertyChanged("UniqueKey"); |
471 |
} |
472 |
} |
473 |
} |
474 |
|
475 |
|
476 |
[DataMember] |
477 |
public string Exception |
478 |
{ |
479 |
get |
480 |
{ |
481 |
return _exception; |
482 |
} |
483 |
set |
484 |
{ |
485 |
if (_exception != value) |
486 |
{ |
487 |
_exception = value; |
488 |
OnPropertyChanged("Exception"); |
489 |
|
490 |
} |
491 |
} |
492 |
} |
493 |
|
494 |
[DataMember] |
495 |
public Int64 ProcessorAffinity { get; set; } |
496 |
|
497 |
[DataMember] |
498 |
public string Revision |
499 |
{ |
500 |
get |
501 |
{ |
502 |
return _revision; |
503 |
} |
504 |
set |
505 |
{ |
506 |
if (_revision != value) |
507 |
{ |
508 |
_revision = value; |
509 |
OnPropertyChanged("REVISION"); |
510 |
|
511 |
} |
512 |
} |
513 |
} |
514 |
|
515 |
[DataMember] |
516 |
public string DocumnetNo |
517 |
{ |
518 |
get |
519 |
{ |
520 |
return _documentNo; |
521 |
} |
522 |
set |
523 |
{ |
524 |
if (_documentNo != value) |
525 |
{ |
526 |
_documentNo = value; |
527 |
OnPropertyChanged("DOCUMENT_NO"); |
528 |
|
529 |
} |
530 |
} |
531 |
} |
532 |
|
533 |
[DataMember] |
534 |
public string DocumnetName |
535 |
{ |
536 |
get |
537 |
{ |
538 |
return _docuemnt_Name; |
539 |
} |
540 |
set |
541 |
{ |
542 |
if (_docuemnt_Name != value) |
543 |
{ |
544 |
_docuemnt_Name = value; |
545 |
OnPropertyChanged("DOCUMENT_NAME"); |
546 |
|
547 |
} |
548 |
} |
549 |
} |
550 |
|
551 |
[DataMember] |
552 |
public string DocumnetURL |
553 |
{ |
554 |
get |
555 |
{ |
556 |
return _documentURL; |
557 |
} |
558 |
set |
559 |
{ |
560 |
if (_documentURL != value) |
561 |
{ |
562 |
_documentURL = value; |
563 |
OnPropertyChanged("_documentURL"); |
564 |
|
565 |
} |
566 |
} |
567 |
} |
568 |
|
569 |
|
570 |
|
571 |
[DataMember] |
572 |
public string GroupNo |
573 |
{ |
574 |
get |
575 |
{ |
576 |
return _GroupName; |
577 |
} |
578 |
set |
579 |
{ |
580 |
if (_GroupName != value) |
581 |
{ |
582 |
_GroupName = value; |
583 |
OnPropertyChanged("GROUP_NO"); |
584 |
|
585 |
} |
586 |
} |
587 |
} |
588 |
|
589 |
|
590 |
[DataMember] |
591 |
public string DocumentID |
592 |
{ |
593 |
get |
594 |
{ |
595 |
return _documentID; |
596 |
} |
597 |
set |
598 |
{ |
599 |
if (_documentID != value) |
600 |
{ |
601 |
_documentID = value; |
602 |
OnPropertyChanged("DocumentID"); |
603 |
|
604 |
} |
605 |
} |
606 |
} |
607 |
|
608 |
|
609 |
[DataMember] |
610 |
public string Validation |
611 |
{ |
612 |
get |
613 |
{ |
614 |
return _validation; |
615 |
} |
616 |
set |
617 |
{ |
618 |
if (_validation != value) |
619 |
{ |
620 |
_validation = value; |
621 |
OnPropertyChanged("Validation"); |
622 |
|
623 |
} |
624 |
} |
625 |
} |
626 |
|
627 |
[DataMember] |
628 |
public string MarkusLink |
629 |
{ |
630 |
get |
631 |
{ |
632 |
return _MarkusLink; |
633 |
} |
634 |
set |
635 |
{ |
636 |
if (_MarkusLink != value) |
637 |
{ |
638 |
_MarkusLink = value; |
639 |
OnPropertyChanged("MarkusLink"); |
640 |
|
641 |
} |
642 |
} |
643 |
} |
644 |
|
645 |
[DataMember] |
646 |
private string _DocInfo_ID; |
647 |
public string DocInfo_ID |
648 |
{ |
649 |
get |
650 |
{ |
651 |
return _DocInfo_ID; |
652 |
} |
653 |
set |
654 |
{ |
655 |
if (_DocInfo_ID != value) |
656 |
{ |
657 |
_DocInfo_ID = value; |
658 |
OnPropertyChanged("DocInfo_ID"); |
659 |
|
660 |
} |
661 |
} |
662 |
} |
663 |
|
664 |
[DataMember] |
665 |
private string _MarkupInfo_ID; |
666 |
public string MarkupInfo_ID |
667 |
{ |
668 |
get |
669 |
{ |
670 |
return _MarkupInfo_ID; |
671 |
} |
672 |
set |
673 |
{ |
674 |
if (_MarkupInfo_ID != value) |
675 |
{ |
676 |
_MarkupInfo_ID = value; |
677 |
OnPropertyChanged("MarkupInfo_ID"); |
678 |
|
679 |
} |
680 |
} |
681 |
} |
682 |
|
683 |
[DataMember] |
684 |
private string _Create_User_ID; |
685 |
public string Create_User_ID |
686 |
{ |
687 |
get |
688 |
{ |
689 |
return _Create_User_ID; |
690 |
} |
691 |
set |
692 |
{ |
693 |
if (_Create_User_ID != value) |
694 |
{ |
695 |
_Create_User_ID = value; |
696 |
OnPropertyChanged("Create_User_ID"); |
697 |
|
698 |
} |
699 |
} |
700 |
} |
701 |
} |
702 |
} |