프로젝트

일반

사용자정보

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

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 0a6036cb

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

1 5898479a yoush97
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
7 1bd7e3a0 yoush97
using System.ComponentModel;
8 5898479a yoush97
using System.Runtime.Serialization;
9
10 295ce375 yoush97
using Newtonsoft.Json;
11
12 5898479a yoush97
namespace ID2.Manager.Data.Models
13
{
14 25f68105 taeseongkim
    //[DataContract]
15
    //[JsonObject(IsReference = true)]
16 d428fc94 taeseongkim
    public class Documents : NotifyPropertyChange, IEquatable<Documents>
17 5898479a yoush97
    {
18 25f68105 taeseongkim
        //[DataMember]
19 4d2f9e47 yoush97
        public bool Checked { get; set; }
20 25f68105 taeseongkim
        //[DataMember]
21 5898479a yoush97
        public int Seq { get; set; }
22 25f68105 taeseongkim
        //[DataMember]
23 90ae20f6 yoush97
        public string DocID { get; set; }
24 25f68105 taeseongkim
        //[DataMember]
25 5898479a yoush97
        public string DocumentNo { get; set; }
26 25f68105 taeseongkim
        //[DataMember]
27 90ae20f6 yoush97
        public string RevisonNo { get; set; }
28 25f68105 taeseongkim
        //[DataMember]
29 79d7836e yoush97
        public string System { get; set; }
30 25f68105 taeseongkim
        //[DataMember]
31 79d7836e yoush97
        public string SubSystemCode { get; set; }
32 4d2f9e47 yoush97
33
        private string _RefProjectCode = string.Empty;
34 25f68105 taeseongkim
        //[DataMember]
35 4d2f9e47 yoush97
        public string RefProjectCode
36
        {
37
            get => this._RefProjectCode;
38
            set => SetProperty(ref this._RefProjectCode, value);
39
        }
40
41
        private string _JobLevel = string.Empty;
42 25f68105 taeseongkim
        //[DataMember]
43 4d2f9e47 yoush97
        public string JobLevel
44
        {
45
            get => this._JobLevel;
46
            set => SetProperty(ref this._JobLevel, value);
47
        }
48
49
        private string _PersonInCharge = string.Empty;
50 25f68105 taeseongkim
        //[DataMember]
51 4d2f9e47 yoush97
        public string PersonInCharge
52
        {
53
            get => this._PersonInCharge;
54
            set => SetProperty(ref this._PersonInCharge, value);
55
        }
56
57 1bd7e3a0 yoush97
        private string _Worker = string.Empty;
58 25f68105 taeseongkim
        //[DataMember]
59 1bd7e3a0 yoush97
        public string Worker
60
        {
61 4d2f9e47 yoush97
            get =>  this._Worker;
62
            set => SetProperty(ref this._Worker, value);
63 1bd7e3a0 yoush97
        }
64 4d2f9e47 yoush97
65 25f68105 taeseongkim
        //[DataMember]
66 54977253 yoush97
        public string RegisteredUser { get; set; }
67 25f68105 taeseongkim
        //[DataMember]
68 54977253 yoush97
        public string ModifiedUser { get; set; }
69 25f68105 taeseongkim
        //[DataMember]
70 54977253 yoush97
        public string DeletedUser { get; set; }
71 4d2f9e47 yoush97
72
        private string _ToIsDiscussion = string.Empty;
73 25f68105 taeseongkim
        //[DataMember]
74 4d2f9e47 yoush97
        public string ToIsDiscussion
75
        {
76
            get => this._ToIsDiscussion;
77
            set => SetProperty(ref this._ToIsDiscussion, value);
78
        }
79
80 25f68105 taeseongkim
        //[DataMember]
81 5898479a yoush97
        public string ToRemarks { get; set; }
82 4d2f9e47 yoush97
83
        private string _ToCreator = string.Empty;
84 25f68105 taeseongkim
        //[DataMember]
85 4d2f9e47 yoush97
        public string ToCreator
86
        {
87
            get => this._ToCreator;
88
            set => SetProperty(ref this._ToCreator, value);
89
        }
90
91 e8a86b9b yoush97
        public int ToCapture { get; set; }
92 4d2f9e47 yoush97
93
        private string _FrReviewStatus = string.Empty;
94 25f68105 taeseongkim
        //[DataMember]
95 4d2f9e47 yoush97
        public string FrReviewStatus
96
        {
97
            get => this._FrReviewStatus;
98
            set => SetProperty(ref this._FrReviewStatus, value);
99
        }
100
101 25f68105 taeseongkim
        //[DataMember]
102 5898479a yoush97
        public string FrRemarks { get; set; }
103 4d2f9e47 yoush97
104
        private string _FrCreator = string.Empty;
105 25f68105 taeseongkim
        //[DataMember]
106 4d2f9e47 yoush97
        public string FrCreator
107
        {
108
            get => this._FrCreator;
109
            set => SetProperty(ref this._FrCreator, value);
110
        }
111
112 e8a86b9b yoush97
        public int FrCapture { get; set; }
113 25f68105 taeseongkim
        //[DataMember]
114 947e6939 yoush97
        public DateTime? ID2StartDate { get; set; }
115 25f68105 taeseongkim
        //[DataMember]
116 947e6939 yoush97
        public DateTime? ID2EndDate { get; set; }
117 4d2f9e47 yoush97
118
119
        private string _ID2Status = string.Empty;
120 25f68105 taeseongkim
        //[DataMember]
121 4d2f9e47 yoush97
        public string ID2Status
122
        {
123
            get => this._ID2Status;
124
            set => SetProperty(ref this._ID2Status, value);
125
        }
126
127
128 25f68105 taeseongkim
        //[DataMember]
129 90ae20f6 yoush97
        public string ID2Issues { get; set; }
130 f4230b40 yoush97
        public int ID2Capture { get; set; }
131 25f68105 taeseongkim
        //[DataMember]
132 cb2e1138 yoush97
        public string ReplyModifications { get; set; }
133 4d2f9e47 yoush97
134
        private string _ReplyRequester = string.Empty;
135 25f68105 taeseongkim
        //[DataMember]
136 4d2f9e47 yoush97
        public string ReplyRequester
137
        {
138
            get => this._ReplyRequester;
139
            set => SetProperty(ref this._ReplyRequester, value);
140
        }
141
142
        private string _IsConvert = string.Empty;
143 25f68105 taeseongkim
        //[DataMember]
144 4d2f9e47 yoush97
        public string IsConvert
145
        {
146
            get => this._IsConvert;
147
            set => SetProperty(ref this._IsConvert, value);
148
        }
149
150
        private string _AVEVAPersonInCharge = string.Empty;
151 25f68105 taeseongkim
        //[DataMember]
152 4d2f9e47 yoush97
        public string AVEVAPersonInCharge
153
        {
154
            get => this._AVEVAPersonInCharge;
155
            set => SetProperty(ref this._AVEVAPersonInCharge, value);
156
        }
157
158
        private string _AVEVAWorker = string.Empty;
159 25f68105 taeseongkim
        //[DataMember]
160 4d2f9e47 yoush97
        public string AVEVAWorker
161
        {
162
            get => this._AVEVAWorker;
163
            set => SetProperty(ref this._AVEVAWorker, value);
164
        }
165
166 25f68105 taeseongkim
        //[DataMember]
167 482f6326 yoush97
        public DateTime? AVEVAConvertDate { get; set; }
168 25f68105 taeseongkim
        //[DataMember]
169 482f6326 yoush97
        public DateTime? AVEVAReviewDate { get; set; }
170 25f68105 taeseongkim
        //[DataMember]
171 ab3c1c74 yoush97
        public DateTime? AVEVAWorkDate { get; set; }
172 4d2f9e47 yoush97
173
        private string _AVEVAStatus = string.Empty;
174 25f68105 taeseongkim
        //[DataMember]
175 4d2f9e47 yoush97
        public string AVEVAStatus
176
        {
177
            get => this._AVEVAStatus;
178
            set => SetProperty(ref this._AVEVAStatus, value);
179
        }
180
181 25f68105 taeseongkim
        //[DataMember]
182 90ae20f6 yoush97
        public string AVEVAIssues { get; set; }
183 4d2f9e47 yoush97
184
        private string _ProdReviewer = string.Empty;
185 25f68105 taeseongkim
        //[DataMember]
186 4d2f9e47 yoush97
        public string ProdReviewer
187
        {
188
            get => this._ProdReviewer;
189
            set => SetProperty(ref this._ProdReviewer, value);
190
        }
191
192
        private string _ProdIsResult = string.Empty;
193 25f68105 taeseongkim
        //[DataMember]
194 4d2f9e47 yoush97
        public string ProdIsResult
195
        {
196
            get => this._ProdIsResult;
197
            set => SetProperty(ref this._ProdIsResult, value);
198
        }
199
200 25f68105 taeseongkim
        //[DataMember]
201 90ae20f6 yoush97
        public string ProdRemarks { get; set; }
202 4d2f9e47 yoush97
203
        private string _ClientReviewer = string.Empty;
204 25f68105 taeseongkim
        //[DataMember]
205 4d2f9e47 yoush97
        public string ClientReviewer
206
        {
207
            get => this._ClientReviewer;
208
            set => SetProperty(ref this._ClientReviewer, value);
209
        }
210
211
        private string _ClientIsResult = string.Empty;
212 25f68105 taeseongkim
        //[DataMember]
213 4d2f9e47 yoush97
        public string ClientIsResult
214
        {
215
            get => this._ClientIsResult;
216
            set => SetProperty(ref this._ClientIsResult, value);
217
        }
218
219 25f68105 taeseongkim
        //[DataMember]
220 90ae20f6 yoush97
        public string ClientRemarks { get; set; }
221 4d2f9e47 yoush97
222
        private string _DTIsGateWay = string.Empty;
223 25f68105 taeseongkim
        //[DataMember]
224 4d2f9e47 yoush97
        public string DTIsGateWay
225
        {
226
            get => this._DTIsGateWay;
227
            set => SetProperty(ref this._DTIsGateWay, value);
228
        }
229
230
        private string _DTIsImport = string.Empty;
231 25f68105 taeseongkim
        //[DataMember]
232 4d2f9e47 yoush97
        public string DTIsImport
233
        {
234
            get => this._DTIsImport;
235
            set => SetProperty(ref this._DTIsImport, value);
236
        }
237
238
        private string _DTIsRegSystem = string.Empty;
239 25f68105 taeseongkim
        //[DataMember]
240 4d2f9e47 yoush97
        public string DTIsRegSystem
241
        {
242
            get => this._DTIsRegSystem;
243
            set => SetProperty(ref this._DTIsRegSystem, value);
244
        }
245
246 25f68105 taeseongkim
        //[DataMember]
247 947e6939 yoush97
        public string DTRemarks { get; set; }
248 709c1971 yoush97
249 e458a996 taeseongkim
        public List<MarkupText> Markups { get; set; }
250 c0b49a75 taeseongkim
251 08499f5f taeseongkim
        public List<AttFileInfo> AttFiles { get; set; }
252
253 9096bc6d taeseongkim
        public int ConvertStatus { get; set; }
254 08499f5f taeseongkim
255 d428fc94 taeseongkim
        public override bool Equals(object obj)
256
        {
257
            return Equals(obj as Documents);
258
        }
259
260
        public bool Equals(Documents other)
261
        {
262
            bool isAttfilesEqual = false;
263
264
            if (this != null && other == null)
265
                return false;
266
267
            if (this.AttFiles == null && other.AttFiles == null)
268
            {
269
                isAttfilesEqual = true;
270
            }
271 43adf299 taeseongkim
272
            if (isAttfilesEqual)
273 d428fc94 taeseongkim
            {
274 43adf299 taeseongkim
                if (this.DocumentNo != other.DocumentNo)
275
                    return false;
276
277
                if (this.RevisonNo != other.RevisonNo)
278
                    return false;
279
280
                if (this.System != other.System)
281
                    return false;
282
283
                if (this.SubSystemCode != other.SubSystemCode)
284
                    return false;
285
286
                if (this.RefProjectCode != other.RefProjectCode)
287
                    return false;
288
289
                if (this.JobLevel != other.JobLevel)
290
                    return false;
291
292
                if (this.PersonInCharge != other.PersonInCharge)
293
                    return false;
294
295
                if (this.ToIsDiscussion != other.ToIsDiscussion)
296
                    return false;
297
298
                if (this.ToRemarks != other.ToRemarks)
299
                    return false;
300
301
                if (this.ToCreator != other.ToCreator)
302
                    return false;
303
304
                if (this.FrReviewStatus != other.FrReviewStatus) return false;
305
                if ( this.FrRemarks != other.FrRemarks                           )      return false;
306
                if ( this.FrCreator != other.FrCreator                           )      return false;
307
                if ( this.ID2StartDate != other.ID2StartDate                     )      return false;
308
                if ( this.ID2EndDate != other.ID2EndDate                         )      return false;
309
                if ( this.ID2Status != other.ID2Status                           )      return false;
310
                if ( this.ID2Issues != other.ID2Issues                           )      return false;
311
                if ( this.ReplyModifications != other.ReplyModifications         )      return false;
312
                if ( this.ReplyRequester != other.ReplyRequester                 )      return false;
313
                if ( this.IsConvert != other.IsConvert                           )      return false;
314
                if ( this.AVEVAPersonInCharge != other.AVEVAPersonInCharge       )      return false;
315
                if ( this.AVEVAWorker != other.AVEVAWorker                       )      return false;
316
                if ( this.AVEVAConvertDate != other.AVEVAConvertDate             )      return false;
317
                if ( this.AVEVAReviewDate != other.AVEVAReviewDate               )      return false;
318
                if ( this.AVEVAWorkDate != other.AVEVAWorkDate                   )      return false;
319
                if ( this.AVEVAStatus != other.AVEVAStatus                       )      return false;
320
                if ( this.AVEVAIssues != other.AVEVAIssues                       )      return false;
321
                if ( this.ProdReviewer != other.ProdReviewer                     )      return false;
322
                if ( this.ProdIsResult != other.ProdIsResult                     )      return false;
323
                if ( this.ProdRemarks != other.ProdRemarks                       )      return false;
324
                if ( this.ClientReviewer != other.ClientReviewer                 )      return false;
325
                if ( this.ClientIsResult != other.ClientIsResult                 )      return false;
326
                if ( this.ClientRemarks != other.ClientRemarks                   )      return false;
327
                if ( this.DTIsGateWay != other.DTIsGateWay                       )      return false;
328
                if ( this.DTIsImport != other.DTIsImport                         )      return false;
329
                if ( this.DTIsRegSystem != other.DTIsRegSystem                   )      return false;
330
                if ( this.DTRemarks != other.DTRemarks                           )      return false;
331
                if ( this.ConvertStatus != other.ConvertStatus) return false;
332 d428fc94 taeseongkim
            }
333 43adf299 taeseongkim
            else if (this.AttFiles != null && other.AttFiles != null)
334 d428fc94 taeseongkim
            {
335 43adf299 taeseongkim
                if (!this.AttFiles.SequenceEqual(other.AttFiles))
336
                    return false;
337 d428fc94 taeseongkim
            }
338
339 43adf299 taeseongkim
            //bool result =  this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
340
            //    && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status
341
            //    && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker
342
            //    && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate
343
            //    && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues
344
            //    && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
345
            //    && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
346
            //    && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks && this.ConvertStatus == other.ConvertStatus
347
            //    && isAttfilesEqual;
348
349
            //if (result == false)
350
            //{
351
            //    string id = this.DocID;
352
            //}
353
354
            return true;
355 d428fc94 taeseongkim
356
        }
357
        public override int GetHashCode()
358
        {
359
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash()
360
                + this.RefProjectCode.GetNullableHash() + this.JobLevel.GetNullableHash()
361
                + this.PersonInCharge.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
362
                + this.ToCreator.GetNullableHash()
363
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
364
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash()
365
                + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash()
366
                + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash()
367
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash()
368
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
369
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
370
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash() + this.ConvertStatus.GetNullableHash();
371
        }
372 d2d4f84b yoush97
373 f074a104 yoush97
        public class DocumentsKeyCompare : IEqualityComparer<Documents>
374 d2d4f84b yoush97
        {
375
            public bool Equals(Documents x, Documents y)
376
            {
377
                if (x == null && y == null)
378
                    return true;
379
                else if (x == null || y == null)
380
                    return false;
381
                else
382
                {
383
                    return x.DocID == y.DocID;
384
                }
385
            }
386
387
            public int GetHashCode(Documents obj)
388
            {
389
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
390
            }
391
        }
392 f074a104 yoush97
393
        public class DocumentsUniqueCompare : IEqualityComparer<Documents>
394
        {
395
            public bool Equals(Documents x, Documents y)
396
            {
397
                if (x == null && y == null)
398
                    return true;
399
                else if (x == null || y == null)
400
                    return false;
401
                else
402
                {
403
                    return x.RefProjectCode == y.RefProjectCode && x.DocumentNo == y.DocumentNo;
404
                }
405
            }
406
407
            public int GetHashCode(Documents obj)
408
            {
409
                return (obj.RefProjectCode != null ? obj.RefProjectCode.GetHashCode() : 0) + (obj.DocumentNo != null ? obj.DocumentNo.GetHashCode() : 0);
410
            }
411
        }
412
413 e9700266 yoush97
        public void DataCopy(Documents docData)
414 f074a104 yoush97
        {
415 e9700266 yoush97
            this.DocumentNo = docData.DocumentNo;
416
            this.RevisonNo = docData.RevisonNo;
417
            this.System = docData.System;
418
            this.SubSystemCode = docData.SubSystemCode;
419
            this.RefProjectCode = docData.RefProjectCode;
420
            this.JobLevel = docData.JobLevel;
421
            this.PersonInCharge = docData.PersonInCharge;
422
            this.ToIsDiscussion = docData.ToIsDiscussion;
423
            this.ToRemarks = docData.ToRemarks;
424
            this.ToCreator = docData.ToCreator;
425
            this.ToCapture += docData.ToCapture;
426
            this.FrReviewStatus = docData.FrReviewStatus;
427
            this.FrRemarks = docData.FrRemarks;
428
            this.FrCapture += docData.FrCapture;
429
            this.FrCreator = docData.FrCreator;
430
            this.ID2StartDate = docData.ID2StartDate;
431
            this.ID2EndDate = docData.ID2EndDate;
432
            this.ID2Status = docData.ID2Status;
433
            this.ID2Issues = docData.ID2Issues;
434
            this.ID2Capture += docData.ID2Capture;
435
            this.ReplyModifications = docData.ReplyModifications;
436
            this.ReplyRequester = docData.ReplyRequester;
437
            this.IsConvert = docData.IsConvert;
438
            this.AVEVAPersonInCharge = docData.AVEVAPersonInCharge;
439
            this.AVEVAWorker = docData.AVEVAWorker;
440
            this.AVEVAConvertDate = docData.AVEVAConvertDate;
441
            this.AVEVAReviewDate = docData.AVEVAReviewDate;
442
            this.AVEVAWorkDate = docData.AVEVAWorkDate;
443
            this.AVEVAStatus = docData.AVEVAStatus;
444
            this.AVEVAIssues = docData.AVEVAIssues;
445
            this.ProdReviewer = docData.ProdReviewer;
446
            this.ProdIsResult = docData.ProdIsResult;
447
            this.ProdRemarks = docData.ProdRemarks;
448
            this.ClientReviewer = docData.ClientReviewer;
449
            this.ClientIsResult = docData.ClientIsResult;
450
            this.ClientRemarks = docData.ClientRemarks;
451
            this.DTIsGateWay = docData.DTIsGateWay;
452
            this.DTIsImport = docData.DTIsImport;
453
            this.DTIsRegSystem = docData.DTIsRegSystem;
454
            this.DTRemarks = docData.DTRemarks;
455 f074a104 yoush97
            if (this.AttFiles == null)
456 e9700266 yoush97
                this.AttFiles = docData.AttFiles;
457 f074a104 yoush97
            else
458 e9700266 yoush97
                this.AttFiles.AddRange(docData.AttFiles ?? new List<AttFileInfo>());
459 f074a104 yoush97
        }
460 5898479a yoush97
    }
461 fe57f64a yoush97
462
    [DataContract]
463
    public class ID2Drawings
464
    {
465 25f68105 taeseongkim
        //[DataMember]
466 e458a996 taeseongkim
        public string PROJECTNAME { get; set; }
467 25f68105 taeseongkim
        //[DataMember]
468 fe57f64a yoush97
        public string UID { get; set; }
469 25f68105 taeseongkim
        //[DataMember]
470 fe57f64a yoush97
        public string NAME { get; set; }
471 25f68105 taeseongkim
        //[DataMember]
472 fe57f64a yoush97
        public string DOCNAME { get; set; }
473 25f68105 taeseongkim
        //[DataMember]
474 fe57f64a yoush97
        public DateTime? DATETIME { get; set; }
475 25f68105 taeseongkim
        //[DataMember]
476 fe57f64a yoush97
        public string OCCUPIED { get; set; }
477 25f68105 taeseongkim
        //[DataMember]
478 fe57f64a yoush97
        public byte[] Image { get; set; }
479
    }
480 904fbe46 yoush97
481
    public class DocumentsResult
482
    {
483
        public List<Documents> Dwgs { get; set; }
484
        public int TotalCount { get; set; }
485
    }
486 5898479a yoush97
}
클립보드 이미지 추가 (최대 크기: 500 MB)