프로젝트

일반

사용자정보

통계
| 개정판:

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 9598eb6e

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