hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ 70ed289d
이력 | 보기 | 이력해설 | 다운로드 (11.9 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 | 36a31d25 | yoush97 | public string RefProjectCode { get; set; } |
37 | 5898479a | yoush97 | [DataMember] |
38 | 90ae20f6 | yoush97 | public bool IsLatest { get; set; } |
39 | 5898479a | yoush97 | [DataMember] |
40 | 482f6326 | yoush97 | public string AutoCADFilie { get; set; } |
41 | [DataMember] |
||
42 | public string PDFFile { get; set; } |
||
43 | [DataMember] |
||
44 | public string MarkupLink { get; set; } |
||
45 | [DataMember] |
||
46 | public string AVEVALink { get; set; } |
||
47 | [DataMember] |
||
48 | 90ae20f6 | yoush97 | public string DocFilePath { get; set; } |
49 | 5898479a | yoush97 | [DataMember] |
50 | 90ae20f6 | yoush97 | public string DocFileName { get; set; } |
51 | [DataMember] |
||
52 | 5898479a | yoush97 | public string JobLevel { get; set; } |
53 | [DataMember] |
||
54 | c95d3bca | yoush97 | public string IsTypical { get; set; } |
55 | 5898479a | yoush97 | [DataMember] |
56 | public string PersonInCharge { get; set; } |
||
57 | 1bd7e3a0 | yoush97 | 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 | 4b8d9ad9 | yoush97 | [DataMember] |
75 | 90ae20f6 | yoush97 | public bool IsDeleted { get; set; } |
76 | [DataMember] |
||
77 | public DateTime RegisteredDate { get; set; } |
||
78 | 5898479a | yoush97 | [DataMember] |
79 | 482f6326 | yoush97 | public DateTime? ModifiedDate { get; set; } |
80 | 90ae20f6 | yoush97 | [DataMember] |
81 | 482f6326 | yoush97 | public DateTime? DeletedDate { get; set; } |
82 | 90ae20f6 | yoush97 | [DataMember] |
83 | 54977253 | yoush97 | public string RegisteredUser { get; set; } |
84 | [DataMember] |
||
85 | public string ModifiedUser { get; set; } |
||
86 | [DataMember] |
||
87 | public string DeletedUser { get; set; } |
||
88 | [DataMember] |
||
89 | c95d3bca | yoush97 | public string ToIsDiscussion { get; set; } |
90 | 5898479a | yoush97 | [DataMember] |
91 | public string ToRemarks { get; set; } |
||
92 | [DataMember] |
||
93 | 90ae20f6 | yoush97 | public string ToCreator { get; set; } |
94 | e8a86b9b | yoush97 | public int ToCapture { get; set; } |
95 | 5898479a | yoush97 | [DataMember] |
96 | c95d3bca | yoush97 | public string ToIsMarkup { get; set; } |
97 | 90ae20f6 | yoush97 | [DataMember] |
98 | public string FrReviewStatus { get; set; } |
||
99 | 5898479a | yoush97 | [DataMember] |
100 | public string FrRemarks { get; set; } |
||
101 | [DataMember] |
||
102 | 90ae20f6 | yoush97 | public string FrCreator { get; set; } |
103 | e8a86b9b | yoush97 | public int FrCapture { get; set; } |
104 | 90ae20f6 | yoush97 | [DataMember] |
105 | c95d3bca | yoush97 | public string FrIsMarkup { get; set; } |
106 | 90ae20f6 | yoush97 | [DataMember] |
107 | c95d3bca | yoush97 | public string IsID2Work { get; set; } |
108 | 90ae20f6 | yoush97 | [DataMember] |
109 | public string ID2Connection { get; set; } |
||
110 | [DataMember] |
||
111 | 947e6939 | yoush97 | public DateTime? ID2StartDate { get; set; } |
112 | 90ae20f6 | yoush97 | [DataMember] |
113 | 947e6939 | yoush97 | public DateTime? ID2EndDate { get; set; } |
114 | 90ae20f6 | yoush97 | [DataMember] |
115 | public int ID2JobTime { get; set; } |
||
116 | 54977253 | yoush97 | public string ID2JobTimetoString |
117 | { |
||
118 | get |
||
119 | { |
||
120 | StringBuilder sbTemp; |
||
121 | if (ID2JobTime > 0) |
||
122 | { |
||
123 | sbTemp = new StringBuilder(TimeSpan.FromSeconds(Convert.ToInt32(ID2JobTime)).ToString(@"dd\:hh\:mm\:ss")); |
||
124 | } |
||
125 | else if (ID2JobTime < 0) |
||
126 | { |
||
127 | sbTemp = new StringBuilder(TimeSpan.FromSeconds(Convert.ToInt32(ID2JobTime)).ToString(@"dd\:hh\:mm\:ss")); |
||
128 | sbTemp.Insert(0, "-"); |
||
129 | } |
||
130 | else |
||
131 | { |
||
132 | sbTemp = new StringBuilder(); |
||
133 | } |
||
134 | |||
135 | return sbTemp.ToString(); |
||
136 | } |
||
137 | } |
||
138 | 90ae20f6 | yoush97 | [DataMember] |
139 | public string ID2Status { get; set; } |
||
140 | [DataMember] |
||
141 | public string ID2Issues { get; set; } |
||
142 | [DataMember] |
||
143 | public string AVEVAConnection { get; set; } |
||
144 | [DataMember] |
||
145 | 482f6326 | yoush97 | public DateTime? AVEVAConvertDate { get; set; } |
146 | 90ae20f6 | yoush97 | [DataMember] |
147 | 482f6326 | yoush97 | public DateTime? AVEVAReviewDate { get; set; } |
148 | 90ae20f6 | yoush97 | [DataMember] |
149 | public string AVEVAStatus { get; set; } |
||
150 | [DataMember] |
||
151 | public string AVEVAIssues { get; set; } |
||
152 | [DataMember] |
||
153 | public string ReviewFilePath { get; set; } |
||
154 | [DataMember] |
||
155 | public string ReviewFileName { get; set; } |
||
156 | [DataMember] |
||
157 | public string ProdReviewer { get; set; } |
||
158 | [DataMember] |
||
159 | 482f6326 | yoush97 | public string ProdIsResult { get; set; } |
160 | 90ae20f6 | yoush97 | [DataMember] |
161 | public string ProdRemarks { get; set; } |
||
162 | e8a86b9b | yoush97 | public int ProdCapture { get; set; } |
163 | 90ae20f6 | yoush97 | [DataMember] |
164 | public string ClientReviewer { get; set; } |
||
165 | [DataMember] |
||
166 | 482f6326 | yoush97 | public string ClientIsResult { get; set; } |
167 | 90ae20f6 | yoush97 | [DataMember] |
168 | public string ClientRemarks { get; set; } |
||
169 | e8a86b9b | yoush97 | public int ClientCapture { get; set; } |
170 | 90ae20f6 | yoush97 | [DataMember] |
171 | c95d3bca | yoush97 | public string DTIsGateWay { get; set; } |
172 | 90ae20f6 | yoush97 | [DataMember] |
173 | c95d3bca | yoush97 | public string DTIsImport { get; set; } |
174 | 5898479a | yoush97 | [DataMember] |
175 | c95d3bca | yoush97 | public string DTIsRegSystem { get; set; } |
176 | 5898479a | yoush97 | [DataMember] |
177 | 947e6939 | yoush97 | public string DTRemarks { get; set; } |
178 | 709c1971 | yoush97 | |
179 | e458a996 | taeseongkim | public List<MarkupText> Markups { get; set; } |
180 | c0b49a75 | taeseongkim | |
181 | 08499f5f | taeseongkim | public List<AttFileInfo> AttFiles { get; set; } |
182 | |||
183 | |||
184 | 709c1971 | yoush97 | public override bool Equals(object obj) |
185 | { |
||
186 | return Equals(obj as Documents); |
||
187 | } |
||
188 | |||
189 | public bool Equals(Documents other) |
||
190 | { |
||
191 | b1591ae6 | yoush97 | bool isAttfilesEqual = false; |
192 | |||
193 | if (this != null && other == null) |
||
194 | return false; |
||
195 | |||
196 | if (this.AttFiles == null && other.AttFiles == null) |
||
197 | { |
||
198 | isAttfilesEqual = true; |
||
199 | } |
||
200 | else if (this.AttFiles != null && other.AttFiles != null) |
||
201 | { |
||
202 | isAttfilesEqual = this.AttFiles.SequenceEqual(other.AttFiles); |
||
203 | } |
||
204 | |||
205 | 295ce375 | yoush97 | bool result = other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.RefProjectCode == other.RefProjectCode && this.IsLatest == other.IsLatest |
206 | 709c1971 | yoush97 | && this.AutoCADFilie == other.AutoCADFilie && this.PDFFile == other.PDFFile && this.MarkupLink == other.MarkupLink && this.AVEVALink == other.AVEVALink |
207 | 6c3bdda6 | yoush97 | && this.DocFilePath == other.DocFilePath && this.DocFileName == other.DocFileName && this.JobLevel == other.JobLevel && this.IsTypical == other.IsTypical |
208 | 709c1971 | yoush97 | && this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks |
209 | 00d11333 | yoush97 | && this.ToCreator == other.ToCreator && this.ToCapture == other.ToCapture && this.ToIsMarkup == other.ToIsMarkup |
210 | 8f17c6ed | yoush97 | && this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator |
211 | 00d11333 | yoush97 | && this.FrCapture == other.FrCapture && this.FrIsMarkup == other.FrIsMarkup && this.IsID2Work == other.IsID2Work && this.ID2Connection == other.ID2Connection |
212 | 709c1971 | yoush97 | && this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2JobTime == other.ID2JobTime && this.ID2Status == other.ID2Status |
213 | && this.ID2Issues == other.ID2Issues && this.AVEVAConnection == other.AVEVAConnection && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate |
||
214 | && this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues && this.ReviewFilePath == other.ReviewFilePath && this.ReviewFileName == other.ReviewFileName |
||
215 | && this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer |
||
216 | && this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport |
||
217 | c0b49a75 | taeseongkim | && this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks |
218 | b1591ae6 | yoush97 | && isAttfilesEqual; |
219 | 295ce375 | yoush97 | |
220 | if (result == false) |
||
221 | { |
||
222 | string id = this.DocID; |
||
223 | } |
||
224 | |||
225 | return result; |
||
226 | 709c1971 | yoush97 | |
227 | } |
||
228 | public override int GetHashCode() |
||
229 | { |
||
230 | e458a996 | taeseongkim | return this.DocumentNo.GetNullableHash() + this.RevisonNo.GetNullableHash() + this.RefProjectCode.GetNullableHash() + this.IsLatest.GetNullableHash() |
231 | + this.AutoCADFilie.GetNullableHash() + this.PDFFile.GetNullableHash() + this.MarkupLink.GetNullableHash() + this.AVEVALink.GetNullableHash() |
||
232 | + this.DocFilePath.GetNullableHash() + this.DocFileName.GetNullableHash() + this.JobLevel.GetNullableHash() + this.IsTypical.GetNullableHash() |
||
233 | + this.PersonInCharge.GetNullableHash() + this.IsDeleted.GetNullableHash() + this.ToIsDiscussion.GetNullableHash() + this.ToRemarks.GetNullableHash() |
||
234 | + this.ToCreator.GetNullableHash() + this.ToCapture.GetNullableHash() + this.ToIsMarkup.GetNullableHash() |
||
235 | + this.FrReviewStatus.GetNullableHash() + this.FrRemarks.GetNullableHash() + this.FrCreator.GetNullableHash() |
||
236 | + this.FrCapture.GetNullableHash() + this.FrIsMarkup.GetNullableHash() + this.IsID2Work.GetNullableHash() + this.ID2Connection.GetNullableHash() |
||
237 | + this.ID2StartDate.GetNullableHash() + this.ID2EndDate.GetNullableHash() + this.ID2JobTime.GetNullableHash() + this.ID2Status.GetNullableHash() |
||
238 | + this.ID2Issues.GetNullableHash() + this.AVEVAConnection.GetNullableHash() + this.AVEVAConvertDate.GetNullableHash() + this.AVEVAReviewDate.GetNullableHash() |
||
239 | + this.AVEVAStatus.GetNullableHash() + this.AVEVAIssues.GetNullableHash() + this.ReviewFilePath.GetNullableHash() + this.ReviewFileName.GetNullableHash() |
||
240 | + this.ProdReviewer.GetNullableHash() + this.ProdIsResult.GetNullableHash() + this.ProdRemarks.GetNullableHash() + this.ClientReviewer.GetNullableHash() |
||
241 | + this.ClientIsResult.GetNullableHash() + this.ClientRemarks.GetNullableHash() + this.DTIsGateWay.GetNullableHash() + this.DTIsImport.GetNullableHash() |
||
242 | b1591ae6 | yoush97 | + this.DTIsRegSystem.GetNullableHash() + this.DTRemarks.GetNullableHash(); |
243 | 709c1971 | yoush97 | } |
244 | d2d4f84b | yoush97 | |
245 | public class DocumentsKeyComparer : IEqualityComparer<Documents> |
||
246 | { |
||
247 | public bool Equals(Documents x, Documents y) |
||
248 | { |
||
249 | if (x == null && y == null) |
||
250 | return true; |
||
251 | else if (x == null || y == null) |
||
252 | return false; |
||
253 | else |
||
254 | { |
||
255 | return x.DocID == y.DocID; |
||
256 | } |
||
257 | } |
||
258 | |||
259 | public int GetHashCode(Documents obj) |
||
260 | { |
||
261 | return (obj.DocID != null ? obj.DocID.GetHashCode() : 0); |
||
262 | } |
||
263 | } |
||
264 | 5898479a | yoush97 | } |
265 | fe57f64a | yoush97 | |
266 | [DataContract] |
||
267 | public class ID2Drawings |
||
268 | { |
||
269 | [DataMember] |
||
270 | e458a996 | taeseongkim | public string PROJECTNAME { get; set; } |
271 | fe57f64a | yoush97 | [DataMember] |
272 | public string UID { get; set; } |
||
273 | [DataMember] |
||
274 | public string NAME { get; set; } |
||
275 | [DataMember] |
||
276 | public string DOCNAME { get; set; } |
||
277 | [DataMember] |
||
278 | public DateTime? DATETIME { get; set; } |
||
279 | [DataMember] |
||
280 | public string OCCUPIED { get; set; } |
||
281 | [DataMember] |
||
282 | public byte[] Image { get; set; } |
||
283 | } |
||
284 | 904fbe46 | yoush97 | |
285 | public class DocumentsResult |
||
286 | { |
||
287 | public List<Documents> Dwgs { get; set; } |
||
288 | public int TotalCount { get; set; } |
||
289 | } |
||
290 | 5898479a | yoush97 | } |