Commit c1dbadaa authored by pbhosale's avatar pbhosale

Updated on[24-01-2020][To assign connection to exprsEngine]

AllowDednSalComp.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215648 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 599cd9be
...@@ -931,16 +931,30 @@ public class AllowDednSalComp ...@@ -931,16 +931,30 @@ public class AllowDednSalComp
try try
{ {
//Added below line by Varsha V on 02-12-19 //Added below line by Varsha V on 02-12-19
admCommonConn = argConn; //Modified By Poonam B[24-01-2020][To assign argConn to exprsEngine][START]
//admCommonConn = argConn;
exprsEngine.put("conn", argConn);
System.out.println("argConn inside exprsEngine is::::" +exprsEngine.get("conn").toString()+"\nargConn is ::::" +argConn);
//added by Poonam B[16-12-2019][To avoid nullPointer][START] //added by Poonam B[16-12-2019][To avoid nullPointer][START]
exprsEngine.eval("function GF_GETENV(a,b) {var compName = Packages.ibase.webitm.ejb.adm.AllowDednSalComp;" /*exprsEngine.eval("function GF_GETENV(a,b) {var compName = Packages.ibase.webitm.ejb.adm.AllowDednSalComp;"
+ "var obj = new Packages.ibase.webitm.ejb.adm.AllowDednSalComp();" + "var obj = new Packages.ibase.webitm.ejb.adm.AllowDednSalComp();"
+ "var res = obj.getEnv(a,b);" + "var res = obj.getEnv(a,b);"
+ "return res;}"); + "return res;}");
exprsEngine.eval("function GF_CALL_PYRL_DDF(a,b,c,d,e,f) {var compName = Packages.ibase.webitm.ejb.adm.AllowDednSalComp;" exprsEngine.eval("function GF_CALL_PYRL_DDF(a,b,c,d,e,f) {var compName = Packages.ibase.webitm.ejb.adm.AllowDednSalComp;"
+ "var obj = new Packages.ibase.webitm.ejb.adm.AllowDednSalComp();" + "var obj = new Packages.ibase.webitm.ejb.adm.AllowDednSalComp();"
+ "var res = obj.gfCallPayrollDdf(a,b,c,d,e,f);" + "var res = obj.gfCallPayrollDdf(a,b,c,d,e,f);"
+ "return res;}");*/
exprsEngine.eval("function GF_GETENV(a,b) {var compName = Packages.ibase.webitm.ejb.adm.AllowDednSalComp;"
+ "var obj = new Packages.ibase.webitm.ejb.adm.AllowDednSalComp();"
+ "var res = obj.getEnv(a,b,conn);"
+ "return res;}"); + "return res;}");
exprsEngine.eval("function GF_CALL_PYRL_DDF(a,b,c,d,e,f) {var compName = Packages.ibase.webitm.ejb.adm.AllowDednSalComp;"
+ "var obj = new Packages.ibase.webitm.ejb.adm.AllowDednSalComp();"
+ "var res = obj.gfCallPayrollDdf(a,b,c,d,e,f,conn);"
+ "return res;}");
//Modified By Poonam B[24-01-2020][To assign argConn to exprsEngine][END]
//added by Poonam B[16-12-2019][To avoid nullPointer][END] //added by Poonam B[16-12-2019][To avoid nullPointer][END]
/*sql = "select date_join, relieve_date, retirement_date from employee where emp_code = ? "; /*sql = "select date_join, relieve_date, retirement_date from employee where emp_code = ? ";
pstmt = argConn.prepareStatement(sql);*/ pstmt = argConn.prepareStatement(sql);*/
...@@ -2339,7 +2353,10 @@ public class AllowDednSalComp ...@@ -2339,7 +2353,10 @@ public class AllowDednSalComp
} }
//Added by Varsha V on 2-12-19 //Added by Varsha V on 2-12-19
public String getEnv(String prdCode, String varName) throws ITMException //Modified by Poonam B[24-01-2020][to add connection to method][START]
//public String getEnv(String prdCode, String varName) throws ITMException
public String getEnv(String prdCode, String varName, Connection conn) throws ITMException
//Modified by Poonam B[24-01-2020][to add connection to method][END]
{ {
String retValue = ""; String retValue = "";
String sql = ""; String sql = "";
...@@ -2348,7 +2365,11 @@ public class AllowDednSalComp ...@@ -2348,7 +2365,11 @@ public class AllowDednSalComp
try try
{ {
System.out.println("prd_code: "+prdCode+ " varName: "+varName); System.out.println("prd_code: "+prdCode+ " varName: "+varName);
retValue = admCommon.getEnv(prdCode, varName, admCommonConn); //Modified by Poonam B[24-01-2020][to add connection to method][START]
//retValue = admCommon.getEnv(prdCode, varName, admCommonConn);
retValue = admCommon.getEnv(prdCode, varName, conn);
System.out.println("retValue: "+retValue);
//Modified by Poonam B[24-01-2020][to add connection to method][END]
} }
catch (Exception e) catch (Exception e)
{ {
...@@ -2358,13 +2379,20 @@ public class AllowDednSalComp ...@@ -2358,13 +2379,20 @@ public class AllowDednSalComp
} }
return retValue; return retValue;
} }
public double gfCallPayrollDdf(String empcode, String prdcode, String proctype, String calctype, double acNewamt, String adcode) throws SQLException, ITMException //Modified by Poonam B[24-01-2020][to add connection to method][START]
//public double gfCallPayrollDdf(String empcode, String prdcode, String proctype, String calctype, double acNewamt, String adcode) throws SQLException, ITMException
public double gfCallPayrollDdf(String empcode, String prdcode, String proctype, String calctype, double acNewamt, String adcode , Connection conn) throws SQLException, ITMException
//Modified by Poonam B[24-01-2020][to add connection to method][END]
{ {
double retAmt = 0.0; double retAmt = 0.0;
System.out.println("gfCallPayrollDdf Method called"); System.out.println("gfCallPayrollDdf Method called");
try try
{ {
retAmt = admCommon.gfCallPayrollDdf(empcode, prdcode, proctype, calctype, acNewamt, adcode, admCommonConn); //Modified by Poonam B[24-01-2020][to add connection to method][START]
//retAmt = admCommon.gfCallPayrollDdf(empcode, prdcode, proctype, calctype, acNewamt, adcode, admCommonConn);
System.out.println("conn inside AllowDednSalComp::::" +conn);
retAmt = admCommon.gfCallPayrollDdf(empcode, prdcode, proctype, calctype, acNewamt, adcode, conn);
//Modified by Poonam B[24-01-2020][to add connection to method][END]
} }
catch(Exception e) catch(Exception e)
{ {
......
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