hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ f074a104
이력 | 보기 | 이력해설 | 다운로드 (12.7 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 | [DataContract] |
||
15 | 295ce375 | yoush97 | [JsonObject(IsReference = true)] |
16 | 1bd7e3a0 | yoush97 | public class Documents : IEquatable<Documents>, INotifyPropertyChanged |
17 | 5898479a | yoush97 | { |
18 | 1bd7e3a0 | yoush97 | 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 | 5898479a | yoush97 | [DataMember] |
28 | public int Seq { get; set; } |
||
29 | [DataMember] |
||
30 | 90ae20f6 | yoush97 | public string DocID { get; set; } |
31 | [DataMember] |
||
32 | 5898479a | yoush97 | public string DocumentNo { get; set; } |
33 | [DataMember] |
||
34 | 90ae20f6 | yoush97 | public string RevisonNo { get; set; } |
35 | [DataMember] |
||
36 | 79d7836e | yoush97 | public string System { get; set; } |
37 | [DataMember] |
||
38 | public string SubSystemCode { get; set; } |
||
39 | [DataMember] |
||
40 | 36a31d25 | yoush97 | public string RefProjectCode { get; set; } |
41 | 5898479a | yoush97 | [DataMember] |
42 | public string JobLevel { get; set; } |
||
43 | [DataMember] |
||
44 | public string PersonInCharge { get; set; } |
||
45 | 1bd7e3a0 | yoush97 | private string _Worker = string.Empty; |
46 | [DataMember] |
||
47 | public string Worker |
||
48 | { |
||
49 | get |
||
50 | { |
||
51 | return _Worker; |
||
52 | } |
||
53 | set |
||
54 | { |
||
55 | if (this._Worker != value) |
||
56 | { |
||
57 | this._Worker = value; |
||
58 | OnPropertyChanged("Worker"); |
||
59 | } |
||
60 | } |
||
61 | } |
||
62 | 4b8d9ad9 | yoush97 | [DataMember] |
63 | 54977253 | yoush97 | public string RegisteredUser { get; set; } |
64 | [DataMember] |
||
65 | public string ModifiedUser { get; set; } |
||
66 | [DataMember] |
||
67 | public string DeletedUser { get; set; } |
||
68 | [DataMember] |
||
69 | c95d3bca | yoush97 | public string ToIsDiscussion { get; set; } |
70 | 5898479a | yoush97 | [DataMember] |
71 | public string ToRemarks { get; set; } |
||
72 | [DataMember] |
||
73 | 90ae20f6 | yoush97 | public string ToCreator { get; set; } |
74 | e8a86b9b | yoush97 | public int ToCapture { get; set; } |
75 | 5898479a | yoush97 | [DataMember] |
76 | 90ae20f6 | yoush97 | public string FrReviewStatus { get; set; } |
77 | 5898479a | yoush97 | [DataMember] |
78 | public string FrRemarks { get; set; } |
||
79 | [DataMember] |
||
80 | 90ae20f6 | yoush97 | public string FrCreator { get; set; } |
81 | e8a86b9b | yoush97 | public int FrCapture { get; set; } |
82 | 90ae20f6 | yoush97 | [DataMember] |
83 | 947e6939 | yoush97 | public DateTime? ID2StartDate { get; set; } |
84 | 90ae20f6 | yoush97 | [DataMember] |
85 | 947e6939 | yoush97 | public DateTime? ID2EndDate { get; set; } |
86 | 90ae20f6 | yoush97 | [DataMember] |
87 | public string ID2Status { get; set; } |
||
88 | [DataMember] |
||
89 | public string ID2Issues { get; set; } |
||
90 | f4230b40 | yoush97 | public int ID2Capture { get; set; } |
91 | 90ae20f6 | yoush97 | [DataMember] |
92 | cb2e1138 | yoush97 | public string ReplyModifications { get; set; } |
93 | [DataMember] |
||
94 | public string ReplyRequester { get; set; } |
||
95 | [DataMember] |
||
96 | public string IsConvert { get; set; } |
||
97 | [DataMember] |
||
98 | public string AVEVAPersonInCharge { get; set; } |
||
99 | [DataMember] |
||
100 | public string AVEVAWorker { get; set; } |
||
101 | [DataMember] |
||
102 | 482f6326 | yoush97 | public DateTime? AVEVAConvertDate { get; set; } |
103 | 90ae20f6 | yoush97 | [DataMember] |
104 | 482f6326 | yoush97 | public DateTime? AVEVAReviewDate { get; set; } |
105 | 90ae20f6 | yoush97 | [DataMember] |
106 | ab3c1c74 | yoush97 | public DateTime? AVEVAWorkDate { get; set; } |
107 | [DataMember] |
||
108 | 90ae20f6 | yoush97 | public string AVEVAStatus { get; set; } |
109 | [DataMember] |
||
110 | public string AVEVAIssues { get; set; } |
||
111 | [DataMember] |
||
112 | public string ProdReviewer { get; set; } |
||
113 | [DataMember] |
||
114 | 482f6326 | yoush97 | public string ProdIsResult { get; set; } |
115 | 90ae20f6 | yoush97 | [DataMember] |
116 | public string ProdRemarks { get; set; } |
||
117 | f4230b40 | yoush97 | //public int ProdCapture { get; set; } |
118 | 90ae20f6 | yoush97 | [DataMember] |
119 | public string ClientReviewer { get; set; } |
||
120 | [DataMember] |
||
121 | 482f6326 | yoush97 | public string ClientIsResult { get; set; } |
122 | 90ae20f6 | yoush97 | [DataMember] |
123 | public string ClientRemarks { get; set; } |
||
124 | f4230b40 | yoush97 | //public int ClientCapture { get; set; } |
125 | 90ae20f6 | yoush97 | [DataMember] |
126 | c95d3bca | yoush97 | public string DTIsGateWay { get; set; } |
127 | 90ae20f6 | yoush97 | [DataMember] |
128 | c95d3bca | yoush97 | public string DTIsImport { get; set; } |
129 | 5898479a | yoush97 | [DataMember] |
130 | c95d3bca | yoush97 | public string DTIsRegSystem { get; set; } |
131 | 5898479a | yoush97 | [DataMember] |
132 | 947e6939 | yoush97 | public string DTRemarks { get; set; } |
133 | 709c1971 | yoush97 | |
134 | e458a996 | taeseongkim | public List<MarkupText> Markups { get; set; } |
135 | c0b49a75 | taeseongkim | |
136 | 08499f5f | taeseongkim | public List<AttFileInfo> AttFiles { get; set; } |
137 | |||
138 | 9096bc6d | taeseongkim | public int ConvertStatus { get; set; } |
139 | 08499f5f | taeseongkim | |
140 | 709c1971 | yoush97 | public override bool Equals(object obj) |
141 | { |
||
142 | return Equals(obj as Documents); |
||
143 | } |
||
144 | |||
145 | public bool Equals(Documents other) |
||
146 | { |
||
147 | b1591ae6 | yoush97 | bool isAttfilesEqual = false; |
148 | |||
149 | if (this != null && other == null) |
||
150 | return false; |
||
151 | |||
152 | if (this.AttFiles == null && other.AttFiles == null) |
||
153 | { |
||
154 | isAttfilesEqual = true; |
||
155 | } |
||
156 | else if (this.AttFiles != null && other.AttFiles != null) |
||
157 | { |
||
158 | isAttfilesEqual = this.AttFiles.SequenceEqual(other.AttFiles); |
||
159 | } |
||
160 | |||
161 | 79d7836e | yoush97 | bool result = other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.System == other.System && this.SubSystemCode == other.SubSystemCode |
162 | f074a104 | yoush97 | && this.RefProjectCode == other.RefProjectCode && this.JobLevel == other.JobLevel |
163 | && this.PersonInCharge == other.PersonInCharge && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks |
||
164 | 2aa2a446 | yoush97 | && this.ToCreator == other.ToCreator |
165 | 8f17c6ed | yoush97 | && this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator |
166 | fe310cac | yoush97 | && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status |
167 | cb2e1138 | yoush97 | && this.ID2Issues == other.ID2Issues && this.ReplyModifications == other.ReplyModifications && this.ReplyRequester == other.ReplyRequester && this.IsConvert == other.IsConvert && this.AVEVAPersonInCharge == other.AVEVAPersonInCharge && this.AVEVAWorker == other.AVEVAWorker |
168 | ab3c1c74 | yoush97 | && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate |
169 | e1377864 | yoush97 | && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues |
170 | 709c1971 | yoush97 | && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer |
171 | && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport |
||
172 | 9096bc6d | taeseongkim | && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks && this.ConvertStatus == other.ConvertStatus |
173 | b1591ae6 | yoush97 | && isAttfilesEqual; |
174 | 295ce375 | yoush97 | |
175 | if (result == false) |
||
176 | { |
||
177 | string id = this.DocID; |
||
178 | } |
||
179 | |||
180 | return result; |
||
181 | 709c1971 | yoush97 | |
182 | } |
||
183 | public override int GetHashCode() |
||
184 | { |
||
185 | 79d7836e | yoush97 | return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash() |
186 | f074a104 | yoush97 | + this.RefProjectCode.GetNullableHash() + this.JobLevel.GetNullableHash() |
187 | + this.PersonInCharge.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash() |
||
188 | 2aa2a446 | yoush97 | + this.ToCreator.GetNullableHash() |
189 | e458a996 | taeseongkim | + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash() |
190 | fe310cac | yoush97 | + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash() |
191 | cb2e1138 | yoush97 | + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash() |
192 | ab3c1c74 | yoush97 | + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash() |
193 | e1377864 | yoush97 | + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash() |
194 | e458a996 | taeseongkim | + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash() |
195 | + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash() |
||
196 | 9096bc6d | taeseongkim | + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash() + this.ConvertStatus.GetNullableHash(); |
197 | 709c1971 | yoush97 | } |
198 | d2d4f84b | yoush97 | |
199 | f074a104 | yoush97 | public class DocumentsKeyCompare : IEqualityComparer<Documents> |
200 | d2d4f84b | yoush97 | { |
201 | public bool Equals(Documents x, Documents y) |
||
202 | { |
||
203 | if (x == null && y == null) |
||
204 | return true; |
||
205 | else if (x == null || y == null) |
||
206 | return false; |
||
207 | else |
||
208 | { |
||
209 | return x.DocID == y.DocID; |
||
210 | } |
||
211 | } |
||
212 | |||
213 | public int GetHashCode(Documents obj) |
||
214 | { |
||
215 | return (obj.DocID != null ? obj.DocID.GetHashCode() : 0); |
||
216 | } |
||
217 | } |
||
218 | f074a104 | yoush97 | |
219 | public class DocumentsUniqueCompare : IEqualityComparer<Documents> |
||
220 | { |
||
221 | public bool Equals(Documents x, Documents y) |
||
222 | { |
||
223 | if (x == null && y == null) |
||
224 | return true; |
||
225 | else if (x == null || y == null) |
||
226 | return false; |
||
227 | else |
||
228 | { |
||
229 | return x.RefProjectCode == y.RefProjectCode && x.DocumentNo == y.DocumentNo; |
||
230 | } |
||
231 | } |
||
232 | |||
233 | public int GetHashCode(Documents obj) |
||
234 | { |
||
235 | return (obj.RefProjectCode != null ? obj.RefProjectCode.GetHashCode() : 0) + (obj.DocumentNo != null ? obj.DocumentNo.GetHashCode() : 0); |
||
236 | } |
||
237 | } |
||
238 | |||
239 | public void ValueCopy(Documents other) |
||
240 | { |
||
241 | this.DocumentNo = other.DocumentNo; |
||
242 | this.RevisonNo = other.RevisonNo; |
||
243 | this.System = other.System; |
||
244 | this.SubSystemCode = other.SubSystemCode; |
||
245 | this.RefProjectCode = other.RefProjectCode; |
||
246 | this.JobLevel = other.JobLevel; |
||
247 | this.PersonInCharge = other.PersonInCharge; |
||
248 | this.ToIsDiscussion = other.ToIsDiscussion; |
||
249 | this.ToRemarks = other.ToRemarks; |
||
250 | this.ToCreator = other.ToCreator; |
||
251 | this.ToCapture += other.ToCapture; |
||
252 | this.FrReviewStatus = other.FrReviewStatus; |
||
253 | this.FrRemarks = other.FrRemarks; |
||
254 | this.FrCapture += other.FrCapture; |
||
255 | this.FrCreator = other.FrCreator; |
||
256 | this.ID2StartDate = other.ID2StartDate; |
||
257 | this.ID2EndDate = other.ID2EndDate; |
||
258 | this.ID2Status = other.ID2Status; |
||
259 | this.ID2Issues = other.ID2Issues; |
||
260 | this.ID2Capture += other.ID2Capture; |
||
261 | this.ReplyModifications = other.ReplyModifications; |
||
262 | this.ReplyRequester = other.ReplyRequester; |
||
263 | this.IsConvert = other.IsConvert; |
||
264 | this.AVEVAPersonInCharge = other.AVEVAPersonInCharge; |
||
265 | this.AVEVAWorker = other.AVEVAWorker; |
||
266 | this.AVEVAConvertDate = other.AVEVAConvertDate; |
||
267 | this.AVEVAReviewDate = other.AVEVAReviewDate; |
||
268 | this.AVEVAWorkDate = other.AVEVAWorkDate; |
||
269 | this.AVEVAStatus = other.AVEVAStatus; |
||
270 | this.AVEVAIssues = other.AVEVAIssues; |
||
271 | this.ProdReviewer = other.ProdReviewer; |
||
272 | this.ProdIsResult = other.ProdIsResult; |
||
273 | this.ProdRemarks = other.ProdRemarks; |
||
274 | this.ClientReviewer = other.ClientReviewer; |
||
275 | this.ClientIsResult = other.ClientIsResult; |
||
276 | this.ClientRemarks = other.ClientRemarks; |
||
277 | this.DTIsGateWay = other.DTIsGateWay; |
||
278 | this.DTIsImport = other.DTIsImport; |
||
279 | this.DTIsRegSystem = other.DTIsRegSystem; |
||
280 | this.DTRemarks = other.DTRemarks; |
||
281 | if (this.AttFiles == null) |
||
282 | this.AttFiles = other.AttFiles; |
||
283 | else |
||
284 | this.AttFiles.AddRange(other.AttFiles ?? new List<AttFileInfo>()); |
||
285 | } |
||
286 | 5898479a | yoush97 | } |
287 | fe57f64a | yoush97 | |
288 | [DataContract] |
||
289 | public class ID2Drawings |
||
290 | { |
||
291 | [DataMember] |
||
292 | e458a996 | taeseongkim | public string PROJECTNAME { get; set; } |
293 | fe57f64a | yoush97 | [DataMember] |
294 | public string UID { get; set; } |
||
295 | [DataMember] |
||
296 | public string NAME { get; set; } |
||
297 | [DataMember] |
||
298 | public string DOCNAME { get; set; } |
||
299 | [DataMember] |
||
300 | public DateTime? DATETIME { get; set; } |
||
301 | [DataMember] |
||
302 | public string OCCUPIED { get; set; } |
||
303 | [DataMember] |
||
304 | public byte[] Image { get; set; } |
||
305 | } |
||
306 | 904fbe46 | yoush97 | |
307 | public class DocumentsResult |
||
308 | { |
||
309 | public List<Documents> Dwgs { get; set; } |
||
310 | public int TotalCount { get; set; } |
||
311 | } |
||
312 | 5898479a | yoush97 | } |