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