Commit 38350a25 authored by pshinde's avatar pshinde

Source code for post save for Period Table Generation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100100 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1f030318
......@@ -66,6 +66,7 @@ public class PrdTableGenPostSave extends ValidatorEJB implements PrdTableGenPost
boolean value=false;
ibase.utility.E12GenericUtility genericUtility = null;
genericUtility = new ibase.utility.E12GenericUtility();
boolean isSelect=false;
try
{
itmDBAccessEJB = new ITMDBAccessEJB();
......@@ -181,7 +182,7 @@ public class PrdTableGenPostSave extends ValidatorEJB implements PrdTableGenPost
System.out.println("@@@@ctr["+dtlCtr+"]Period code["+prdCode+"]-Period table Code["+prdTblNo+"]-from date["+frDate+"]To Date["+toDate+"]period closed["+prdClose+"]@@@");
System.out.println("isSelect============"+isSelect);
if("N".equalsIgnoreCase(status))
{
......@@ -246,12 +247,23 @@ public class PrdTableGenPostSave extends ValidatorEJB implements PrdTableGenPost
pstmt = null;
}
if(detCnt>0 ||updateCount>0)
{
System.out.println(">>The selected transaction is confirmed");
errString = itmDBAccessEJB.getErrorString("","VTCONSUCF","","",conn);
isSelect=true;
errString="";
//errString = itmDBAccessEJB.getErrorString("","VTCONSUCF","","",conn);
}
}//end
else if(!isSelect )
{
System.out.println(">No Data Selected"+isSelect);
errString = itmDBAccessEJB.getErrorString("","VTNODATA","","",conn);
}
}
......@@ -270,7 +282,17 @@ public class PrdTableGenPostSave extends ValidatorEJB implements PrdTableGenPost
try
{
System.out.println(">>>>>In finally errString:"+errString);
if(errString != null && errString.trim().length() > 0)
if(errString == null || errString.trim().length() == 0)
{
conn.commit();
}
else
{
conn.rollback();
}
/* if(errString != null && errString.trim().length() > 0)
{
if(errString.indexOf("VTCONSUCF") > -1)
{
......@@ -281,7 +303,7 @@ public class PrdTableGenPostSave extends ValidatorEJB implements PrdTableGenPost
{
conn.rollback();
}
}
}*/
if(rs != null)
{
rs.close();
......@@ -300,7 +322,7 @@ public class PrdTableGenPostSave extends ValidatorEJB implements PrdTableGenPost
throw new ITMException(e);
}
}
return errorString;
return errString;
}
......
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