프로젝트

일반

사용자정보

통계
| 개정판:

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

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