Commit c74e2c26 authored by mjadhav's avatar mjadhav

validate Lock code,not allow system management lock type


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95169 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1fa8c3e3
......@@ -76,6 +76,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
Node parentNode = null;
Node childNode = null;
int ctr = 0;
int typeCnt = 0;
String childNodeName = null;
String errCode = null;
......@@ -88,6 +89,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
ResultSet rs = null,rsQuant=null;
String sql = null,sqlQuant=null;
String tranDateStr = null;
ConnDriver connDriver = new ConnDriver();
......@@ -104,7 +106,7 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
switch(currentFormNo)
{
case 1 :
System.out.println("VALIDATION FOR DETAIL [ 1 ]..........");
System.out.println("VALIDATION FOR DETAIL@@@@ [ 1 ]..........");
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
......@@ -249,23 +251,54 @@ public class InvHoldIC extends ValidatorEJB implements InvHoldICLocal , InvHoldI
{
cnt = rs.getInt("COUNT");
}
if( rs != null )
{
rs.close();
rs = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if( cnt == 0 )
{
errString = getErrorString("lock_code","INVLOCKCD",userId);
break;
}
/*
* changes done by mahendra on 29-05-2014
* Inventery Hold not allow to enter lock type is 'System managed locks'
* */
System.out.println("lockCode "+lockCode);
sql = "select count(*) as COUNT from inv_lock where lock_code=? and lock_type='3' " ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,lockCode);
rs = pstmt.executeQuery();
if( rs.next())
{
typeCnt = rs.getInt("COUNT");
}
if( rs != null )
{
rs.close();
rs = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
if( typeCnt > 0 )
{
errString = getErrorString("lock_code","INVLKCDTP",userId);
break;
}
}
if( rs != null )
{
rs.close();
rs = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
//Changed by Dharmesh on 12-08-2011 [WM1ESUN004] to validate lock_code.end
......
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