프로젝트

일반

사용자정보

통계
| 개정판:

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

이력 | 보기 | 이력해설 | 다운로드 (19.6 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 _Simularity2 = null;
40
        public string Simularity2
41
        {
42
            get => this._Simularity2;
43
            set => SetProperty(ref this._Simularity2, value);
44
        }
45

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

    
54
        private string _JobLevel = string.Empty;
55
        //[DataMember]
56
        public string JobLevel
57
        {
58
            get => this._JobLevel;
59
            set => SetProperty(ref this._JobLevel, value);
60
        }
61

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

    
70
        private string _Worker = null;
71
        //[DataMember]
72
        public string Worker
73
        {
74
            get => this._Worker;
75
            set => SetProperty(ref this._Worker, value);
76
        }
77

    
78
        //[DataMember]
79
        public string RegisteredUser { get; set; }
80
        //[DataMember]
81
        public string ModifiedUser { get; set; }
82
        //[DataMember]
83
        public string DeletedUser { get; set; }
84

    
85
        private string _ToIsDiscussion = string.Empty;
86
        //[DataMember]
87
        public string ToIsDiscussion
88
        {
89
            get => this._ToIsDiscussion;
90
            set => SetProperty(ref this._ToIsDiscussion, value);
91
        }
92

    
93
        //[DataMember]
94
        public string ToRemarks { get; set; }
95

    
96
        private string _ToCreator = null;
97
        //[DataMember]
98
        public string ToCreator
99
        {
100
            get => this._ToCreator;
101
            set => SetProperty(ref this._ToCreator, value);
102
        }
103

    
104
        public int ToCapture { get; set; }
105

    
106
        private string _FrReviewStatus = string.Empty;
107
        //[DataMember]
108
        public string FrReviewStatus
109
        {
110
            get => this._FrReviewStatus;
111
            set => SetProperty(ref this._FrReviewStatus, value);
112
        }
113

    
114
        //[DataMember]
115
        public string FrRemarks { get; set; }
116

    
117
        private string _FrCreator = null;
118
        //[DataMember]
119
        public string FrCreator
120
        {
121
            get => this._FrCreator;
122
            set => SetProperty(ref this._FrCreator, value);
123
        }
124

    
125
        public int FrCapture { get; set; }
126
        //[DataMember]
127
        public DateTime? ID2StartDate { get; set; }
128
        //[DataMember]
129
        public DateTime? ID2EndDate { get; set; }
130

    
131

    
132
        private string _ID2Status = string.Empty;
133
        //[DataMember]
134
        public string ID2Status
135
        {
136
            get => this._ID2Status;
137
            set => SetProperty(ref this._ID2Status, value);
138
        }
139

    
140

    
141
        //[DataMember]
142
        public string ID2Issues { get; set; }
143
        public int ID2Capture { get; set; }
144
        //[DataMember]
145
        public string ReplyModifications { get; set; }
146

    
147
        private string _ReplyRequester = null;
148
        //[DataMember]
149
        public string ReplyRequester
150
        {
151
            get => this._ReplyRequester;
152
            set => SetProperty(ref this._ReplyRequester, value);
153
        }
154

    
155
        private string _IsConvert = string.Empty;
156
        //[DataMember]
157
        public string IsConvert
158
        {
159
            get => this._IsConvert;
160
            set => SetProperty(ref this._IsConvert, value);
161
        }
162

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

    
171
        private string _AVEVAWorker = null;
172
        //[DataMember]
173
        public string AVEVAWorker
174
        {
175
            get => this._AVEVAWorker;
176
            set => SetProperty(ref this._AVEVAWorker, value);
177
        }
178

    
179
        //[DataMember]
180
        public DateTime? AVEVAConvertDate { get; set; }
181
        //[DataMember]
182
        public DateTime? AVEVAReviewDate { get; set; }
183
        //[DataMember]
184
        public DateTime? AVEVAWorkDate { get; set; }
185

    
186
        private string _AVEVAStatus = string.Empty;
187
        //[DataMember]
188
        public string AVEVAStatus
189
        {
190
            get => this._AVEVAStatus;
191
            set => SetProperty(ref this._AVEVAStatus, value);
192
        }
193

    
194
        //[DataMember]
195
        public string AVEVAIssues { get; set; }
196

    
197
        private string _ProdReviewer = null;
198
        //[DataMember]
199
        public string ProdReviewer
200
        {
201
            get => this._ProdReviewer;
202
            set => SetProperty(ref this._ProdReviewer, value);
203
        }
204

    
205
        private string _ProdIsResult = string.Empty;
206
        //[DataMember]
207
        public string ProdIsResult
208
        {
209
            get => this._ProdIsResult;
210
            set => SetProperty(ref this._ProdIsResult, value);
211
        }
212

    
213
        //[DataMember]
214
        public string ProdRemarks { get; set; }
215

    
216
        private string _ClientReviewer = null;
217
        //[DataMember]
218
        public string ClientReviewer
219
        {
220
            get => this._ClientReviewer;
221
            set => SetProperty(ref this._ClientReviewer, value);
222
        }
223

    
224
        private string _ClientIsResult = string.Empty;
225
        //[DataMember]
226
        public string ClientIsResult
227
        {
228
            get => this._ClientIsResult;
229
            set => SetProperty(ref this._ClientIsResult, value);
230
        }
231

    
232
        //[DataMember]
233
        public string ClientRemarks { get; set; }
234

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

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

    
251
        private string _DTIsRegSystem = string.Empty;
252
        //[DataMember]
253
        public string DTIsRegSystem
254
        {
255
            get => this._DTIsRegSystem;
256
            set => SetProperty(ref this._DTIsRegSystem, value);
257
        }
258

    
259
        //[DataMember]
260
        public string DTRemarks { get; set; }
261

    
262
        public List<MarkupText> Markups { get; set; }
263

    
264
        public List<AttFileInfo> AttFiles { get; set; }
265

    
266
        public int ConvertStatus { get; set; }
267

    
268
        /// <summary>
269
        /// Local에 위치한 Drawing Folder
270
        /// </summary>
271
        public string LocalDrawingFolder { get; set; }
272

    
273
        public override bool Equals(object obj)
274
        {
275
            return Equals(obj as Documents);
276
        }
277

    
278
        public bool Equals(Documents other)
279
        {
280

    
281
            if (this != null && other == null)
282
                return false;
283

    
284
            if (this.DocumentNo != other.DocumentNo) return false;
285
            if (this.RevisonNo != other.RevisonNo) return false;
286
            if (this.System != other.System) return false;
287
            if (this.SubSystemCode != other.SubSystemCode) return false;
288
            if (this.RefProjectCode != other.RefProjectCode) return false;
289
            if (this.JobLevel != other.JobLevel) return false;
290
            if (this.Simularity != other.Simularity) return false;
291
            if (this.Simularity2 != other.Simularity2) return false;
292
            if (this.PersonInCharge != other.PersonInCharge) return false;
293
            if (this.Worker != other.Worker) return false;
294
            if (this.ToIsDiscussion != other.ToIsDiscussion) return false;
295
            if (this.ToRemarks != other.ToRemarks) return false;
296
            if (this.ToCreator != other.ToCreator) return false;
297

    
298
            if (this.FrReviewStatus != other.FrReviewStatus) return false;
299
            if (this.FrRemarks != other.FrRemarks) return false;
300
            if (this.FrCreator != other.FrCreator) return false;
301
            if (this.ID2StartDate != other.ID2StartDate) return false;
302
            if (this.ID2EndDate != other.ID2EndDate) return false;
303
            if (this.ID2Status != other.ID2Status) return false;
304
            if (this.ID2Issues != other.ID2Issues) return false;
305
            if (this.ReplyModifications != other.ReplyModifications) return false;
306
            if (this.ReplyRequester != other.ReplyRequester) return false;
307
            if (this.IsConvert != other.IsConvert) return false;
308
            if (this.AVEVAPersonInCharge != other.AVEVAPersonInCharge) return false;
309
            if (this.AVEVAWorker != other.AVEVAWorker) return false;
310
            if (this.AVEVAConvertDate != other.AVEVAConvertDate) return false;
311
            if (this.AVEVAReviewDate != other.AVEVAReviewDate) return false;
312
            if (this.AVEVAWorkDate != other.AVEVAWorkDate) return false;
313
            if (this.AVEVAStatus != other.AVEVAStatus) return false;
314
            if (this.AVEVAIssues != other.AVEVAIssues) return false;
315
            if (this.ProdReviewer != other.ProdReviewer) return false;
316
            if (this.ProdIsResult != other.ProdIsResult) return false;
317
            if (this.ProdRemarks != other.ProdRemarks) return false;
318
            if (this.ClientReviewer != other.ClientReviewer) return false;
319
            if (this.ClientIsResult != other.ClientIsResult) return false;
320
            if (this.ClientRemarks != other.ClientRemarks) return false;
321
            if (this.DTIsGateWay != other.DTIsGateWay) return false;
322
            if (this.DTIsImport != other.DTIsImport) return false;
323
            if (this.DTIsRegSystem != other.DTIsRegSystem) return false;
324
            if (this.DTRemarks != other.DTRemarks) return false;
325
            if (this.ConvertStatus != other.ConvertStatus) return false;
326

    
327
            if (this.AttFiles == null && other.AttFiles == null)
328
            {
329
                return true;
330
            }
331
            else if (this.AttFiles != null && other.AttFiles != null)
332
            {
333
                if (!this.AttFiles.SequenceEqual(other.AttFiles))
334
                    return false;
335
            }
336
            else
337
            {
338
                return false;
339
            }
340

    
341
            //bool result =  this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
342
            //    && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status
343
            //    && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker
344
            //    && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate
345
            //    && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues
346
            //    && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
347
            //    && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
348
            //    && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks && this.ConvertStatus == other.ConvertStatus
349
            //    && isAttfilesEqual;
350

    
351
            //if (result == false)
352
            //{
353
            //    string id = this.DocID;
354
            //}
355

    
356
            return true;
357

    
358
        }
359
        public override int GetHashCode()
360
        {
361
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash()
362
                + this.RefProjectCode.GetNullableHash() + this.JobLevel.GetNullableHash() + this.Simularity.GetNullableHash() + this.Simularity2.GetNullableHash()
363
                + this.PersonInCharge.GetNullableHash() + this.Worker.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
364
                + this.ToCreator.GetNullableHash()
365
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
366
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash()
367
                + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash()
368
                + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash()
369
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash()
370
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
371
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
372
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash() + this.ConvertStatus.GetNullableHash();
373
        }
374

    
375
        public class DocumentsKeyCompare : 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.DocID == y.DocID;
386
                }
387
            }
388

    
389
            public int GetHashCode(Documents obj)
390
            {
391
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
392
            }
393
        }
394

    
395
        public class DocumentsUniqueCompare : IEqualityComparer<Documents>
396
        {
397
            public bool Equals(Documents x, Documents y)
398
            {
399
                if (x == null && y == null)
400
                    return true;
401
                else if (x == null || y == null)
402
                    return false;
403
                else
404
                {
405
                    return x.RefProjectCode == y.RefProjectCode && x.DocumentNo == y.DocumentNo;
406
                }
407
            }
408

    
409
            public int GetHashCode(Documents obj)
410
            {
411
                return (obj.RefProjectCode != null ? obj.RefProjectCode.GetHashCode() : 0) + (obj.DocumentNo != null ? obj.DocumentNo.GetHashCode() : 0);
412
            }
413
        }
414

    
415
        public void DataCopy(Documents docData)
416
        {
417
            this.DocumentNo = docData.DocumentNo;
418
            this.RevisonNo = docData.RevisonNo;
419
            this.System = docData.System;
420
            this.SubSystemCode = docData.SubSystemCode;
421
            this.RefProjectCode = docData.RefProjectCode;
422
            this.JobLevel = docData.JobLevel;
423
            //this.Simularity = docData.Simularity;
424
            //this.Simularity2 = docData.Simularity2;
425
            this.PersonInCharge = docData.PersonInCharge;
426
            this.Worker = docData.Worker;
427
            this.ToIsDiscussion = docData.ToIsDiscussion;
428
            this.ToRemarks = docData.ToRemarks;
429
            this.ToCreator = docData.ToCreator;
430
            this.ToCapture += docData.ToCapture;
431
            this.FrReviewStatus = docData.FrReviewStatus;
432
            this.FrRemarks = docData.FrRemarks;
433
            this.FrCapture += docData.FrCapture;
434
            this.FrCreator = docData.FrCreator;
435
            this.ID2StartDate = docData.ID2StartDate;
436
            this.ID2EndDate = docData.ID2EndDate;
437
            this.ID2Status = docData.ID2Status;
438
            this.ID2Issues = docData.ID2Issues;
439
            this.ID2Capture += docData.ID2Capture;
440
            this.ReplyModifications = docData.ReplyModifications;
441
            this.ReplyRequester = docData.ReplyRequester;
442
            this.IsConvert = docData.IsConvert;
443
            this.AVEVAPersonInCharge = docData.AVEVAPersonInCharge;
444
            this.AVEVAWorker = docData.AVEVAWorker;
445
            this.AVEVAConvertDate = docData.AVEVAConvertDate;
446
            this.AVEVAReviewDate = docData.AVEVAReviewDate;
447
            this.AVEVAWorkDate = docData.AVEVAWorkDate;
448
            this.AVEVAStatus = docData.AVEVAStatus;
449
            this.AVEVAIssues = docData.AVEVAIssues;
450
            this.ProdReviewer = docData.ProdReviewer;
451
            this.ProdIsResult = docData.ProdIsResult;
452
            this.ProdRemarks = docData.ProdRemarks;
453
            this.ClientReviewer = docData.ClientReviewer;
454
            this.ClientIsResult = docData.ClientIsResult;
455
            this.ClientRemarks = docData.ClientRemarks;
456
            this.DTIsGateWay = docData.DTIsGateWay;
457
            this.DTIsImport = docData.DTIsImport;
458
            this.DTIsRegSystem = docData.DTIsRegSystem;
459
            this.DTRemarks = docData.DTRemarks;
460
            if (this.AttFiles == null)
461
                this.AttFiles = docData.AttFiles;
462
            else
463
                this.AttFiles.AddRange(docData.AttFiles ?? new List<AttFileInfo>());
464
        }
465
    }
466

    
467
    [DataContract]
468
    public class ID2Drawings
469
    {
470
        //[DataMember]
471
        public string PROJECTNAME { get; set; }
472
        //[DataMember]
473
        public string UID { get; set; }
474
        //[DataMember]
475
        public string NAME { get; set; }
476
        //[DataMember]
477
        public string DOCNAME { get; set; }
478
        //[DataMember]
479
        public DateTime? DATETIME { get; set; }
480
        //[DataMember]
481
        public string OCCUPIED { get; set; }
482
        //[DataMember]
483
        public byte[] Image { get; set; }
484
    }
485

    
486
    [DataContract]
487
    public class ID2Symbol
488
    {
489
        [DisplayName("Project")]
490
        [ReadOnly(true)]
491
        public string PrjName { get; set; }
492
        [Browsable(false)]
493
        [ReadOnly(true)]
494
        public string PrjPath { get; set; }
495
        [DataMember]
496
        [ReadOnly(true)]
497
        public string Name { get; set; }
498
        [DataMember]
499
        [ReadOnly(true)]
500
        public string Type { get; set; }
501
        [DataMember]
502
        [Browsable(false)]
503
        [ReadOnly(true)]
504
        public string OriginalPoint { get; set; }
505
        [DataMember]
506
        [Browsable(false)]
507
        [ReadOnly(true)]
508
        public string ConnectionPoint { get; set; }
509

    
510
        [ReadOnly(true)]
511
        public int Width{ get; set; }
512

    
513
        [ReadOnly(true)]
514
        public int Height{ get; set; }
515
    }
516

    
517
    [DataContract]
518
    public class ID2Configuration
519
    {
520
        public string Section{ get; set; }
521
        public string Key{ get; set; }
522
        public string Value{ get; set; }
523
    }
524

    
525
    public class DocumentsResult
526
    {
527
        public List<Documents> Dwgs { get; set; }
528
        public int TotalCount { get; set; }
529
    }
530
}
클립보드 이미지 추가 (최대 크기: 500 MB)