检查重复项
我正在使用以下代码,该代码无法检查
private bool CheckRevision(string docType,string Revision)
{
bool Res = false;
DataTable DT = new DataTable();
DT = PinDicDAO.GetRevision(docType);
DataView DV = new DataView(DT);
DV.RowFilter = "RevisionStatus='" + Revision.Replace(" ", "") + "' OR RevisionStatus='"+Revision+"'";
if (DV.Count > 0)
Res = true;
return Res;
}
RevisionStatus 格式的“修订状态”的重复值,如下所示
CN - Cancelled
IFP - Issued For Purchase
I'm using following code which is not working to check duplicate values for "Revision Status"
private bool CheckRevision(string docType,string Revision)
{
bool Res = false;
DataTable DT = new DataTable();
DT = PinDicDAO.GetRevision(docType);
DataView DV = new DataView(DT);
DV.RowFilter = "RevisionStatus='" + Revision.Replace(" ", "") + "' OR RevisionStatus='"+Revision+"'";
if (DV.Count > 0)
Res = true;
return Res;
}
format of the RevisionStatus will be like
CN - Cancelled
IFP - Issued For Purchase
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试检查数据表。
Try to check the datatable instead.