hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ ab3c1c74
이력 | 보기 | 이력해설 | 다운로드 (10.6 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 | 90ae20f6 | yoush97 | public bool IsLatest { get; set; } |
43 | 5898479a | yoush97 | [DataMember] |
44 | 482f6326 | yoush97 | 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 | 5898479a | yoush97 | public string JobLevel { get; set; } |
53 | [DataMember] |
||
54 | public string PersonInCharge { get; set; } |
||
55 | 1bd7e3a0 | yoush97 | 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 | 4b8d9ad9 | yoush97 | [DataMember] |
73 | 90ae20f6 | yoush97 | public bool IsDeleted { get; set; } |
74 | [DataMember] |
||
75 | public DateTime RegisteredDate { get; set; } |
||
76 | 5898479a | yoush97 | [DataMember] |
77 | 482f6326 | yoush97 | public DateTime? ModifiedDate { get; set; } |
78 | 90ae20f6 | yoush97 | [DataMember] |
79 | 482f6326 | yoush97 | public DateTime? DeletedDate { get; set; } |
80 | 90ae20f6 | yoush97 | [DataMember] |
81 | 54977253 | yoush97 | public string RegisteredUser { get; set; } |
82 | [DataMember] |
||
83 | public string ModifiedUser { get; set; } |
||
84 | [DataMember] |
||
85 | public string DeletedUser { get; set; } |
||
86 | [DataMember] |
||
87 | c95d3bca | yoush97 | public string ToIsDiscussion { get; set; } |
88 | 5898479a | yoush97 | [DataMember] |
89 | public string ToRemarks { get; set; } |
||
90 | [DataMember] |
||
91 | 90ae20f6 | yoush97 | public string ToCreator { get; set; } |
92 | e8a86b9b | yoush97 | public int ToCapture { get; set; } |
93 | 5898479a | yoush97 | [DataMember] |
94 | 90ae20f6 | yoush97 | public string FrReviewStatus { get; set; } |
95 | 5898479a | yoush97 | [DataMember] |
96 | public string FrRemarks { get; set; } |
||
97 | [DataMember] |
||
98 | 90ae20f6 | yoush97 | public string FrCreator { get; set; } |
99 | e8a86b9b | yoush97 | public int FrCapture { get; set; } |
100 | 90ae20f6 | yoush97 | [DataMember] |
101 | 947e6939 | yoush97 | public DateTime? ID2StartDate { get; set; } |
102 | 90ae20f6 | yoush97 | [DataMember] |
103 | 947e6939 | yoush97 | public DateTime? ID2EndDate { get; set; } |
104 | 90ae20f6 | yoush97 | [DataMember] |
105 | public string ID2Status { get; set; } |
||
106 | [DataMember] |
||
107 | public string ID2Issues { get; set; } |
||
108 | [DataMember] |
||
109 | cb2e1138 | yoush97 | public string ReplyModifications { get; set; } |
110 | [DataMember] |
||
111 | public string ReplyRequester { get; set; } |
||
112 | [DataMember] |
||
113 | public string IsConvert { get; set; } |
||
114 | [DataMember] |
||
115 | public string AVEVAPersonInCharge { get; set; } |
||
116 | [DataMember] |
||
117 | public string AVEVAWorker { get; set; } |
||
118 | [DataMember] |
||
119 | 482f6326 | yoush97 | public DateTime? AVEVAConvertDate { get; set; } |
120 | 90ae20f6 | yoush97 | [DataMember] |
121 | 482f6326 | yoush97 | public DateTime? AVEVAReviewDate { get; set; } |
122 | 90ae20f6 | yoush97 | [DataMember] |
123 | ab3c1c74 | yoush97 | public DateTime? AVEVAWorkDate { get; set; } |
124 | [DataMember] |
||
125 | 90ae20f6 | yoush97 | public string AVEVAStatus { get; set; } |
126 | [DataMember] |
||
127 | public string AVEVAIssues { get; set; } |
||
128 | [DataMember] |
||
129 | public string ProdReviewer { get; set; } |
||
130 | [DataMember] |
||
131 | 482f6326 | yoush97 | public string ProdIsResult { get; set; } |
132 | 90ae20f6 | yoush97 | [DataMember] |
133 | public string ProdRemarks { get; set; } |
||
134 | e8a86b9b | yoush97 | public int ProdCapture { get; set; } |
135 | 90ae20f6 | yoush97 | [DataMember] |
136 | public string ClientReviewer { get; set; } |
||
137 | [DataMember] |
||
138 | 482f6326 | yoush97 | public string ClientIsResult { get; set; } |
139 | 90ae20f6 | yoush97 | [DataMember] |
140 | public string ClientRemarks { get; set; } |
||
141 | e8a86b9b | yoush97 | public int ClientCapture { get; set; } |
142 | 90ae20f6 | yoush97 | [DataMember] |
143 | c95d3bca | yoush97 | public string DTIsGateWay { get; set; } |
144 | 90ae20f6 | yoush97 | [DataMember] |
145 | c95d3bca | yoush97 | public string DTIsImport { get; set; } |
146 | 5898479a | yoush97 | [DataMember] |
147 | c95d3bca | yoush97 | public string DTIsRegSystem { get; set; } |
148 | 5898479a | yoush97 | [DataMember] |
149 | 947e6939 | yoush97 | public string DTRemarks { get; set; } |
150 | 709c1971 | yoush97 | |
151 | e458a996 | taeseongkim | public List<MarkupText> Markups { get; set; } |
152 | c0b49a75 | taeseongkim | |
153 | 08499f5f | taeseongkim | public List<AttFileInfo> AttFiles { get; set; } |
154 | |||
155 | |||
156 | 709c1971 | yoush97 | public override bool Equals(object obj) |
157 | { |
||
158 | return Equals(obj as Documents); |
||
159 | } |
||
160 | |||
161 | public bool Equals(Documents other) |
||
162 | { |
||
163 | b1591ae6 | yoush97 | bool isAttfilesEqual = false; |
164 | |||
165 | if (this != null && other == null) |
||
166 | return false; |
||
167 | |||
168 | if (this.AttFiles == null && other.AttFiles == null) |
||
169 | { |
||
170 | isAttfilesEqual = true; |
||
171 | } |
||
172 | else if (this.AttFiles != null && other.AttFiles != null) |
||
173 | { |
||
174 | isAttfilesEqual = this.AttFiles.SequenceEqual(other.AttFiles); |
||
175 | } |
||
176 | |||
177 | 79d7836e | yoush97 | bool result = other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.System == other.System && this.SubSystemCode == other.SubSystemCode |
178 | && this.RefProjectCode == other.RefProjectCode && this.IsLatest == other.IsLatest && this.AutoCADFilie == other.AutoCADFilie && this.PDFFile == other.PDFFile |
||
179 | d9949772 | yoush97 | && this.MarkupLink == other.MarkupLink && this.AVEVALink == other.AVEVALink && this.JobLevel == other.JobLevel |
180 | 709c1971 | yoush97 | && this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks |
181 | 2aa2a446 | yoush97 | && this.ToCreator == other.ToCreator |
182 | 8f17c6ed | yoush97 | && this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator |
183 | fe310cac | yoush97 | && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2Status == other.ID2Status |
184 | 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 |
185 | ab3c1c74 | yoush97 | && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate && this.AVEVAWorkDate == other.AVEVAWorkDate |
186 | e1377864 | yoush97 | && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues |
187 | 709c1971 | yoush97 | && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer |
188 | && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport |
||
189 | c0b49a75 | taeseongkim | && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks |
190 | b1591ae6 | yoush97 | && isAttfilesEqual; |
191 | 295ce375 | yoush97 | |
192 | if (result == false) |
||
193 | { |
||
194 | string id = this.DocID; |
||
195 | } |
||
196 | |||
197 | return result; |
||
198 | 709c1971 | yoush97 | |
199 | } |
||
200 | public override int GetHashCode() |
||
201 | { |
||
202 | 79d7836e | yoush97 | return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.System.GetNullableHash() + this.SubSystemCode.GetNullableHash() |
203 | + this.RefProjectCode.GetNullableHash() + this.IsLatest.GetNullableHash() + this.AutoCADFilie.GetNullableHash() + this.PDFFile.GetNullableHash() |
||
204 | d9949772 | yoush97 | + this.MarkupLink.GetNullableHash() + this.AVEVALink.GetNullableHash() + this.JobLevel.GetNullableHash() |
205 | e458a996 | taeseongkim | + this.PersonInCharge.GetNullableHash() + this.IsDeleted.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash() |
206 | 2aa2a446 | yoush97 | + this.ToCreator.GetNullableHash() |
207 | e458a996 | taeseongkim | + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash() |
208 | fe310cac | yoush97 | + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2Status.GetNullableHash() |
209 | cb2e1138 | yoush97 | + this.ID2Issues.GetNullableHash() + this.ReplyModifications.GetNullableHash() + this.ReplyRequester.GetNullableHash() + this.IsConvert.GetNullableHash() + this.AVEVAPersonInCharge.GetNullableHash() + this.AVEVAWorker.GetNullableHash() |
210 | ab3c1c74 | yoush97 | + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() + this.AVEVAWorkDate.GetNullableHash() |
211 | e1377864 | yoush97 | + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash() |
212 | e458a996 | taeseongkim | + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash() |
213 | + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash() |
||
214 | b1591ae6 | yoush97 | + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash(); |
215 | 709c1971 | yoush97 | } |
216 | d2d4f84b | yoush97 | |
217 | public class DocumentsKeyComparer : IEqualityComparer<Documents> |
||
218 | { |
||
219 | public bool Equals(Documents x, Documents y) |
||
220 | { |
||
221 | if (x == null && y == null) |
||
222 | return true; |
||
223 | else if (x == null || y == null) |
||
224 | return false; |
||
225 | else |
||
226 | { |
||
227 | return x.DocID == y.DocID; |
||
228 | } |
||
229 | } |
||
230 | |||
231 | public int GetHashCode(Documents obj) |
||
232 | { |
||
233 | return (obj.DocID != null ? obj.DocID.GetHashCode() : 0); |
||
234 | } |
||
235 | } |
||
236 | 5898479a | yoush97 | } |
237 | fe57f64a | yoush97 | |
238 | [DataContract] |
||
239 | public class ID2Drawings |
||
240 | { |
||
241 | [DataMember] |
||
242 | e458a996 | taeseongkim | public string PROJECTNAME { get; set; } |
243 | fe57f64a | yoush97 | [DataMember] |
244 | public string UID { get; set; } |
||
245 | [DataMember] |
||
246 | public string NAME { get; set; } |
||
247 | [DataMember] |
||
248 | public string DOCNAME { get; set; } |
||
249 | [DataMember] |
||
250 | public DateTime? DATETIME { get; set; } |
||
251 | [DataMember] |
||
252 | public string OCCUPIED { get; set; } |
||
253 | [DataMember] |
||
254 | public byte[] Image { get; set; } |
||
255 | } |
||
256 | 904fbe46 | yoush97 | |
257 | public class DocumentsResult |
||
258 | { |
||
259 | public List<Documents> Dwgs { get; set; } |
||
260 | public int TotalCount { get; set; } |
||
261 | } |
||
262 | 5898479a | yoush97 | } |