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