Commit 2201bcfe authored by pshinde's avatar pshinde

Change in State Master


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96570 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9de9dda1
......@@ -127,41 +127,43 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote
pstmt.close();
pstmt = null;
stateCode = genericUtility.getColumnValue("state_code", dom);
if(stateCode==null ||stateCode.trim().length()==0)
if(keyFlag.equalsIgnoreCase("M"))
{
errCode = "VESTATCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
break;
}
else
{
if(editFlag.equals("A"))
stateCode = genericUtility.getColumnValue("state_code", dom);
if(stateCode==null ||stateCode.trim().length()==0)
{
sql="select count(*) from state where state_code = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, stateCode);
rs=pstmt.executeQuery();
if(rs.next())
{
stateCnt=rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(stateCnt>0)
errCode = "VESTATCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
break;
}
else
{
if(editFlag.equals("A"))
{
errCode = "VMDUPL1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
break;
sql="select count(*) from state where state_code = ?";
pstmt=conn.prepareStatement(sql);
pstmt.setString(1, stateCode);
rs=pstmt.executeQuery();
if(rs.next())
{
stateCnt=rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(stateCnt>0)
{
errCode = "VMDUPL1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
break;
}
}
}
}
}
}
......@@ -265,6 +267,7 @@ public class StateIC extends ValidatorEJB implements StateICLocal, StateICRemote
pstmt = null;
}
}
}
break;
......
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