프로젝트

일반

사용자정보

통계
| 개정판:

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ d8bd4799

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

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

    
7
using System.ComponentModel;
8
using System.Runtime.Serialization;
9

    
10
using Newtonsoft.Json;
11

    
12
namespace ID2.Manager.Data.Models
13
{
14
    //[DataContract]
15
    //[JsonObject(IsReference = true)]
16
    public class Documents : NotifyPropertyChange, IEquatable<Documents>
17
    {
18
        //[DataMember]
19
        public int Seq { get; set; }
20
        //[DataMember]
21
        public string DocID { get; set; }
22
        //[DataMember]
23
        public string DocumentNo { get; set; }
24
        //[DataMember]
25
        public string RevisonNo { get; set; }
26
        //[DataMember]
27
        public string System { get; set; }
28
        //[DataMember]
29
        public string SubSystemCode { get; set; }
30
        public string Team { get; set; }
31

    
32
        private string _Simularity = null;
33
        public string Simularity
34
        {
35
            get => this._Simularity;
36
            set => SetProperty(ref this._Simularity, value);
37
        }
38

    
39
        private string _RefProjectCode = string.Empty;
40
        //[DataMember]
41
        public string RefProjectCode
42
        {
43
            get => this._RefProjectCode;
44
            set => SetProperty(ref this._RefProjectCode, value);
45
        }
46

    
47
        private string _JobLevel = string.Empty;
48
        //[DataMember]
49
        public string JobLevel
50
        {
51
            get => this._JobLevel;
52
            set => SetProperty(ref this._JobLevel, value);
53
        }
54

    
55
        private string _PersonInCharge = null;
56
        //[DataMember]
57
        public string PersonInCharge
58
        {
59
            get => this._PersonInCharge;
60
            set => SetProperty(ref this._PersonInCharge, value);
61
        }
62

    
63
        private string _Worker = null;
64
        //[DataMember]
65
        public string Worker
66
        {
67
            get => this._Worker;
68
            set => SetProperty(ref this._Worker, value);
69
        }
70

    
71
        //[DataMember]
72
        public string RegisteredUser { get; set; }
73
        //[DataMember]
74
        public string ModifiedUser { get; set; }
75
        //[DataMember]
76
        public string DeletedUser { get; set; }
77

    
78
        private string _ToIsDiscussion = string.Empty;
79
        //[DataMember]
80
        public string ToIsDiscussion
81
        {
82
            get => this._ToIsDiscussion;
83
            set => SetProperty(ref this._ToIsDiscussion, value);
84
        }
85

    
86
        //[DataMember]
87
        public string ToRemarks { get; set; }
88

    
89
        private string _ToCreator = null;
90
        //[DataMember]
91
        public string ToCreator
92
        {
93
            get => this._ToCreator;
94
            set => SetProperty(ref this._ToCreator, value);
95
        }
96

    
97
        public int ToCapture { get; set; }
98

    
99
        private string _FrReviewStatus = string.Empty;
100
        //[DataMember]
101
        public string FrReviewStatus
102
        {
103
            get => this._FrReviewStatus;
104
            set => SetProperty(ref this._FrReviewStatus, value);
105
        }
106

    
107
        //[DataMember]
108
        public string FrRemarks { get; set; }
109

    
110
        private string _FrCreator = null;
111
        //[DataMember]
112
        public string FrCreator
113
        {
114
            get => this._FrCreator;
115
            set => SetProperty(ref this._FrCreator, value);
116
        }
117

    
118
        public int FrCapture { get; set; }
119
        //[DataMember]
120
        public DateTime? ID2StartDate { get; set; }
121
        //[DataMember]
122
        public DateTime? ID2EndDate { get; set; }
123

    
124

    
125
        private string _ID2Status = string.Empty;
126
        //[DataMember]
127
        public string ID2Status
128
        {
129
            get => this._ID2Status;
130
            set => SetProperty(ref this._ID2Status, value);
131
        }
132

    
133

    
134
        //[DataMember]
135
        public string ID2Issues { get; set; }
136
        public int ID2Capture { get; set; }
137
        //[DataMember]
138
        public string ReplyModifications { get; set; }
139

    
140
        private string _ReplyRequester = null;
141
        //[DataMember]
142
        public string ReplyRequester
143
        {
144
            get => this._ReplyRequester;
145
            set => SetProperty(ref this._ReplyRequester, value);
146
        }
147

    
148
        private string _IsConvert = string.Empty;
149
        //[DataMember]
150
        public string IsConvert
151
        {
152
            get => this._IsConvert;
153
            set => SetProperty(ref this._IsConvert, value);
154
        }
155

    
156
        private string _AVEVAPersonInCharge = null;
157
        //[DataMember]
158
        public string AVEVAPersonInCharge
159
        {
160
            get => this._AVEVAPersonInCharge;
161
            set => SetProperty(ref this._AVEVAPersonInCharge, value);
162
        }
163

    
164
        private string _AVEVAWorker = null;
165
        //[DataMember]
166
        public string AVEVAWorker
167
        {
168
            get => this._AVEVAWorker;
169
            set => SetProperty(ref this._AVEVAWorker, value);
170
        }
171

    
172
        //[DataMember]
173
        public DateTime? AVEVAConvertDate { get; set; }
174
        //[DataMember]
175
        public DateTime? AVEVAReviewDate { get; set; }
176
        //[DataMember]
177
        public DateTime? AVEVAWorkDate { get; set; }
178

    
179
        private string _AVEVAStatus = string.Empty;
180
        //[DataMember]
181
        public string AVEVAStatus
182
        {
183
            get => this._AVEVAStatus;
184
            set => SetProperty(ref this._AVEVAStatus, value);
185
        }
186

    
187
        //[DataMember]
188
        public string AVEVAIssues { get; set; }
189

    
190
        private string _ProdReviewer = null;
191
        //[DataMember]
192
        public string ProdReviewer
193
        {
194
            get => this._ProdReviewer;
195
            set => SetProperty(ref this._ProdReviewer, value);
196
        }
197

    
198
        private string _ProdIsResult = string.Empty;
199
        //[DataMember]
200
        public string ProdIsResult
201
        {
202
            get => this._ProdIsResult;
203
            set => SetProperty(ref this._ProdIsResult, value);
204
        }
205

    
206
        //[DataMember]
207
        public string ProdRemarks { get; set; }
208

    
209
        private string _ClientReviewer = null;
210
        //[DataMember]
211
        public string ClientReviewer
212
        {
213
            get => this._ClientReviewer;
214
            set => SetProperty(ref this._ClientReviewer, value);
215
        }
216

    
217
        private string _ClientIsResult = string.Empty;
218
        //[DataMember]
219
        public string ClientIsResult
220
        {
221
            get => this._ClientIsResult;
222
            set => SetProperty(ref this._ClientIsResult, value);
223
        }
224

    
225
        //[DataMember]
226
        public string ClientRemarks { get; set; }
227

    
228
        private string _DTIsGateWay = string.Empty;
229
        //[DataMember]
230
        public string DTIsGateWay
231
        {
232
            get => this._DTIsGateWay;
233
            set => SetProperty(ref this._DTIsGateWay, value);
234
        }
235

    
236
        private string _DTIsImport = string.Empty;
237
        //[DataMember]
238
        public string DTIsImport
239
        {
240
            get => this._DTIsImport;
241
            set => SetProperty(ref this._DTIsImport, value);
242
        }
243

    
244
        private string _DTIsRegSystem = string.Empty;
245
        //[DataMember]
246
        public string DTIsRegSystem
247
        {
248
            get => this._DTIsRegSystem;
249
            set => SetProperty(ref this._DTIsRegSystem, value);
250
        }
251

    
252
        //[DataMember]
253
        public string DTRemarks { get; set; }
254

    
255
        public List<MarkupText> Markups { get; set; }
256

    
257
        public List<AttFileInfo> AttFiles { get; set; }
258

    
259
        public int ConvertStatus { get; set; }
260

    
261
        public override bool Equals(object obj)
262
        {
263
            return Equals(obj as Documents);
264
        }
265

    
266
        public bool Equals(Documents other)
267
        {
268

    
269
            if (this != null && other == null)
270
                return false;
271

    
272
            if (this.DocumentNo != other.DocumentNo) return false;
273
            if (this.RevisonNo != other.RevisonNo) return false;
274
            if (this.System != other.System) return false;
275
            if (this.SubSystemCode != other.SubSystemCode) return false;
276
            if (this.RefProjectCode != other.RefProjectCode) return false;
277
            if (this.JobLevel != other.JobLevel) return false;
278
            if (this.Simularity != other.Simularity) return false;
279
            if (this.PersonInCharge != other.PersonInCharge) return false;
280
            if (this.Worker != other.Worker) return false;
281
            if (this.ToIsDiscussion != other.ToIsDiscussion) return false;
282
            if (this.ToRemarks != other.ToRemarks) return false;
283
            if (this.ToCreator != other.ToCreator) return false;
284

    
285
            if (this.FrReviewStatus != other.FrReviewStatus) return false;
286
            if (this.FrRemarks != other.FrRemarks) return false;
287
            if (this.FrCreator != other.FrCreator) return false;
288
            if (this.ID2StartDate != other.ID2StartDate) return false;
289
            if (this.ID2EndDate != other.ID2EndDate) return false;
290
            if (this.ID2Status != other.ID2Status) return false;
291
            if (this.ID2Issues != other.ID2Issues) return false;
292
            if (this.ReplyModifications != other.ReplyModifications) return false;
293
            if (this.ReplyRequester != other.ReplyRequester) return false;
294
            if (this.IsConvert != other.IsConvert) return false;
295
            if (this.AVEVAPersonInCharge != other.AVEVAPersonInCharge) return false;
296
            if (this.AVEVAWorker != other.AVEVAWorker) return false;
297
            if (this.AVEVAConvertDate != other.AVEVAConvertDate) return false;
298
            if (this.AVEVAReviewDate != other.AVEVAReviewDate) return false;
299
            if (this.AVEVAWorkDate != other.AVEVAWorkDate) return false;
300
            if (this.AVEVAStatus != other.AVEVAStatus) return false;
301
            if (this.AVEVAIssues != other.AVEVAIssues) return false;
302
            if (this.ProdReviewer != other.ProdReviewer) return false;
303
            if (this.ProdIsResult != other.ProdIsResult) return false;
304
            if (this.ProdRemarks != other.ProdRemarks) return false;
305
            if (this.ClientReviewer != other.ClientReviewer) return false;
306
            if (this.ClientIsResult != other.ClientIsResult) return false;
307
            if (this.ClientRemarks != other.ClientRemarks) return false;
308
            if (this.DTIsGateWay != other.DTIsGateWay) return false;
309
            if (this.DTIsImport != other.DTIsImport) return false;
310
            if (this.DTIsRegSystem != other.DTIsRegSystem) return false;
311
            if (this.DTRemarks != other.DTRemarks) return false;
312
            if (this.ConvertStatus != other.ConvertStatus) return false;
313

    
314
            if (this.AttFiles == null && other.AttFiles == null)
315
            {
316
                return true;
317
            }
318
            else if (this.AttFiles != null && other.AttFiles != null)
319
            {
320
                if (!this.AttFiles.SequenceEqual(other.AttFiles))
321
                    return false;
322
            }
323
            else
324
            {
325
                return false;
326
            }
327

    
328
            //bool result =  this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
329
            //    && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status
330
            //    && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker
331
            //    && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate
332
            //    && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues
333
            //    && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
334
            //    && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
335
            //    && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks && this.ConvertStatus == other.ConvertStatus
336
            //    && isAttfilesEqual;
337

    
338
            //if (result == false)
339
            //{
340
            //    string id = this.DocID;
341
            //}
342

    
343
            return true;
344

    
345
        }
346
        public override int GetHashCode()
347
        {
348
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash()
349
                + this.RefProjectCode.GetNullableHash() + this.JobLevel.GetNullableHash() + this.Simularity.GetNullableHash()
350
                + this.PersonInCharge.GetNullableHash() + this.Worker.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
351
                + this.ToCreator.GetNullableHash()
352
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
353
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash()
354
                + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash()
355
                + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash()
356
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash()
357
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
358
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
359
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash() + this.ConvertStatus.GetNullableHash();
360
        }
361

    
362
        public class DocumentsKeyCompare : IEqualityComparer<Documents>
363
        {
364
            public bool Equals(Documents x, Documents y)
365
            {
366
                if (x == null && y == null)
367
                    return true;
368
                else if (x == null || y == null)
369
                    return false;
370
                else
371
                {
372
                    return x.DocID == y.DocID;
373
                }
374
            }
375

    
376
            public int GetHashCode(Documents obj)
377
            {
378
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
379
            }
380
        }
381

    
382
        public class DocumentsUniqueCompare : IEqualityComparer<Documents>
383
        {
384
            public bool Equals(Documents x, Documents y)
385
            {
386
                if (x == null && y == null)
387
                    return true;
388
                else if (x == null || y == null)
389
                    return false;
390
                else
391
                {
392
                    return x.RefProjectCode == y.RefProjectCode && x.DocumentNo == y.DocumentNo;
393
                }
394
            }
395

    
396
            public int GetHashCode(Documents obj)
397
            {
398
                return (obj.RefProjectCode != null ? obj.RefProjectCode.GetHashCode() : 0) + (obj.DocumentNo != null ? obj.DocumentNo.GetHashCode() : 0);
399
            }
400
        }
401

    
402
        public void DataCopy(Documents docData)
403
        {
404
            this.DocumentNo = docData.DocumentNo;
405
            this.RevisonNo = docData.RevisonNo;
406
            this.System = docData.System;
407
            this.SubSystemCode = docData.SubSystemCode;
408
            this.RefProjectCode = docData.RefProjectCode;
409
            this.JobLevel = docData.JobLevel;
410
            //this.Simularity = docData.Simularity;
411
            this.PersonInCharge = docData.PersonInCharge;
412
            this.Worker = docData.Worker;
413
            this.ToIsDiscussion = docData.ToIsDiscussion;
414
            this.ToRemarks = docData.ToRemarks;
415
            this.ToCreator = docData.ToCreator;
416
            this.ToCapture += docData.ToCapture;
417
            this.FrReviewStatus = docData.FrReviewStatus;
418
            this.FrRemarks = docData.FrRemarks;
419
            this.FrCapture += docData.FrCapture;
420
            this.FrCreator = docData.FrCreator;
421
            this.ID2StartDate = docData.ID2StartDate;
422
            this.ID2EndDate = docData.ID2EndDate;
423
            this.ID2Status = docData.ID2Status;
424
            this.ID2Issues = docData.ID2Issues;
425
            this.ID2Capture += docData.ID2Capture;
426
            this.ReplyModifications = docData.ReplyModifications;
427
            this.ReplyRequester = docData.ReplyRequester;
428
            this.IsConvert = docData.IsConvert;
429
            this.AVEVAPersonInCharge = docData.AVEVAPersonInCharge;
430
            this.AVEVAWorker = docData.AVEVAWorker;
431
            this.AVEVAConvertDate = docData.AVEVAConvertDate;
432
            this.AVEVAReviewDate = docData.AVEVAReviewDate;
433
            this.AVEVAWorkDate = docData.AVEVAWorkDate;
434
            this.AVEVAStatus = docData.AVEVAStatus;
435
            this.AVEVAIssues = docData.AVEVAIssues;
436
            this.ProdReviewer = docData.ProdReviewer;
437
            this.ProdIsResult = docData.ProdIsResult;
438
            this.ProdRemarks = docData.ProdRemarks;
439
            this.ClientReviewer = docData.ClientReviewer;
440
            this.ClientIsResult = docData.ClientIsResult;
441
            this.ClientRemarks = docData.ClientRemarks;
442
            this.DTIsGateWay = docData.DTIsGateWay;
443
            this.DTIsImport = docData.DTIsImport;
444
            this.DTIsRegSystem = docData.DTIsRegSystem;
445
            this.DTRemarks = docData.DTRemarks;
446
            if (this.AttFiles == null)
447
                this.AttFiles = docData.AttFiles;
448
            else
449
                this.AttFiles.AddRange(docData.AttFiles ?? new List<AttFileInfo>());
450
        }
451
    }
452

    
453
    [DataContract]
454
    public class ID2Drawings
455
    {
456
        //[DataMember]
457
        public string PROJECTNAME { get; set; }
458
        //[DataMember]
459
        public string UID { get; set; }
460
        //[DataMember]
461
        public string NAME { get; set; }
462
        //[DataMember]
463
        public string DOCNAME { get; set; }
464
        //[DataMember]
465
        public DateTime? DATETIME { get; set; }
466
        //[DataMember]
467
        public string OCCUPIED { get; set; }
468
        //[DataMember]
469
        public byte[] Image { get; set; }
470
    }
471

    
472
    public class DocumentsResult
473
    {
474
        public List<Documents> Dwgs { get; set; }
475
        public int TotalCount { get; set; }
476
    }
477
}
클립보드 이미지 추가 (최대 크기: 500 MB)