Commit 4d9286e5 authored by steurwadkar's avatar steurwadkar

Changes made to remove incorrect validation in profile

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@173194 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 65862d05
......@@ -120,24 +120,28 @@ public class ProfileResourceIC extends ValidatorEJB implements TaxChapterICLocal
int seriesCount=0;
if(childNodeName.equalsIgnoreCase("profile_id"))
{
String id = genericUtility.getColumnValue("profile_id", dom);
String Sql = "SELECT COUNT(1) AS COUNT FROM profile WHERE profile_id=?";
pstmt = conn.prepareStatement(Sql);
pstmt.setString(1,id);
rs = pstmt.executeQuery();
System.out.println("Sql" + Sql);
if (rs.next()) {
seriesCount = rs.getInt("COUNT");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (seriesCount > 0)
{
errString = getErrorString(" ", "VMPRFLIDEX", userId);
break;
}
//Added by Santosh on 07-11-2017 to validate in add mode only
if("A".equalsIgnoreCase(editFlag))
{
String id = genericUtility.getColumnValue("profile_id", dom);
String Sql = "SELECT COUNT(1) AS COUNT FROM profile WHERE profile_id=?";
pstmt = conn.prepareStatement(Sql);
pstmt.setString(1,id);
rs = pstmt.executeQuery();
System.out.println("Sql" + Sql);
if (rs.next()) {
seriesCount = rs.getInt("COUNT");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (seriesCount > 0)
{
errString = getErrorString(" ", "VMPRFLIDEX", userId);
break;
}
}
profileId = checkNull(genericUtility.getColumnValue("profile_id", dom));
System.out.println("profileId="+profileId);
if(profileId == null || profileId.trim().length() == 0)
......@@ -145,7 +149,8 @@ public class ProfileResourceIC extends ValidatorEJB implements TaxChapterICLocal
errString = itmDBAccessEJB.getErrorString("","VMNUPROID ",userId);
break ;
}
else
//Commented by Santosh on 07-11-2017 to remove invalid validation
/*else
{
sql = " select count ( *) from users where profile_id = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -164,7 +169,7 @@ public class ProfileResourceIC extends ValidatorEJB implements TaxChapterICLocal
errString = itmDBAccessEJB.getErrorString("","VTINVPROID ",userId);
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