Commit 8de3e15e authored by agaikwad's avatar agaikwad

Added validation of Primary key (DUplicate Cust code and Bank code ben )of Customer Bank.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99881 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d54b2f9f
......@@ -166,6 +166,32 @@ public class CustBank extends ValidatorEJB implements CustBankLocal, CustBankRem
errString = getErrorString("bank_code__ben",errCode, userId);
break;
}
else
{
if(!editFlag.equals("E"))
{
sql = "select count(1) from customer_bank where cust_code = ? and bank_code__ben= ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, custCode);
pStmt.setString(2, bankCodeBen);
rs = pStmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
rs.close();
rs = null;
pStmt.close();
pStmt = null;
System.out.println("Count is" + cnt);
if (cnt > 0)
{
errCode = "VMTRANIDEX";
errString = getErrorString("cust_code",errCode, userId);
break;
}
}
}
System.out.println("IN CUreency");
currCode=genericUtility.getColumnValue("curr_code", dom);
System.out.println("currCode from loan party bank===="+currCode);
......
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