Commit 1124f1c2 authored by cpatil's avatar cpatil

added validation for reg_no


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93718 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 43d470be
...@@ -104,12 +104,33 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe ...@@ -104,12 +104,33 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe
if ( refCode == null || refCode.trim().length() == 0 ) if ( refCode == null || refCode.trim().length() == 0 )
{ {
errCode = "VU_REFNO"; errCode = "VMREFNONUL";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else else
{ {
sql = " SELECT count(1) FROM GENCODES WHERE FLD_NAME = 'REF_CODE' and FLD_VALUE = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, refCode );
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if( cnt == 0 )
{
errCode = "VU_REFNO";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
refCode = genericUtility.getColumnValue("ref_code",dom); refCode = genericUtility.getColumnValue("ref_code",dom);
siteCode = genericUtility.getColumnValue("site_code",dom); siteCode = genericUtility.getColumnValue("site_code",dom);
finEntity = genericUtility.getColumnValue("fin_entity",dom); finEntity = genericUtility.getColumnValue("fin_entity",dom);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment