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