我正在使用以下代码,该代码无法检查“修订状态”
的重复值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;
}
RevStatus的格式就像
CN - Cancelled
IFP - Issued For Purchase
答案 0 :(得分:0)
尝试检查数据表。
if (DT.Rows.Count > 0)
Res = true;
return Res;