Commit 26a8d791 authored by smane's avatar smane

Update file IncidentChargeIC.java (DI3LSUN001)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@94447 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a3b4ebb2
...@@ -138,14 +138,15 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo ...@@ -138,14 +138,15 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
System.out.println(">>>>>>>>>custName already exist cnt:"+cnt); System.out.println(">>>>>>>>>custName already exist cnt:"+cnt);
if(cnt > 0)
{ }
if(cnt > 0)
{
// Error for From Day/Time already exists for the same Incidental Charges defined // Error for From Day/Time already exists for the same Incidental Charges defined
System.out.println("//From Day/Time already exists for the same Incidental Charges defined:"+fromDay); System.out.println("//From Day/Time already exists for the same Incidental Charges defined:"+fromDay);
errCode = "VMFRMTMVLD"; errCode = "VMFRMTMVLD";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
}
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -309,13 +310,7 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo ...@@ -309,13 +310,7 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo
// method for item change // method for item change
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{ {
String childNodeName = null;
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
int ctr = 0;
NodeList parentNodeList = null;
NodeList childNodeList = null;
Node parentNode = null;
Node childNode = null;
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null ; ResultSet rs = null ;
...@@ -345,30 +340,11 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo ...@@ -345,30 +340,11 @@ public class IncidentChargeIC extends ValidatorEJB implements IncidentChargeICLo
valueXmlString = new StringBuffer("<?xml version = \"1.0\"?> <Root> <header> <editFlag>"); valueXmlString = new StringBuffer("<?xml version = \"1.0\"?> <Root> <header> <editFlag>");
valueXmlString.append(editFlag).append("</editFlag> </header>"); valueXmlString.append(editFlag).append("</editFlag> </header>");
System.out.println("**********ITEMCHANGE FOR CASE"+currentFormNo+"**************"); System.out.println("**********NEW ITEMCHANGE FOR CASE"+currentFormNo+"**************");
switch(currentFormNo) switch(currentFormNo)
{ {
case 1 : case 1 :
parentNodeList = dom.getElementsByTagName("Detail1"); valueXmlString.append("<Detail1>");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
ctr = 0;
valueXmlString.append("<Detail1>");
int childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if(childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild()!= null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
}
}
ctr++;
}
while(ctr < childNodeListLength && !childNodeName.equals(currentColumn));
System.out.println("[" + currentColumn + "] ==> '" + columnValue + "'"); System.out.println("[" + currentColumn + "] ==> '" + columnValue + "'");
if(currentColumn.trim().equalsIgnoreCase("inc_chg")) if(currentColumn.trim().equalsIgnoreCase("inc_chg"))
{ {
......
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