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