개정판 d2d4f84b
issue #0000
- Excel Import/Export
- Excel Import 시 기존데이터는 그대로 두고 append만 가능하도록
- Excel Impor 시 유효성 체크(document no), excel 유효성 체크
- 저장
- Document 비교로직 추가
Change-Id: Iee4d385bc85eb9ea71b6d817a6462c0775eefe2d
ID2.Manager/ID2.Manager.Data/Models/Documents.cs | ||
---|---|---|
20 | 20 |
[DataMember] |
21 | 21 |
public string RevisonNo { get; set; } |
22 | 22 |
[DataMember] |
23 |
public string ProjectID { get; set; } |
|
23 |
public string RefProjectID { get; set; }
|
|
24 | 24 |
[DataMember] |
25 | 25 |
public bool IsLatest { get; set; } |
26 | 26 |
[DataMember] |
... | ... | |
131 | 131 |
|
132 | 132 |
public bool Equals(Documents other) |
133 | 133 |
{ |
134 |
return other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.ProjectID == other.ProjectID && this.IsLatest == other.IsLatest
|
|
134 |
return other != null && this.DocumentNo == other.DocumentNo && this.RevisonNo == other.RevisonNo && this.RefProjectID == other.RefProjectID && this.IsLatest == other.IsLatest
|
|
135 | 135 |
&& this.AutoCADFilie == other.AutoCADFilie && this.PDFFile == other.PDFFile && this.MarkupLink == other.MarkupLink && this.AVEVALink == other.AVEVALink |
136 | 136 |
&& this.DocFilePath == other.DocFilePath && this.DocFileName == other.DocFileName && this.Place == other.Place && this.JobLevel == other.JobLevel && this.IsTypical == other.IsTypical |
137 | 137 |
&& this.PersonInCharge == other.PersonInCharge && this.IsDeleted == other.IsDeleted && this.ToIsDiscussion == other.ToIsDiscussion && this.ToRemarks == other.ToRemarks |
... | ... | |
148 | 148 |
} |
149 | 149 |
public override int GetHashCode() |
150 | 150 |
{ |
151 |
return this.DocumentNo.GetHashCode() + this.RevisonNo.GetHashCode() + this.ProjectID.GetHashCode() + this.IsLatest.GetHashCode() |
|
151 |
return this.DocumentNo.GetHashCode() + this.RevisonNo.GetHashCode() + this.RefProjectID.GetHashCode() + this.IsLatest.GetHashCode()
|
|
152 | 152 |
+ this.AutoCADFilie.GetHashCode() + this.PDFFile.GetHashCode() + this.MarkupLink.GetHashCode() + this.AVEVALink.GetHashCode() |
153 | 153 |
+ this.DocFilePath.GetHashCode() + this.DocFileName.GetHashCode() + this.Place.GetHashCode() + this.JobLevel.GetHashCode() + this.IsTypical.GetHashCode() |
154 | 154 |
+ this.PersonInCharge.GetHashCode() + this.IsDeleted.GetHashCode() + this.ToIsDiscussion.GetHashCode() + this.ToRemarks.GetHashCode() |
... | ... | |
162 | 162 |
+ this.ClientIsResult.GetHashCode() + this.ClientRemarks.GetHashCode() + this.DTIsGateWay.GetHashCode() + this.DTIsImport.GetHashCode() |
163 | 163 |
+ this.DTIsRegSystem.GetHashCode() + this.DTRemarks.GetHashCode(); |
164 | 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 |
} |
|
165 | 229 |
} |
166 | 230 |
} |
내보내기 Unified diff