프로젝트

일반

사용자정보

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

markus / ConvertService / ServiceController / Markus.Service.StationController / Data / FinalPDF.cs @ 5c387707

이력 | 보기 | 이력해설 | 다운로드 (12.2 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 FinalPDF : INotifyPropertyChanged
11
    {
12
        public bool Equals(FinalPDF other)
13
        {
14
            if (other is null)
15
                return false;
16

    
17
            return this.ConvertID == other.ConvertID && this.ProjectNumber == other.ProjectNumber;
18
        }
19

    
20
        public override bool Equals(object obj) => Equals(obj as FinalPDF);
21
        public override int GetHashCode()
22
        {
23
            var id = (ConvertID != null) ? ConvertID : "";
24
            var project = (ProjectNumber != null) ? ProjectNumber : "";
25

    
26
            return (id + project).GetHashCode();
27
        }
28

    
29
        public FinalPDF()
30
        {
31

    
32
        }
33

    
34
        public FinalPDF(string convertId, string projectNo, int Status, string documentID, string markupInfoID, string docInfoID, string documentName, string documentNo, string createUserID,//20
35
           string revision, int currentPageNo, int totalPage, string exception, string groupNo, DateTime create_datetime, DateTime? start_datetime, DateTime? end_datetime, string originfilePath,
36
           string convertPath, string markusLink)
37
        {
38
            DocumentID = documentID;
39
            ConvertID = convertId;
40
            ProjectNumber = projectNo;
41
            MarkupInfo_ID = markupInfoID;
42
            Create_User_ID = createUserID;
43
            ConvertState = (StatusCodeType)Status;
44
            DocInfo_ID = docInfoID;
45
            DocumentName = documentName;
46
            DocumentNo = documentNo;
47
            Revision = revision;
48
            CurrentPageNo = currentPageNo;
49
            TotalPage = totalPage;
50
            Exception = exception;
51
            GroupNo = groupNo;
52
            CreateTime = create_datetime;
53
            StartTime = start_datetime;
54
            EndTime = end_datetime;
55
            ConvertPath = convertPath;
56
            MarkusLink = markusLink;
57
            OriginfilePath = originfilePath;
58

    
59
            TimeSpan duration = TimeSpan.MinValue;
60
            if (EndTime.HasValue)
61
            {
62
                duration = EndTime.Value - CreateTime;
63
            }
64
            if (duration != TimeSpan.MinValue)
65
            {
66
                TotalTime = duration.ToString();
67
            }
68

    
69
            if (OriginfilePath != null)
70
            {
71
                string result = "";
72
                if (originfilePath.Contains("/"))
73
                {
74
                    result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1);
75
                }
76
                else
77
                {
78
                    result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1);
79
                }
80
                this._FileName = result;
81
            }
82
            else
83
            {
84
                this._FileName = "";
85
            }
86
        }
87

    
88
        private string _DocInfo_ID;
89
        public string DocInfo_ID
90
        {
91
            get
92
            {
93
                return _DocInfo_ID;
94
            }
95
            set
96
            {
97
                if (_DocInfo_ID != value)
98
                {
99
                    _DocInfo_ID = value;
100
                    OnPropertyChanged("DocInfo_ID");
101

    
102
                }
103
            }
104
        }
105

    
106
        private string _Create_User_ID;
107
        public string Create_User_ID
108
        {
109
            get
110
            {
111
                return _Create_User_ID;
112
            }
113
            set
114
            {
115
                if (_Create_User_ID != value)
116
                {
117
                    _Create_User_ID = value;
118
                    OnPropertyChanged("Create_User_ID");
119

    
120
                }
121
            }
122
        }
123

    
124
        private string _MarkupInfo_ID;
125
        public string MarkupInfo_ID
126
        {
127
            get
128
            {
129
                return _MarkupInfo_ID;
130
            }
131
            set
132
            {
133
                if (_MarkupInfo_ID != value)
134
                {
135
                    _MarkupInfo_ID = value;
136
                    OnPropertyChanged("MarkupInfo_ID");
137

    
138
                }
139
            }
140
        }
141

    
142
        private string _FileName;
143
        public string FileName
144
        {
145
            get
146
            {
147
                return _FileName;
148
            }
149
            set
150
            {
151
                if (_FileName != value)
152
                {
153
                    _FileName = value;
154
                    OnPropertyChanged("FileName");
155
                }
156
            }
157
        }
158

    
159
        private string _OriginfilePath;
160
        public string OriginfilePath
161
        {
162
            get
163
            {
164
                return _OriginfilePath;
165
            }
166
            set
167
            {
168
                if (_OriginfilePath != value)
169
                {
170
                    _OriginfilePath = value;
171
                    OnPropertyChanged("OriginfilePath");
172
                }
173
            }
174
        }
175

    
176
        private string _MarkusLink;
177
        public string MarkusLink
178
        {
179
            get
180
            {
181
                return _MarkusLink;
182
            }
183
            set
184
            {
185
                if (_MarkusLink != value)
186
                {
187
                    _MarkusLink = value;
188
                    OnPropertyChanged("MarkusLink");
189

    
190
                }
191
            }
192
        }
193

    
194
        private string _ConvertPath;
195
        public string ConvertPath
196
        {
197
            get
198
            {
199
                return _ConvertPath;
200
            }
201
            set
202
            {
203
                if (_ConvertPath != value)
204
                {
205
                    _ConvertPath = value;
206
                    OnPropertyChanged("ConvertPath");
207
                }
208
            }
209
        }
210

    
211
        private string _TotalTime;
212
        public string TotalTime
213
        {
214
            get
215
            {
216
                return _TotalTime;
217
            }
218
            set
219
            {
220
                if (_TotalTime != value)
221
                {
222
                    _TotalTime = value;
223
                    OnPropertyChanged("TotalTime");
224

    
225
                }
226
            }
227
        }
228

    
229
        private DateTime? _EndTime;
230
        public DateTime? EndTime
231
        {
232
            get
233
            {
234
                return _EndTime;
235
            }
236
            set
237
            {
238
                if (value == null)
239
                {
240
                    _EndTime = null;
241
                    OnPropertyChanged("EndTime");
242
                }
243
                else if (_EndTime != value)
244
                {
245
                    _EndTime = value;
246
                    OnPropertyChanged("EndTime");
247
                }
248
            }
249
        }
250

    
251
        private DateTime? _StartTime;
252
        public DateTime? StartTime
253
        {
254
            get
255
            {
256
                return _StartTime;
257
            }
258
            set
259
            {
260
                if (value == null)
261
                {
262
                    _StartTime = null;
263
                    OnPropertyChanged("StartTime");
264
                }
265
                else if (_StartTime != value)
266
                {
267
                    _StartTime = value;
268
                    OnPropertyChanged("StartTime");
269
                }
270
            }
271
        }
272

    
273
        private DateTime _CreateTime;
274
        public DateTime CreateTime
275
        {
276
            get
277
            {
278
                return _CreateTime;
279
            }
280
            set
281
            {
282
                if (_CreateTime != value)
283
                {
284
                    _CreateTime = value;
285
                    OnPropertyChanged("CreateTime");
286
                }
287
            }
288
        }
289

    
290
        private string _GroupNo;
291
        public string GroupNo
292
        {
293
            get
294
            {
295
                return _GroupNo;
296
            }
297
            set
298
            {
299
                if (_GroupNo != value)
300
                {
301
                    _GroupNo = value;
302
                    OnPropertyChanged("GroupNo");
303

    
304
                }
305
            }
306
        }
307

    
308
        private string _Exception;
309
        public string Exception
310
        {
311
            get
312
            {
313
                return _Exception;
314
            }
315
            set
316
            {
317
                if (_Exception != value)
318
                {
319
                    _Exception = value;
320
                    OnPropertyChanged("Exception");
321

    
322
                }
323
            }
324
        }
325

    
326
        private int _TotalPage;
327
        public int TotalPage
328
        {
329
            get
330
            {
331
                return _TotalPage;
332
            }
333
            set
334
            {
335
                if (_TotalPage != value)
336
                {
337
                    _TotalPage = value;
338
                    OnPropertyChanged("TotalPage");
339
                }
340
            }
341
        }
342

    
343
        private int _CurrentPageNo;
344
        public int CurrentPageNo
345
        {
346
            get
347
            {
348
                return _CurrentPageNo;
349
            }
350
            set
351
            {
352
                if (_CurrentPageNo != value)
353
                {
354
                    _CurrentPageNo = value;
355
                    OnPropertyChanged("CurrentPageNo");
356
                }
357
            }
358
        }
359

    
360
        private string _Revision;
361
        public string Revision
362
        {
363
            get
364
            {
365
                return _Revision;
366
            }
367
            set
368
            {
369
                if (_Revision != value)
370
                {
371
                    _Revision = value;
372
                    OnPropertyChanged("Revision");
373

    
374
                }
375
            }
376
        }
377

    
378

    
379
        private string _DocumentNo;
380
        public string DocumentNo
381
        {
382
            get
383
            {
384
                return _DocumentNo;
385
            }
386
            set
387
            {
388
                if (_DocumentNo != value)
389
                {
390
                    _DocumentNo = value;
391
                    OnPropertyChanged("DocumentNo");
392

    
393
                }
394
            }
395
        }
396

    
397
        private string _DocumentName;
398
        public string DocumentName
399
        {
400
            get
401
            {
402
                return _DocumentName;
403
            }
404
            set
405
            {
406
                if (_DocumentName != value)
407
                {
408
                    _DocumentName = value;
409
                    OnPropertyChanged("DocumentName");
410

    
411
                }
412
            }
413
        }
414

    
415
        private StatusCodeType _ConvertState;
416
        public StatusCodeType ConvertState
417
        {
418
            get
419
            {
420
                return _ConvertState;
421
            }
422
            set
423
            {
424
                if (_ConvertState != value)
425
                {
426
                    _ConvertState = value;
427
                    OnPropertyChanged("ConvertState");
428
                }
429
            }
430
        }
431

    
432
        private string _DocumentID;
433
        public string DocumentID
434
        {
435
            get
436
            {
437
                return _DocumentID;
438
            }
439
            set
440
            {
441
                if (_DocumentID != value)
442
                {
443
                    _DocumentID = value;
444
                    OnPropertyChanged("DocumentID");
445

    
446
                }
447
            }
448
        }
449

    
450
        private string _ProjectNumber;
451
        public string ProjectNumber
452
        {
453
            get
454
            {
455
                return _ProjectNumber;
456
            }
457
            set
458
            {
459
                if (_ProjectNumber != value)
460
                {
461
                    _ProjectNumber = value;
462
                    OnPropertyChanged("ProjectNumber");
463
                }
464
            }
465
        }
466

    
467
        private string _ConvertID;
468
        public string ConvertID
469
        {
470
            get
471
            {
472
                return _ConvertID;
473
            }
474
            set
475
            {
476
                if (_ConvertID != value)
477
                {
478
                    _ConvertID = value;
479
                    OnPropertyChanged("ConvertID");
480
                }
481
            }
482
        }
483

    
484
        public event PropertyChangedEventHandler PropertyChanged;
485
        private void OnPropertyChanged(string propertyName)
486
        {
487
            if (PropertyChanged != null)
488
            {
489
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
490
            }
491

    
492
        }
493

    
494
        public enum StatusCodeType
495
        {
496
            None = 0,
497
            Wait = 1,
498
            PageLoading = 2,
499
            Saving = 3,
500
            Completed = 4,
501
            UploadError = 5,
502
            Error11 = 11,
503
            FileError = 50,
504
            PageError = 55,
505
            NeedsPassword = 60,
506
            Error = 99,
507
            All_Error = 100,
508
            All = 1000
509
        }
510
    }
511
}
클립보드 이미지 추가 (최대 크기: 500 MB)