Commit 06cb4e22 authored by wansari's avatar wansari

D16IBAS004 added site code validation if it is blank or invalid.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105434 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 73a911b4
......@@ -271,6 +271,39 @@ public class PostOrderProcess extends ProcessEJB implements PostOrderProcessLoca
// Added by Sneha on 08/02/2017, for validation [End]
//System.out.println("clubPendingOrd :"+clubPendingOrd);
//Added by wasim on 21-APR-17 for site code validation if it blank [START]
if(siteCodeShip == null || siteCodeShip.trim().length() == 0)
{
retString = itmDBAccessEJB.getErrorString("", "VTSITCODE", "","", conn);
return retString;
}
else
{
sql=" SELECT COUNT(1) FROM SITE WHERE SITE_CODE= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,siteCodeShip);
rs= pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();rs = null;
}
if(pstmt != null)
{
pstmt.close();pstmt = null;
}
if(cnt == 0)
{
retString = itmDBAccessEJB.getErrorString("", "VTSITEXT", "","", conn);
return retString;
}
}
//Added by wasim on 21-APR-17 for site code validation if it blank [END]
if(clubPendingOrd != null && clubPendingOrd.equalsIgnoreCase("Y") )
{
sql="select count(1) from customer where cust_code= ? ";
......
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