프로젝트

일반

사용자정보

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

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 3fbf99d3

이력 | 보기 | 이력해설 | 다운로드 (18.5 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
263
            if (this != null && other == null)
264
                return false;
265
266 62e3647c yoush97
            if ( this.DocumentNo != other.DocumentNo                  ) return false;
267
            if ( this.RevisonNo != other.RevisonNo                    ) return false;
268
            if ( this.System != other.System                          ) return false;
269
            if ( this.SubSystemCode != other.SubSystemCode            ) return false;
270
            if ( this.RefProjectCode != other.RefProjectCode          ) return false;
271
            if ( this.JobLevel != other.JobLevel                      ) return false;
272
            if ( this.PersonInCharge != other.PersonInCharge          ) return false;
273
            if ( this.Worker != other.Worker                          ) return false;
274
            if ( this.ToIsDiscussion != other.ToIsDiscussion          ) return false;
275
            if ( this.ToRemarks != other.ToRemarks                    ) return false;
276
            if ( this.ToCreator != other.ToCreator                    ) return false;
277
278
            if ( this.FrReviewStatus != other.FrReviewStatus          ) return false;
279
            if ( this.FrRemarks != other.FrRemarks                    ) return false;
280
            if ( this.FrCreator != other.FrCreator                    ) return false;
281
            if ( this.ID2StartDate != other.ID2StartDate              ) return false;
282
            if ( this.ID2EndDate != other.ID2EndDate                  ) return false;
283
            if ( this.ID2Status != other.ID2Status                    ) return false;
284
            if ( this.ID2Issues != other.ID2Issues                    ) return false;
285
            if ( this.ReplyModifications != other.ReplyModifications  ) return false;
286
            if ( this.ReplyRequester != other.ReplyRequester          ) return false;
287
            if ( this.IsConvert != other.IsConvert                    ) return false;
288
            if ( this.AVEVAPersonInCharge != other.AVEVAPersonInCharge) return false;
289
            if ( this.AVEVAWorker != other.AVEVAWorker                ) return false;
290
            if ( this.AVEVAConvertDate != other.AVEVAConvertDate      ) return false;
291
            if ( this.AVEVAReviewDate != other.AVEVAReviewDate        ) return false;
292
            if ( this.AVEVAWorkDate != other.AVEVAWorkDate            ) return false;
293
            if ( this.AVEVAStatus != other.AVEVAStatus                ) return false;
294
            if ( this.AVEVAIssues != other.AVEVAIssues                ) return false;
295
            if ( this.ProdReviewer != other.ProdReviewer              ) return false;
296
            if ( this.ProdIsResult != other.ProdIsResult              ) return false;
297
            if ( this.ProdRemarks != other.ProdRemarks                ) return false;
298
            if ( this.ClientReviewer != other.ClientReviewer          ) return false;
299
            if ( this.ClientIsResult != other.ClientIsResult          ) return false;
300
            if ( this.ClientRemarks != other.ClientRemarks            ) return false;
301
            if ( this.DTIsGateWay != other.DTIsGateWay                ) return false;
302
            if ( this.DTIsImport != other.DTIsImport                  ) return false;
303
            if ( this.DTIsRegSystem != other.DTIsRegSystem            ) return false;
304
            if ( this.DTRemarks != other.DTRemarks                    ) return false;
305
            if ( this.ConvertStatus != other.ConvertStatus            ) return false;
306
307 d428fc94 taeseongkim
            if (this.AttFiles == null && other.AttFiles == null)
308
            {
309 62e3647c yoush97
                return true;
310 d428fc94 taeseongkim
            }
311 43adf299 taeseongkim
            else if (this.AttFiles != null && other.AttFiles != null)
312 d428fc94 taeseongkim
            {
313 43adf299 taeseongkim
                if (!this.AttFiles.SequenceEqual(other.AttFiles))
314
                    return false;
315 d428fc94 taeseongkim
            }
316 62e3647c yoush97
            else
317
            {
318
                return false;
319
            }
320 d428fc94 taeseongkim
321 43adf299 taeseongkim
            //bool result =  this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
322
            //    && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status
323
            //    && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker
324
            //    && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate
325
            //    && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues
326
            //    && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
327
            //    && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
328
            //    && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks && this.ConvertStatus == other.ConvertStatus
329
            //    && isAttfilesEqual;
330
331
            //if (result == false)
332
            //{
333
            //    string id = this.DocID;
334
            //}
335
336
            return true;
337 d428fc94 taeseongkim
338
        }
339
        public override int GetHashCode()
340
        {
341
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash()
342
                + this.RefProjectCode.GetNullableHash() + this.JobLevel.GetNullableHash()
343 62e3647c yoush97
                + this.PersonInCharge.GetNullableHash() + this.Worker.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
344 d428fc94 taeseongkim
                + this.ToCreator.GetNullableHash()
345
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
346
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash()
347
                + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash()
348
                + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash()
349
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash()
350
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
351
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
352
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash() + this.ConvertStatus.GetNullableHash();
353
        }
354 d2d4f84b yoush97
355 f074a104 yoush97
        public class DocumentsKeyCompare : IEqualityComparer<Documents>
356 d2d4f84b yoush97
        {
357
            public bool Equals(Documents x, Documents y)
358
            {
359
                if (x == null && y == null)
360
                    return true;
361
                else if (x == null || y == null)
362
                    return false;
363
                else
364
                {
365
                    return x.DocID == y.DocID;
366
                }
367
            }
368
369
            public int GetHashCode(Documents obj)
370
            {
371
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
372
            }
373
        }
374 f074a104 yoush97
375
        public class DocumentsUniqueCompare : IEqualityComparer<Documents>
376
        {
377
            public bool Equals(Documents x, Documents y)
378
            {
379
                if (x == null && y == null)
380
                    return true;
381
                else if (x == null || y == null)
382
                    return false;
383
                else
384
                {
385
                    return x.RefProjectCode == y.RefProjectCode && x.DocumentNo == y.DocumentNo;
386
                }
387
            }
388
389
            public int GetHashCode(Documents obj)
390
            {
391
                return (obj.RefProjectCode != null ? obj.RefProjectCode.GetHashCode() : 0) + (obj.DocumentNo != null ? obj.DocumentNo.GetHashCode() : 0);
392
            }
393
        }
394
395 e9700266 yoush97
        public void DataCopy(Documents docData)
396 f074a104 yoush97
        {
397 e9700266 yoush97
            this.DocumentNo = docData.DocumentNo;
398
            this.RevisonNo = docData.RevisonNo;
399
            this.System = docData.System;
400
            this.SubSystemCode = docData.SubSystemCode;
401
            this.RefProjectCode = docData.RefProjectCode;
402
            this.JobLevel = docData.JobLevel;
403
            this.PersonInCharge = docData.PersonInCharge;
404 62e3647c yoush97
            this.Worker = docData.Worker;
405 e9700266 yoush97
            this.ToIsDiscussion = docData.ToIsDiscussion;
406
            this.ToRemarks = docData.ToRemarks;
407
            this.ToCreator = docData.ToCreator;
408
            this.ToCapture += docData.ToCapture;
409
            this.FrReviewStatus = docData.FrReviewStatus;
410
            this.FrRemarks = docData.FrRemarks;
411
            this.FrCapture += docData.FrCapture;
412
            this.FrCreator = docData.FrCreator;
413
            this.ID2StartDate = docData.ID2StartDate;
414
            this.ID2EndDate = docData.ID2EndDate;
415
            this.ID2Status = docData.ID2Status;
416
            this.ID2Issues = docData.ID2Issues;
417
            this.ID2Capture += docData.ID2Capture;
418
            this.ReplyModifications = docData.ReplyModifications;
419
            this.ReplyRequester = docData.ReplyRequester;
420
            this.IsConvert = docData.IsConvert;
421
            this.AVEVAPersonInCharge = docData.AVEVAPersonInCharge;
422
            this.AVEVAWorker = docData.AVEVAWorker;
423
            this.AVEVAConvertDate = docData.AVEVAConvertDate;
424
            this.AVEVAReviewDate = docData.AVEVAReviewDate;
425
            this.AVEVAWorkDate = docData.AVEVAWorkDate;
426
            this.AVEVAStatus = docData.AVEVAStatus;
427
            this.AVEVAIssues = docData.AVEVAIssues;
428
            this.ProdReviewer = docData.ProdReviewer;
429
            this.ProdIsResult = docData.ProdIsResult;
430
            this.ProdRemarks = docData.ProdRemarks;
431
            this.ClientReviewer = docData.ClientReviewer;
432
            this.ClientIsResult = docData.ClientIsResult;
433
            this.ClientRemarks = docData.ClientRemarks;
434
            this.DTIsGateWay = docData.DTIsGateWay;
435
            this.DTIsImport = docData.DTIsImport;
436
            this.DTIsRegSystem = docData.DTIsRegSystem;
437
            this.DTRemarks = docData.DTRemarks;
438 f074a104 yoush97
            if (this.AttFiles == null)
439 e9700266 yoush97
                this.AttFiles = docData.AttFiles;
440 f074a104 yoush97
            else
441 e9700266 yoush97
                this.AttFiles.AddRange(docData.AttFiles ?? new List<AttFileInfo>());
442 f074a104 yoush97
        }
443 5898479a yoush97
    }
444 fe57f64a yoush97
445
    [DataContract]
446
    public class ID2Drawings
447
    {
448 25f68105 taeseongkim
        //[DataMember]
449 e458a996 taeseongkim
        public string PROJECTNAME { get; set; }
450 25f68105 taeseongkim
        //[DataMember]
451 fe57f64a yoush97
        public string UID { get; set; }
452 25f68105 taeseongkim
        //[DataMember]
453 fe57f64a yoush97
        public string NAME { get; set; }
454 25f68105 taeseongkim
        //[DataMember]
455 fe57f64a yoush97
        public string DOCNAME { get; set; }
456 25f68105 taeseongkim
        //[DataMember]
457 fe57f64a yoush97
        public DateTime? DATETIME { get; set; }
458 25f68105 taeseongkim
        //[DataMember]
459 fe57f64a yoush97
        public string OCCUPIED { get; set; }
460 25f68105 taeseongkim
        //[DataMember]
461 fe57f64a yoush97
        public byte[] Image { get; set; }
462
    }
463 904fbe46 yoush97
464
    public class DocumentsResult
465
    {
466
        public List<Documents> Dwgs { get; set; }
467
        public int TotalCount { get; set; }
468
    }
469 5898479a yoush97
}
클립보드 이미지 추가 (최대 크기: 500 MB)