hytos / ID2.Manager / ID2.Manager.Data / Models / Documents.cs @ d2d4f84b
이력 | 보기 | 이력해설 | 다운로드 (13.4 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Linq; |
4 |
using System.Text; |
5 |
using System.Threading.Tasks; |
6 |
|
7 |
using System.Runtime.Serialization; |
8 |
|
9 |
namespace ID2.Manager.Data.Models |
10 |
{ |
11 |
[DataContract] |
12 |
public class Documents : IEquatable<Documents> |
13 |
{ |
14 |
[DataMember] |
15 |
public int Seq { get; set; } |
16 |
[DataMember] |
17 |
public string DocID { get; set; } |
18 |
[DataMember] |
19 |
public string DocumentNo { get; set; } |
20 |
[DataMember] |
21 |
public string RevisonNo { get; set; } |
22 |
[DataMember] |
23 |
public string RefProjectID { get; set; } |
24 |
[DataMember] |
25 |
public bool IsLatest { get; set; } |
26 |
[DataMember] |
27 |
public string AutoCADFilie { get; set; } |
28 |
[DataMember] |
29 |
public string PDFFile { get; set; } |
30 |
[DataMember] |
31 |
public string MarkupLink { get; set; } |
32 |
[DataMember] |
33 |
public string AVEVALink { get; set; } |
34 |
[DataMember] |
35 |
public string DocFilePath { get; set; } |
36 |
[DataMember] |
37 |
public string DocFileName { get; set; } |
38 |
[DataMember] |
39 |
public string Place { get; set; } |
40 |
[DataMember] |
41 |
public string JobLevel { get; set; } |
42 |
[DataMember] |
43 |
public string IsTypical { get; set; } |
44 |
[DataMember] |
45 |
public string PersonInCharge { get; set; } |
46 |
[DataMember] |
47 |
public bool IsDeleted { get; set; } |
48 |
[DataMember] |
49 |
public DateTime RegisteredDate { get; set; } |
50 |
[DataMember] |
51 |
public DateTime? ModifiedDate { get; set; } |
52 |
[DataMember] |
53 |
public DateTime? DeletedDate { get; set; } |
54 |
[DataMember] |
55 |
public string ToIsDiscussion { get; set; } |
56 |
[DataMember] |
57 |
public string ToRemarks { get; set; } |
58 |
[DataMember] |
59 |
public string ToCreator { get; set; } |
60 |
[DataMember] |
61 |
public string ToModifier { get; set; } |
62 |
[DataMember] |
63 |
public string ToCapturePath { get; set; } |
64 |
[DataMember] |
65 |
public string ToIsMarkup { get; set; } |
66 |
[DataMember] |
67 |
public string FrReviewStatus { get; set; } |
68 |
[DataMember] |
69 |
public string FrRemarks { get; set; } |
70 |
[DataMember] |
71 |
public string FrCreator { get; set; } |
72 |
[DataMember] |
73 |
public string FrModifier { get; set; } |
74 |
[DataMember] |
75 |
public string FrCapturePath { get; set; } |
76 |
[DataMember] |
77 |
public string FrIsMarkup { get; set; } |
78 |
[DataMember] |
79 |
public string IsID2Work { get; set; } |
80 |
[DataMember] |
81 |
public string ID2Connection { get; set; } |
82 |
[DataMember] |
83 |
public DateTime? ID2StartDate { get; set; } |
84 |
[DataMember] |
85 |
public DateTime? ID2EndDate { get; set; } |
86 |
[DataMember] |
87 |
public int ID2JobTime { get; set; } |
88 |
[DataMember] |
89 |
public string ID2Status { get; set; } |
90 |
[DataMember] |
91 |
public string ID2Issues { get; set; } |
92 |
[DataMember] |
93 |
public string AVEVAConnection { get; set; } |
94 |
[DataMember] |
95 |
public DateTime? AVEVAConvertDate { get; set; } |
96 |
[DataMember] |
97 |
public DateTime? AVEVAReviewDate { get; set; } |
98 |
[DataMember] |
99 |
public string AVEVAStatus { get; set; } |
100 |
[DataMember] |
101 |
public string AVEVAIssues { get; set; } |
102 |
[DataMember] |
103 |
public string ReviewFilePath { get; set; } |
104 |
[DataMember] |
105 |
public string ReviewFileName { get; set; } |
106 |
[DataMember] |
107 |
public string ProdReviewer { get; set; } |
108 |
[DataMember] |
109 |
public string ProdIsResult { get; set; } |
110 |
[DataMember] |
111 |
public string ProdRemarks { get; set; } |
112 |
[DataMember] |
113 |
public string ClientReviewer { get; set; } |
114 |
[DataMember] |
115 |
public string ClientIsResult { get; set; } |
116 |
[DataMember] |
117 |
public string ClientRemarks { get; set; } |
118 |
[DataMember] |
119 |
public string DTIsGateWay { get; set; } |
120 |
[DataMember] |
121 |
public string DTIsImport { get; set; } |
122 |
[DataMember] |
123 |
public string DTIsRegSystem { get; set; } |
124 |
[DataMember] |
125 |
public string DTRemarks { get; set; } |
126 |
|
127 |
public override bool Equals(object obj) |
128 |
{ |
129 |
return Equals(obj as Documents); |
130 |
} |
131 |
|
132 |
public bool Equals(Documents other) |
133 |
{ |
134 |
return other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.RefProjectID == other.RefProjectID && this.IsLatest == other.IsLatest |
135 |
&& this.AutoCADFilie == other.AutoCADFilie && this.PDFFile == other.PDFFile && this.MarkupLink == other.MarkupLink && this.AVEVALink == other.AVEVALink |
136 |
&& this.DocFilePath == other.DocFilePath && this.DocFileName == other.DocFileName && this.Place == other.Place && this.JobLevel == other.JobLevel && this.IsTypical == other.IsTypical |
137 |
&& this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks |
138 |
&& this.ToCreator == other.ToCreator && this.ToModifier == other.ToModifier && this.ToCapturePath == other.ToCapturePath && this.ToIsMarkup == other.ToIsMarkup |
139 |
&& this.FrReviewStatus == other.FrReviewStatus && this.FrRemarks == other.FrRemarks && this.FrCreator == other.FrCreator && this.FrModifier == other.FrModifier |
140 |
&& this.FrCapturePath == other.FrCapturePath && this.FrIsMarkup == other.FrIsMarkup && this.IsID2Work == other.IsID2Work && this.ID2Connection == other.ID2Connection |
141 |
&& this.ID2StartDate == other.ID2StartDate && this.ID2EndDate == other.ID2EndDate && this.ID2JobTime == other.ID2JobTime && this.ID2Status == other.ID2Status |
142 |
&& this.ID2Issues == other.ID2Issues && this.AVEVAConnection == other.AVEVAConnection && this.AVEVAConvertDate == other.AVEVAConvertDate && this.AVEVAReviewDate == other.AVEVAReviewDate |
143 |
&& this.AVEVAStatus == other.AVEVAStatus && this.AVEVAIssues == other.AVEVAIssues && this.ReviewFilePath == other.ReviewFilePath && this.ReviewFileName == other.ReviewFileName |
144 |
&& this.ProdReviewer == other.ProdReviewer && this.ProdIsResult == other.ProdIsResult && this.ProdRemarks == other.ProdRemarks && this.ClientReviewer == other.ClientReviewer |
145 |
&& this.ClientIsResult == other.ClientIsResult && this.ClientRemarks == other.ClientRemarks && this.DTIsGateWay == other.DTIsGateWay && this.DTIsImport == other.DTIsImport |
146 |
&& this.DTIsRegSystem == other.DTIsRegSystem && this.DTRemarks == other.DTRemarks; |
147 |
|
148 |
} |
149 |
public override int GetHashCode() |
150 |
{ |
151 |
return this.DocumentNo.GetHashCode() + this.RevisonNo.GetHashCode() + this.RefProjectID.GetHashCode() + this.IsLatest.GetHashCode() |
152 |
+ this.AutoCADFilie.GetHashCode() + this.PDFFile.GetHashCode() + this.MarkupLink.GetHashCode() + this.AVEVALink.GetHashCode() |
153 |
+ this.DocFilePath.GetHashCode() + this.DocFileName.GetHashCode() + this.Place.GetHashCode() + this.JobLevel.GetHashCode() + this.IsTypical.GetHashCode() |
154 |
+ this.PersonInCharge.GetHashCode() + this.IsDeleted.GetHashCode() + this.ToIsDiscussion.GetHashCode() + this.ToRemarks.GetHashCode() |
155 |
+ this.ToCreator.GetHashCode() + this.ToModifier.GetHashCode() + this.ToCapturePath.GetHashCode() + this.ToIsMarkup.GetHashCode() |
156 |
+ this.FrReviewStatus.GetHashCode() + this.FrRemarks.GetHashCode() + this.FrCreator.GetHashCode() + this.FrModifier.GetHashCode() |
157 |
+ this.FrCapturePath.GetHashCode() + this.FrIsMarkup.GetHashCode() + this.IsID2Work.GetHashCode() + this.ID2Connection.GetHashCode() |
158 |
+ this.ID2StartDate.GetHashCode() + this.ID2EndDate.GetHashCode() + this.ID2JobTime.GetHashCode() + this.ID2Status.GetHashCode() |
159 |
+ this.ID2Issues.GetHashCode() + this.AVEVAConnection.GetHashCode() + this.AVEVAConvertDate.GetHashCode() + this.AVEVAReviewDate.GetHashCode() |
160 |
+ this.AVEVAStatus.GetHashCode() + this.AVEVAIssues.GetHashCode() + this.ReviewFilePath.GetHashCode() + this.ReviewFileName.GetHashCode() |
161 |
+ this.ProdReviewer.GetHashCode() + this.ProdIsResult.GetHashCode() + this.ProdRemarks.GetHashCode() + this.ClientReviewer.GetHashCode() |
162 |
+ this.ClientIsResult.GetHashCode() + this.ClientRemarks.GetHashCode() + this.DTIsGateWay.GetHashCode() + this.DTIsImport.GetHashCode() |
163 |
+ this.DTIsRegSystem.GetHashCode() + this.DTRemarks.GetHashCode(); |
164 |
} |
165 |
|
166 |
//public class DocumentsComparer : IEqualityComparer<Documents> |
167 |
//{ |
168 |
// public bool Equals(Documents x, Documents y) |
169 |
// { |
170 |
// if (x == null && y == null) |
171 |
// return true; |
172 |
// else if (x == null || y == null) |
173 |
// return false; |
174 |
// else |
175 |
// { |
176 |
// return x.DocumentNo == y.DocumentNo && x.RevisonNo == y.RevisonNo && x.ProjectID == y.ProjectID && x.IsLatest == y.IsLatest |
177 |
// && x.AutoCADFilie == y.AutoCADFilie && x.PDFFile == y.PDFFile && x.MarkupLink == y.MarkupLink && x.AVEVALink == y.AVEVALink |
178 |
// && x.DocFilePath == y.DocFilePath && x.DocFileName == y.DocFileName && x.Place == y.Place && x.JobLevel == y.JobLevel && x.IsTypical == y.IsTypical |
179 |
// && x.PersonInCharge == y.PersonInCharge && x.IsDeleted == y.IsDeleted && x.ToIsDiscussion == y.ToIsDiscussion && x.ToRemarks == y.ToRemarks |
180 |
// && x.ToCreator == y.ToCreator && x.ToModifier == y.ToModifier && x.ToCapturePath == y.ToCapturePath && x.ToIsMarkup == y.ToIsMarkup |
181 |
// && x.FrReviewStatus == y.FrReviewStatus && x.FrRemarks == y.FrRemarks && x.FrCreator == y.FrCreator && x.FrModifier == y.FrModifier |
182 |
// && x.FrCapturePath == y.FrCapturePath && x.FrIsMarkup == y.FrIsMarkup && x.IsID2Work == y.IsID2Work && x.ID2Connection == y.ID2Connection |
183 |
// && x.ID2StartDate == y.ID2StartDate && x.ID2EndDate == y.ID2EndDate && x.ID2JobTime == y.ID2JobTime && x.ID2Status == y.ID2Status |
184 |
// && x.ID2Issues == y.ID2Issues && x.AVEVAConnection == y.AVEVAConnection && x.AVEVAConvertDate == y.AVEVAConvertDate && x.AVEVAReviewDate == y.AVEVAReviewDate |
185 |
// && x.AVEVAStatus == y.AVEVAStatus && x.AVEVAIssues == y.AVEVAIssues && x.ReviewFilePath == y.ReviewFilePath && x.ReviewFileName == y.ReviewFileName |
186 |
// && x.ProdReviewer == y.ProdReviewer && x.ProdIsResult == y.ProdIsResult && x.ProdRemarks == y.ProdRemarks && x.ClientReviewer == y.ClientReviewer |
187 |
// && x.ClientIsResult == y.ClientIsResult && x.ClientRemarks == y.ClientRemarks && x.DTIsGateWay == y.DTIsGateWay && x.DTIsImport == y.DTIsImport |
188 |
// && x.DTIsRegSystem == y.DTIsRegSystem && x.DTRemarks == y.DTRemarks; |
189 |
// } |
190 |
// } |
191 |
|
192 |
// public int GetHashCode(Documents obj) |
193 |
// { |
194 |
// return obj.DocumentNo.GetHashCode() + obj.RevisonNo.GetHashCode() + obj.ProjectID.GetHashCode() + obj.IsLatest.GetHashCode() |
195 |
// + obj.AutoCADFilie.GetHashCode() + obj.PDFFile.GetHashCode() + obj.MarkupLink.GetHashCode() + obj.AVEVALink.GetHashCode() |
196 |
// + obj.DocFilePath.GetHashCode() + obj.DocFileName.GetHashCode() + obj.Place.GetHashCode() + obj.JobLevel.GetHashCode() + obj.IsTypical.GetHashCode() |
197 |
// + obj.PersonInCharge.GetHashCode() + obj.IsDeleted.GetHashCode() + obj.ToIsDiscussion.GetHashCode() + obj.ToRemarks.GetHashCode() |
198 |
// + obj.ToCreator.GetHashCode() + obj.ToModifier.GetHashCode() + obj.ToCapturePath.GetHashCode() + obj.ToIsMarkup.GetHashCode() |
199 |
// + obj.FrReviewStatus.GetHashCode() + obj.FrRemarks.GetHashCode() + obj.FrCreator.GetHashCode() + obj.FrModifier.GetHashCode() |
200 |
// + obj.FrCapturePath.GetHashCode() + obj.FrIsMarkup.GetHashCode() + obj.IsID2Work.GetHashCode() + obj.ID2Connection.GetHashCode() |
201 |
// + obj.ID2StartDate.GetHashCode() + obj.ID2EndDate.GetHashCode() + obj.ID2JobTime.GetHashCode() + obj.ID2Status.GetHashCode() |
202 |
// + obj.ID2Issues.GetHashCode() + obj.AVEVAConnection.GetHashCode() + obj.AVEVAConvertDate.GetHashCode() + obj.AVEVAReviewDate.GetHashCode() |
203 |
// + obj.AVEVAStatus.GetHashCode() + obj.AVEVAIssues.GetHashCode() + obj.ReviewFilePath.GetHashCode() + obj.ReviewFileName.GetHashCode() |
204 |
// + obj.ProdReviewer.GetHashCode() + obj.ProdIsResult.GetHashCode() + obj.ProdRemarks.GetHashCode() + obj.ClientReviewer.GetHashCode() |
205 |
// + obj.ClientIsResult.GetHashCode() + obj.ClientRemarks.GetHashCode() + obj.DTIsGateWay.GetHashCode() + obj.DTIsImport.GetHashCode() |
206 |
// + obj.DTIsRegSystem.GetHashCode() + obj.DTRemarks.GetHashCode(); |
207 |
// } |
208 |
//} |
209 |
|
210 |
public class DocumentsKeyComparer : IEqualityComparer<Documents> |
211 |
{ |
212 |
public bool Equals(Documents x, Documents y) |
213 |
{ |
214 |
if (x == null && y == null) |
215 |
return true; |
216 |
else if (x == null || y == null) |
217 |
return false; |
218 |
else |
219 |
{ |
220 |
return x.DocID == y.DocID; |
221 |
} |
222 |
} |
223 |
|
224 |
public int GetHashCode(Documents obj) |
225 |
{ |
226 |
return (obj.DocID != null ? obj.DocID.GetHashCode() : 0); |
227 |
} |
228 |
} |
229 |
} |
230 |
} |