Commit 330a048b authored by nkhan's avatar nkhan

Added by Nasruddin khan


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102564 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 205f22c4
......@@ -2,12 +2,14 @@ package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.*;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local; // added for ejb3
//public interface SOrderForm extends ValidatorLocal,EJBObject
@Local // added for ejb3
public interface CommissiondetICLocal
public interface CommissiondetICLocal extends ValidatorLocal
{
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
......
......@@ -3,13 +3,14 @@ package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.*;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; // added for ejb3
//public interface SOrderForm extends ValidatorLocal,EJBObject
@Remote // added for ejb3
public interface CommissiondetICRemote
public interface CommissiondetICRemote extends ValidatorLocal
{
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
......
......@@ -98,6 +98,7 @@ implements CustomerLocal, CustomerRemote
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
String commTable = "";//changed by Nasruddin [19/JUL/16 ]
try
{
this.finCommon = new FinCommon();
......@@ -1317,7 +1318,36 @@ implements CustomerLocal, CustomerRemote
errFields.add(childNodeName.toLowerCase());
}
}
}
}//Changed By Nasruddin khan [19/JUL/16] START
else if( childNodeName.equalsIgnoreCase("comm_table")){
commTable = checkNull(this.genericUtility.getColumnValue("comm_table", dom));
if( commTable != null && commTable.trim().length() > 0){
cnt = 0;
sql = "select count(1) as cnt from comm_hdr where comm_table = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, commTable);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (cnt == 0)
{
errCode = "VMCOMMTBCD";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}//Changed By Nasruddin khan [19/JUL/16] END
// else if(childNodeName.equalsIgnoreCase("cust_code__pd")){
// custCodePd =
// checkNull(this.genericUtility.getColumnValue(
......
......@@ -101,6 +101,7 @@ public class Supplier extends ValidatorEJB implements SupplierLocal,SupplierRemo
ConnDriver connDriver = new ConnDriver();
int currentFormNo = 0;
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
String commTable = "";
try
{
SimpleDateFormat sdf1= new SimpleDateFormat(genericUtility.getDBDateFormat());
......@@ -526,6 +527,35 @@ public class Supplier extends ValidatorEJB implements SupplierLocal,SupplierRemo
}
}
}
//Changed By Nasruddin khan [19/JUL/16] START
else if( childNodeName.equalsIgnoreCase("comm_table")){
commTable = checkNull(this.genericUtility.getColumnValue("comm_table", dom));
if( commTable != null && commTable.trim().length() > 0){
count = 0;
sql = "select count(1) as count from comm_hdr where comm_table = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, commTable);
rs = pstmt.executeQuery();
if (rs.next())
{
count = rs.getInt("count");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (count == 0)
{
errCode = "VMCOMMTBCD";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}//Changed By Nasruddin khan [19/JUL/16] END
}
break; //end case 1 validation.
......
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