프로젝트

일반

사용자정보

통계
| 개정판:

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

이력 | 보기 | 이력해설 | 다운로드 (10.7 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 : IEquatable<Documents>, INotifyPropertyChanged
17
    {
18
        public event PropertyChangedEventHandler PropertyChanged;
19
        protected void OnPropertyChanged(string propName)
20
        {
21
            if (PropertyChanged != null)
22
            {
23
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
24
            }
25
        }
26

    
27
        [DataMember]
28
        public int Seq { get; set; }
29
        [DataMember]
30
        public string DocID { get; set; }
31
        [DataMember]
32
        public string DocumentNo { get; set; }
33
        [DataMember]
34
        public string RevisonNo { get; set; }
35
        [DataMember]
36
        public string System { get; set; }
37
        [DataMember]
38
        public string SubSystemCode { get; set; }
39
        [DataMember]
40
        public string RefProjectCode { get; set; }
41
        [DataMember]
42
        public bool IsLatest { get; set; }
43
        [DataMember]
44
        public string AutoCADFilie { get; set; }
45
        [DataMember]
46
        public string PDFFile { get; set; }
47
        [DataMember]
48
        public string MarkupLink { get; set; }
49
        [DataMember]
50
        public string AVEVALink { get; set; }
51
        [DataMember]
52
        public string JobLevel { get; set; }
53
        [DataMember]
54
        public string PersonInCharge { get; set; }
55
        private string _Worker = string.Empty;
56
        [DataMember]
57
        public string Worker
58
        {
59
            get
60
            {
61
                return _Worker;
62
            }
63
            set
64
            {
65
                if (this._Worker != value)
66
                {
67
                    this._Worker = value;
68
                    OnPropertyChanged("Worker");
69
                }
70
            }
71
        }
72
        [DataMember]
73
        public bool IsDeleted { get; set; }
74
        [DataMember]
75
        public DateTime RegisteredDate { get; set; }
76
        [DataMember]
77
        public DateTime? ModifiedDate { get; set; }
78
        [DataMember]
79
        public DateTime? DeletedDate { get; set; }
80
        [DataMember]
81
        public string RegisteredUser { get; set; }
82
        [DataMember]
83
        public string ModifiedUser { get; set; }
84
        [DataMember]
85
        public string DeletedUser { get; set; }
86
        [DataMember]
87
        public string ToIsDiscussion { get; set; }
88
        [DataMember]
89
        public string ToRemarks { get; set; }
90
        [DataMember]
91
        public string ToCreator { get; set; }
92
        public int ToCapture { get; set; }
93
        [DataMember]
94
        public string FrReviewStatus { get; set; }
95
        [DataMember]
96
        public string FrRemarks { get; set; }
97
        [DataMember]
98
        public string FrCreator { get; set; }
99
        public int FrCapture { get; set; }
100
        [DataMember]
101
        public DateTime? ID2StartDate { get; set; }
102
        [DataMember]
103
        public DateTime? ID2EndDate { get; set; }
104
        [DataMember]
105
        public string ID2Status { get; set; }
106
        [DataMember]
107
        public string ID2Issues { get; set; }
108
        public int ID2Capture { get; set; }
109
        [DataMember]
110
        public string ReplyModifications { get; set; }
111
        [DataMember]
112
        public string ReplyRequester { get; set; }
113
        [DataMember]
114
        public string IsConvert { get; set; }
115
        [DataMember]
116
        public string AVEVAPersonInCharge { get; set; }
117
        [DataMember]
118
        public string AVEVAWorker { get; set; }
119
        [DataMember]
120
        public DateTime? AVEVAConvertDate { get; set; }
121
        [DataMember]
122
        public DateTime? AVEVAReviewDate { get; set; }
123
        [DataMember]
124
        public DateTime? AVEVAWorkDate { get; set; }
125
        [DataMember]
126
        public string AVEVAStatus { get; set; }
127
        [DataMember]
128
        public string AVEVAIssues { get; set; }
129
        [DataMember]
130
        public string ProdReviewer { get; set; }
131
        [DataMember]
132
        public string ProdIsResult { get; set; }
133
        [DataMember]
134
        public string ProdRemarks { get; set; }
135
        //public int ProdCapture { get; set; }
136
        [DataMember]
137
        public string ClientReviewer { get; set; }
138
        [DataMember]
139
        public string ClientIsResult { get; set; }
140
        [DataMember]
141
        public string ClientRemarks { get; set; }
142
        //public int ClientCapture { get; set; }
143
        [DataMember]
144
        public string DTIsGateWay { get; set; }
145
        [DataMember]
146
        public string DTIsImport { get; set; }
147
        [DataMember]
148
        public string DTIsRegSystem { get; set; }
149
        [DataMember]
150
        public string DTRemarks { get; set; }
151

    
152
        public List<MarkupText> Markups { get; set; }
153

    
154
        public List<AttFileInfo> AttFiles { get; set; }
155

    
156

    
157
        public override bool Equals(object obj)
158
        {
159
            return Equals(obj as Documents);
160
        }
161

    
162
        public bool Equals(Documents other)
163
        {
164
            bool isAttfilesEqual = false;
165

    
166
            if (this != null && other == null)
167
                return false;
168

    
169
            if (this.AttFiles == null && other.AttFiles == null)
170
            {
171
                isAttfilesEqual = true;
172
            }
173
            else if (this.AttFiles != null && other.AttFiles != null)
174
            {
175
                isAttfilesEqual = this.AttFiles.SequenceEqual(other.AttFiles);
176
            }
177

    
178
            bool result = other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.System == other.System && this.SubSystemCode == other.SubSystemCode
179
                && this.RefProjectCode == other.RefProjectCode && this.IsLatest == other.IsLatest && this.AutoCADFilie == other.AutoCADFilie && this.PDFFile == other.PDFFile
180
                && this.MarkupLink == other.MarkupLink && this.AVEVALink == other.AVEVALink && this.JobLevel == other.JobLevel
181
                && this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks
182
                && this.ToCreator == other.ToCreator
183
                && this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
184
                && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status
185
                && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker
186
                && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate
187
                && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues
188
                && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
189
                && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
190
                && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks
191
                && isAttfilesEqual;
192

    
193
            if (result == false)
194
            {
195
                string id = this.DocID;
196
            }
197

    
198
            return result;
199

    
200
        }
201
        public override int GetHashCode()
202
        {
203
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash()
204
                + this.RefProjectCode.GetNullableHash() + this.IsLatest.GetNullableHash() + this.AutoCADFilie.GetNullableHash() + this.PDFFile.GetNullableHash()
205
                + this.MarkupLink.GetNullableHash() + this.AVEVALink.GetNullableHash() + this.JobLevel.GetNullableHash()
206
                + this.PersonInCharge.GetNullableHash() + this.IsDeleted.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
207
                + this.ToCreator.GetNullableHash()
208
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
209
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash()
210
                + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash()
211
                + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash()
212
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash()
213
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
214
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
215
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash();
216
        }
217

    
218
        public class DocumentsKeyComparer : IEqualityComparer<Documents>
219
        {
220
            public bool Equals(Documents x, Documents y)
221
            {
222
                if (x == null && y == null)
223
                    return true;
224
                else if (x == null || y == null)
225
                    return false;
226
                else
227
                {
228
                    return x.DocID == y.DocID;
229
                }
230
            }
231

    
232
            public int GetHashCode(Documents obj)
233
            {
234
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
235
            }
236
        }
237
    }
238

    
239
    [DataContract]
240
    public class ID2Drawings
241
    {
242
        [DataMember]
243
        public string PROJECTNAME { get; set; }
244
        [DataMember]
245
        public string UID { get; set; }
246
        [DataMember]
247
        public string NAME { get; set; }
248
        [DataMember]
249
        public string DOCNAME { get; set; }
250
        [DataMember]
251
        public DateTime? DATETIME { get; set; }
252
        [DataMember]
253
        public string OCCUPIED { get; set; }
254
        [DataMember]
255
        public byte[] Image { get; set; }
256
    }
257

    
258
    public class DocumentsResult
259
    {
260
        public List<Documents> Dwgs { get; set; }
261
        public int TotalCount { get; set; }
262
    }
263
}
클립보드 이미지 추가 (최대 크기: 500 MB)