开发者

Check Duplicates

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)开发者_如何学Python;
            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


Try to check the datatable instead.

if (DT.Rows.Count > 0)
                Res = true;

            return Res;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜