프로젝트

일반

사용자정보

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

hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 9096bc6d

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

    
144
        public List<MarkupText> Markups { get; set; }
145

    
146
        public List<AttFileInfo> AttFiles { get; set; }
147

    
148
        public int ConvertStatus { get; set; }
149

    
150
        public override bool Equals(object obj)
151
        {
152
            return Equals(obj as Documents);
153
        }
154

    
155
        public bool Equals(Documents other)
156
        {
157
            bool isAttfilesEqual = false;
158

    
159
            if (this != null && other == null)
160
                return false;
161

    
162
            if (this.AttFiles == null && other.AttFiles == null)
163
            {
164
                isAttfilesEqual = true;
165
            }
166
            else if (this.AttFiles != null && other.AttFiles != null)
167
            {
168
                isAttfilesEqual = this.AttFiles.SequenceEqual(other.AttFiles);
169
            }
170

    
171
            bool result = other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.System == other.System && this.SubSystemCode == other.SubSystemCode
172
                && this.RefProjectCode == other.RefProjectCode && this.IsLatest == other.IsLatest && this.JobLevel == other.JobLevel
173
                && this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks
174
                && this.ToCreator == other.ToCreator
175
                && this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator
176
                && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status
177
                && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker
178
                && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate
179
                && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues
180
                && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer
181
                && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport
182
                && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks && this.ConvertStatus == other.ConvertStatus
183
                && isAttfilesEqual;
184

    
185
            if (result == false)
186
            {
187
                string id = this.DocID;
188
            }
189

    
190
            return result;
191

    
192
        }
193
        public override int GetHashCode()
194
        {
195
            return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash()
196
                + this.RefProjectCode.GetNullableHash() + this.IsLatest.GetNullableHash() + this.JobLevel.GetNullableHash()
197
                + this.PersonInCharge.GetNullableHash() + this.IsDeleted.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash()
198
                + this.ToCreator.GetNullableHash()
199
                + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash()
200
                + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash()
201
                + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash()
202
                + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash()
203
                + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash()
204
                + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash()
205
                + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash()
206
                + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash() + this.ConvertStatus.GetNullableHash();
207
        }
208

    
209
        public class DocumentsKeyComparer : IEqualityComparer<Documents>
210
        {
211
            public bool Equals(Documents x, Documents y)
212
            {
213
                if (x == null && y == null)
214
                    return true;
215
                else if (x == null || y == null)
216
                    return false;
217
                else
218
                {
219
                    return x.DocID == y.DocID;
220
                }
221
            }
222

    
223
            public int GetHashCode(Documents obj)
224
            {
225
                return (obj.DocID != null ? obj.DocID.GetHashCode() : 0);
226
            }
227
        }
228
    }
229

    
230
    [DataContract]
231
    public class ID2Drawings
232
    {
233
        [DataMember]
234
        public string PROJECTNAME { get; set; }
235
        [DataMember]
236
        public string UID { get; set; }
237
        [DataMember]
238
        public string NAME { get; set; }
239
        [DataMember]
240
        public string DOCNAME { get; set; }
241
        [DataMember]
242
        public DateTime? DATETIME { get; set; }
243
        [DataMember]
244
        public string OCCUPIED { get; set; }
245
        [DataMember]
246
        public byte[] Image { get; set; }
247
    }
248

    
249
    public class DocumentsResult
250
    {
251
        public List<Documents> Dwgs { get; set; }
252
        public int TotalCount { get; set; }
253
    }
254
}
클립보드 이미지 추가 (최대 크기: 500 MB)