프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / ConvertService / ServiceBase / IServiceBase / ConvertItem.cs @ 5a954acc

이력 | 보기 | 이력해설 | 다운로드 (13.8 KB)

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