프로젝트

일반

사용자정보

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

markus / ConvertService / ServiceBase / Markus.Service.StationController / Data / DataConvert.cs @ 78683624

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

1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7

    
8
namespace Markus.Service.StationController.Data
9
{
10
    public class DataConvert : INotifyPropertyChanged
11
    {
12
        public event PropertyChangedEventHandler PropertyChanged;
13

    
14
        private void OnPropertyChanged(string propertyName)
15
        {
16
            if (PropertyChanged != null)
17
            {
18
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
19
            }
20

    
21
        }
22
        public DataConvert()
23
        {
24

    
25
        }
26

    
27
        public bool Equals(DataConvert other)
28
        {
29
            if (other is null)
30
                return false;
31

    
32
            return this.ConvertID == other.ConvertID && this.ProjectNumber == other.ProjectNumber;
33
        }
34

    
35
        public override bool Equals(object obj) => Equals(obj as DataConvert);
36
        public override int GetHashCode()
37
        {
38
            var id = (ConvertID != null) ? ConvertID : "";
39
            var project = (ProjectNumber != null) ? ProjectNumber : "";
40

    
41
            return (id + project).GetHashCode();
42
        }
43

    
44
        public DataConvert(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,
45
           DateTime create_datetime, DateTime? start_datetime, DateTime? end_datetime, string originfilePath, string convertPath, string markusLink, int? reconverter)//20
46
        {
47
            ServiceID = serviceID;
48
            DocumentID = documentID;
49
            ConvertID = convertId;
50
            ProjectNumber = projectNo;
51
            ConvertState = (StatusCodeType)Status;
52
            UniqueKey = documentID;
53
            DocumentName = documentName;
54
            DocumentNo = documentNo;
55
            DocumnetURL = document_URL;
56
            Revision = revision;
57
            CurrentPageNo = currentPageNo;
58
            TotalPage = totalPage;
59
            Exception = exception;
60
            GroupNo = groupNo;
61
            CreateTime = create_datetime;
62
            StartTime = start_datetime;
63
            EndTime = end_datetime;
64
            ConvertPath = convertPath;
65
            MarkusLink = markusLink;
66
            OriginfilePath = originfilePath;
67
            ReConverter = reconverter;
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
        private string _FileName;
82
        public string FileName
83
        {
84
            get
85
            {
86
                return _FileName;
87
            }
88
            set
89
            {
90
                if (_FileName != value)
91
                {
92
                    _FileName = value;
93
                    OnPropertyChanged("FileName");
94
                }
95
            }
96
        }
97

    
98
        private int? _ReConverter;
99
        public int? ReConverter
100
        {
101
            get
102
            {
103
                return _ReConverter;
104
            }
105
            set
106
            {
107
                if (_ReConverter != value)
108
                {
109
                    _ReConverter = value;
110
                    OnPropertyChanged("ReConverter");
111
                }
112
            }
113
        }
114

    
115
        private string _OriginfilePath;
116
        public string OriginfilePath
117
        {
118
            get
119
            {
120
                return _OriginfilePath;
121
            }
122
            set
123
            {
124
                if (_OriginfilePath != value)
125
                {
126
                    _OriginfilePath = value;
127
                    OnPropertyChanged("OriginfilePath");
128
                }
129
            }
130
        }
131

    
132
        private string _MarkusLink;
133
        public string MarkusLink
134
        {
135
            get
136
            {
137
                return _MarkusLink;
138
            }
139
            set
140
            {
141
                if (_MarkusLink != value)
142
                {
143
                    _MarkusLink = value;
144
                    OnPropertyChanged("MarkusLink");
145

    
146
                }
147
            }
148
        }
149

    
150
        private string _ConvertPath;
151
        public string ConvertPath
152
        {
153
            get
154
            {
155
                return _ConvertPath;
156
            }
157
            set
158
            {
159
                if (_ConvertPath != value)
160
                {
161
                    _ConvertPath = value;
162
                    OnPropertyChanged("ConvertPath");
163
                }
164
            }
165
        }
166

    
167
        private DateTime? _EndTime;
168
        public DateTime? EndTime
169
        {
170
            get
171
            {
172
                return _EndTime;
173
            }
174
            set
175
            {
176
                if (value == null)
177
                {
178
                    _EndTime = null;
179
                    OnPropertyChanged("EndTime");
180
                }
181
                else if (_EndTime != value)
182
                {
183
                    _EndTime = value;
184
                    OnPropertyChanged("EndTime");
185
                }
186
            }
187
        }
188

    
189
        private DateTime? _StartTime;
190
        public DateTime? StartTime
191
        {
192
            get
193
            {
194
                return _StartTime;
195
            }
196
            set
197
            {
198
                if (value == null)
199
                {
200
                    _StartTime = null;
201
                    OnPropertyChanged("StartTime");
202
                }
203
                else if (_StartTime != value)
204
                {
205
                    _StartTime = value;
206
                    OnPropertyChanged("StartTime");
207
                }
208
            }
209
        }
210

    
211
        private DateTime _CreateTime;
212
        public DateTime CreateTime
213
        {
214
            get
215
            {
216
                return _CreateTime;
217
            }
218
            set
219
            {
220
                if (_CreateTime != value)
221
                {
222
                    _CreateTime = value;
223
                    OnPropertyChanged("CreateTime");
224
                }
225
            }
226
        }
227

    
228
        private string _GroupNo;
229
        public string GroupNo
230
        {
231
            get
232
            {
233
                return _GroupNo;
234
            }
235
            set
236
            {
237
                if (_GroupNo != value)
238
                {
239
                    _GroupNo = value;
240
                    OnPropertyChanged("GroupNo");
241

    
242
                }
243
            }
244
        }
245

    
246
        private string _Exception;
247
        public string Exception
248
        {
249
            get
250
            {
251
                return _Exception;
252
            }
253
            set
254
            {
255
                if (_Exception != value)
256
                {
257
                    _Exception = value;
258
                    OnPropertyChanged("Exception");
259

    
260
                }
261
            }
262
        }
263

    
264
        private int _TotalPage;
265
        public int TotalPage
266
        {
267
            get
268
            {
269
                return _TotalPage;
270
            }
271
            set
272
            {
273
                if (_TotalPage != value)
274
                {
275
                    _TotalPage = value;
276
                    OnPropertyChanged("TotalPage");
277
                }
278
            }
279
        }
280

    
281
        private int _CurrentPageNo;
282
        public int CurrentPageNo
283
        {
284
            get
285
            {
286
                return _CurrentPageNo;
287
            }
288
            set
289
            {
290
                if (_CurrentPageNo != value)
291
                {
292
                    _CurrentPageNo = value;
293
                    OnPropertyChanged("CurrentPageNo");
294
                }
295
            }
296
        }
297

    
298
        private string _Revision;
299
        public string Revision
300
        {
301
            get
302
            {
303
                return _Revision;
304
            }
305
            set
306
            {
307
                if (_Revision != value)
308
                {
309
                    _Revision = value;
310
                    OnPropertyChanged("Revision");
311

    
312
                }
313
            }
314
        }
315

    
316
        private string _DocumnetURL;
317
        public string DocumnetURL
318
        {
319
            get
320
            {
321
                return _DocumnetURL;
322
            }
323
            set
324
            {
325
                if (_DocumnetURL != value)
326
                {
327
                    _DocumnetURL = value;
328
                    OnPropertyChanged("DocumnetURL");
329

    
330
                }
331
            }
332
        }
333

    
334
        private string _DocumentNo;
335
        public string DocumentNo
336
        {
337
            get
338
            {
339
                return _DocumentNo;
340
            }
341
            set
342
            {
343
                if (_DocumentNo != value)
344
                {
345
                    _DocumentNo = value;
346
                    OnPropertyChanged("DocumentNo");
347

    
348
                }
349
            }
350
        }
351

    
352
        private string _DocumentName;
353
        public string DocumentName
354
        {
355
            get
356
            {
357
                return _DocumentName;
358
            }
359
            set
360
            {
361
                if (_DocumentName != value)
362
                {
363
                    _DocumentName = value;
364
                    OnPropertyChanged("DocumentName");
365

    
366
                }
367
            }
368
        }
369

    
370
        private string _UniqueKey;
371
        public string UniqueKey
372
        {
373
            get
374
            {
375
                return _UniqueKey;
376
            }
377
            set
378
            {
379
                if (_UniqueKey != value)
380
                {
381
                    _UniqueKey = value;
382
                    OnPropertyChanged("UniqueKey");
383
                }
384
            }
385
        }
386

    
387
        private StatusCodeType _ConvertState;
388
        public StatusCodeType ConvertState
389
        {
390
            get
391
            {
392
                return _ConvertState;
393
            }
394
            set
395
            {
396
                if (_ConvertState != value)
397
                {
398
                    _ConvertState = value;
399
                    OnPropertyChanged("ConvertState");
400
                }
401
            }
402
        }
403

    
404
        private string _DocumentID;
405
        public string DocumentID
406
        {
407
            get
408
            {
409
                return _DocumentID;
410
            }
411
            set
412
            {
413
                if (_DocumentID != value)
414
                {
415
                    _DocumentID = value;
416
                    OnPropertyChanged("DocumentID");
417

    
418
                }
419
            }
420
        }
421

    
422

    
423
        private string _ConvertID;
424
        public string ConvertID
425
        {
426
            get
427
            {
428
                return _ConvertID;
429
            }
430
            set
431
            {
432
                if (_ConvertID != value)
433
                {
434
                    _ConvertID = value;
435
                    OnPropertyChanged("ConvertID");
436
                }
437
            }
438
        }
439

    
440
        private string _ServiceID;
441
        public string ServiceID
442
        {
443
            get
444
            {
445
                return _ServiceID;
446
            }
447
            set
448
            {
449
                if (_ServiceID != value)
450
                {
451
                    _ServiceID = value;
452
                    OnPropertyChanged("ServiceID");
453
                }
454
            }
455
        }
456

    
457
        private string _ProjectNumber;
458
        public string ProjectNumber
459
        {
460
            get
461
            {
462
                return _ProjectNumber;
463
            }
464
            set
465
            {
466
                if (_ProjectNumber != value)
467
                {
468
                    _ProjectNumber = value;
469
                    OnPropertyChanged("ProjectNumber");
470
                }
471
            }
472
        }
473

    
474
        public enum StatusCodeType
475
        {
476
            None = 0,
477
            Wait = 1,
478
            PageLoading = 2,
479
            Saving = 3,
480
            Completed = 4,
481
            FileError = 50,
482
            PageError = 55,
483
            NeedsPassword = 60,
484
            Error = 99,
485
            All_Error = 100
486
        }
487
    }
488
}
클립보드 이미지 추가 (최대 크기: 500 MB)