프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 79d7836e

이력 | 보기 | 이력해설 | 다운로드 (10.8 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 IsTypical { get; set; }
55
        [DataMember]
56
        public string PersonInCharge { get; set; }
57
        private string _Worker = string.Empty;
58
        [DataMember]
59
        public string Worker
60
        {
61
            get
62
            {
63
                return _Worker;
64
            }
65
            set
66
            {
67
                if (this._Worker != value)
68
                {
69
                    this._Worker = value;
70
                    OnPropertyChanged("Worker");
71
                }
72
            }
73
        }
74
        [DataMember]
75
        public bool IsDeleted { get; set; }
76
        [DataMember]
77
        public DateTime RegisteredDate { get; set; }
78
        [DataMember]
79
        public DateTime? ModifiedDate { get; set; }
80
        [DataMember]
81
        public DateTime? DeletedDate { get; set; }
82
        [DataMember]
83
        public string RegisteredUser { get; set; }
84
        [DataMember]
85
        public string ModifiedUser { get; set; }
86
        [DataMember]
87
        public string DeletedUser { get; set; }
88
        [DataMember]
89
        public string ToIsDiscussion { get; set; }
90
        [DataMember]
91
        public string ToRemarks { get; set; }
92
        [DataMember]
93
        public string ToCreator { get; set; }
94
        public int ToCapture { get; set; }
95
        [DataMember]
96
        public string ToIsMarkup { get; set; }
97
        [DataMember]
98
        public string FrReviewStatus { get; set; }
99
        [DataMember]
100
        public string FrRemarks { get; set; }
101
        [DataMember]
102
        public string FrCreator { get; set; }
103
        public int FrCapture { get; set; }
104
        [DataMember]
105
        public string FrIsMarkup { get; set; }
106
        [DataMember]
107
        public string IsID2Work { get; set; }
108
        [DataMember]
109
        public string ID2Connection { get; set; }
110
        [DataMember]
111
        public DateTime? ID2StartDate { get; set; }
112
        [DataMember]
113
        public DateTime? ID2EndDate { get; set; }
114
        [DataMember]
115
        public string ID2Status { get; set; }
116
        [DataMember]
117
        public string ID2Issues { get; set; }
118
        [DataMember]
119
        public string AVEVAConnection { get; set; }
120
        [DataMember]
121
        public DateTime? AVEVAConvertDate { get; set; }
122
        [DataMember]
123
        public DateTime? AVEVAReviewDate { get; set; }
124
        [DataMember]
125
        public string AVEVAStatus { get; set; }
126
        [DataMember]
127
        public string AVEVAIssues { get; set; }
128
        [DataMember]
129
        public string ReviewFilePath { get; set; }
130
        [DataMember]
131
        public string ReviewFileName { get; set; }
132
        [DataMember]
133
        public string ProdReviewer { get; set; }
134
        [DataMember]
135
        public string ProdIsResult { get; set; }
136
        [DataMember]
137
        public string ProdRemarks { get; set; }
138
        public int ProdCapture { get; set; }
139
        [DataMember]
140
        public string ClientReviewer { get; set; }
141
        [DataMember]
142
        public string ClientIsResult { get; set; }
143
        [DataMember]
144
        public string ClientRemarks { get; set; }
145
        public int ClientCapture { get; set; }
146
        [DataMember]
147
        public string DTIsGateWay { get; set; }
148
        [DataMember]
149
        public string DTIsImport { get; set; }
150
        [DataMember]
151
        public string DTIsRegSystem { get; set; }
152
        [DataMember]
153
        public string DTRemarks { get; set; }
154

    
155
        public List<MarkupText> Markups { get; set; }
156

    
157
        public List<AttFileInfo> AttFiles { get; set; }
158

    
159

    
160
        public override bool Equals(object obj)
161
        {
162
            return Equals(obj as Documents);
163
        }
164

    
165
        public bool Equals(Documents other)
166
        {
167
            bool isAttfilesEqual = false;
168

    
169
            if (this != null && other == null)
170
                return false;
171

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

    
181
            bool result = other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.System == other.System && this.SubSystemCode == other.SubSystemCode
182
                && this.RefProjectCode == other.RefProjectCode && this.IsLatest == other.IsLatest && this.AutoCADFilie == other.AutoCADFilie && this.PDFFile == other.PDFFile
183
                && this.MarkupLink == other.MarkupLink && this.AVEVALink == other.AVEVALink && this.JobLevel == other.JobLevel && this.IsTypical == other.IsTypical
184
                && this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks
185
                && this.ToCreator == other.ToCreator && this.ToIsMarkup == other.ToIsMarkup
186
                && this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
187
                && this.FrIsMarkup == other.FrIsMarkup && this.IsID2Work == other.IsID2Work && this.ID2Connection == other.ID2Connection
188
                && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status
189
                && this.ID2Issues == other.ID2Issues && this.AVEVAConnection == other.AVEVAConnection && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate
190
                && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues && this.ReviewFilePath == other.ReviewFilePath && this.ReviewFileName == other.ReviewFileName
191
                && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
192
                && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
193
                && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks
194
                && isAttfilesEqual;
195

    
196
            if (result == false)
197
            {
198
                string id = this.DocID;
199
            }
200

    
201
            return result;
202

    
203
        }
204
        public override int GetHashCode()
205
        {
206
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash()
207
                + this.RefProjectCode.GetNullableHash() + this.IsLatest.GetNullableHash() + this.AutoCADFilie.GetNullableHash() + this.PDFFile.GetNullableHash()
208
                + this.MarkupLink.GetNullableHash() + this.AVEVALink.GetNullableHash() + this.JobLevel.GetNullableHash() + this.IsTypical.GetNullableHash()
209
                + this.PersonInCharge.GetNullableHash() + this.IsDeleted.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
210
                + this.ToCreator.GetNullableHash() + this.ToIsMarkup.GetNullableHash()
211
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
212
                + this.FrIsMarkup.GetNullableHash() + this.IsID2Work.GetNullableHash() + this.ID2Connection.GetNullableHash()
213
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash()
214
                + this.ID2Issues.GetNullableHash() + this.AVEVAConnection.GetNullableHash() + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash()
215
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash() + this.ReviewFilePath.GetNullableHash() + this.ReviewFileName.GetNullableHash()
216
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
217
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
218
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash();
219
        }
220

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

    
235
            public int GetHashCode(Documents obj)
236
            {
237
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
238
            }
239
        }
240
    }
241

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

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