프로젝트

일반

사용자정보

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

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 2aa2a446

이력 | 보기 | 이력해설 | 다운로드 (10.4 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 FrReviewStatus { get; set; }
97
        [DataMember]
98
        public string FrRemarks { get; set; }
99
        [DataMember]
100
        public string FrCreator { get; set; }
101
        public int FrCapture { get; set; }
102
        [DataMember]
103
        public string ID2Connection { get; set; }
104
        [DataMember]
105
        public DateTime? ID2StartDate { get; set; }
106
        [DataMember]
107
        public DateTime? ID2EndDate { get; set; }
108
        [DataMember]
109
        public string ID2Status { get; set; }
110
        [DataMember]
111
        public string ID2Issues { get; set; }
112
        [DataMember]
113
        public string AVEVAConnection { get; set; }
114
        [DataMember]
115
        public DateTime? AVEVAConvertDate { get; set; }
116
        [DataMember]
117
        public DateTime? AVEVAReviewDate { get; set; }
118
        [DataMember]
119
        public string AVEVAStatus { get; set; }
120
        [DataMember]
121
        public string AVEVAIssues { get; set; }
122
        [DataMember]
123
        public string ReviewFilePath { get; set; }
124
        [DataMember]
125
        public string ReviewFileName { get; set; }
126
        [DataMember]
127
        public string ProdReviewer { get; set; }
128
        [DataMember]
129
        public string ProdIsResult { get; set; }
130
        [DataMember]
131
        public string ProdRemarks { get; set; }
132
        public int ProdCapture { get; set; }
133
        [DataMember]
134
        public string ClientReviewer { get; set; }
135
        [DataMember]
136
        public string ClientIsResult { get; set; }
137
        [DataMember]
138
        public string ClientRemarks { get; set; }
139
        public int ClientCapture { get; set; }
140
        [DataMember]
141
        public string DTIsGateWay { get; set; }
142
        [DataMember]
143
        public string DTIsImport { get; set; }
144
        [DataMember]
145
        public string DTIsRegSystem { get; set; }
146
        [DataMember]
147
        public string DTRemarks { get; set; }
148

    
149
        public List<MarkupText> Markups { get; set; }
150

    
151
        public List<AttFileInfo> AttFiles { get; set; }
152

    
153

    
154
        public override bool Equals(object obj)
155
        {
156
            return Equals(obj as Documents);
157
        }
158

    
159
        public bool Equals(Documents other)
160
        {
161
            bool isAttfilesEqual = false;
162

    
163
            if (this != null && other == null)
164
                return false;
165

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

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

    
190
            if (result == false)
191
            {
192
                string id = this.DocID;
193
            }
194

    
195
            return result;
196

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

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

    
229
            public int GetHashCode(Documents obj)
230
            {
231
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
232
            }
233
        }
234
    }
235

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

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