Commit 3da8f307 authored by sgadve's avatar sgadve

Cost centre related changes

- Created EJB component for costctr 

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@189408 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 85ea5fc3
/**
DEVELOPED BY Saiprasad G ON 16/08/18
PURPOSE : Cost cetnter code and Cost Center Account*/
package ibase.webitm.ejb.fin; package ibase.webitm.ejb.fin;
import java.rmi.RemoteException; import java.rmi.RemoteException;
...@@ -94,11 +91,11 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe ...@@ -94,11 +91,11 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe
*/ */
if (currentFormNo == 1 || "costctr".equals(formName)) if (currentFormNo == 1 || "costctr".equals(formName))
{ {
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail"+currentFormNo);
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
childNodeLength = childNodeList.getLength(); childNodeLength = childNodeList.getLength();
valueXmlString.append("<Detail1>"); valueXmlString.append("<Detail"+currentFormNo+">");
for (ctr = 0; ctr < childNodeLength; ctr++) for (ctr = 0; ctr < childNodeLength; ctr++)
{ {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
...@@ -165,15 +162,15 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe ...@@ -165,15 +162,15 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe
} }
}// end if block for level_no }// end if block for level_no
} }
valueXmlString.append("</Detail1>"); valueXmlString.append("</Detail"+currentFormNo+">");
} // end case1 } // end case1
else if (currentFormNo == 2 || "cctracct".equals(formName)) else if (currentFormNo == 2 || "cctracct".equals(formName))
{ {
parentNodeList = dom.getElementsByTagName("Detail2"); parentNodeList = dom.getElementsByTagName("Detail"+currentFormNo);
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
childNodeLength = childNodeList.getLength(); childNodeLength = childNodeList.getLength();
valueXmlString.append("<Detail2>"); valueXmlString.append("<Detail"+currentFormNo+">");
for (ctr = 0; ctr < childNodeLength; ctr++) for (ctr = 0; ctr < childNodeLength; ctr++)
{ {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
...@@ -189,7 +186,7 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe ...@@ -189,7 +186,7 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe
} }
} // end if block for acct_code } // end if block for acct_code
} }
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail"+currentFormNo+">");
} // end case2 } // end case2
valueXmlString.append("</Root>"); valueXmlString.append("</Root>");
} }
...@@ -304,10 +301,10 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe ...@@ -304,10 +301,10 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe
*/ */
if (currentFormNo == 1 || "costctr".equals(formName)) if (currentFormNo == 1 || "costctr".equals(formName))
{ {
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail"+currentFormNo);
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail1>"); valueXmlString.append("<Detail"+currentFormNo+">");
ctr = 0; ctr = 0;
int childNodeListLength = childNodeList.getLength(); int childNodeListLength = childNodeList.getLength();
System.out.println("childNodelistLength" + childNodeListLength); System.out.println("childNodelistLength" + childNodeListLength);
...@@ -376,14 +373,14 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe ...@@ -376,14 +373,14 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe
} }
}//end of itemchanged dept_code }//end of itemchanged dept_code
valueXmlString.append("</Detail1>"); valueXmlString.append("</Detail"+currentFormNo+">");
} // end of if for the form name } // end of if for the form name
else if (currentFormNo == 2 || "cctracct".equals(formName)) else if (currentFormNo == 2 || "cctracct".equals(formName))
{ {
parentNodeList = dom.getElementsByTagName("Detail2"); parentNodeList = dom.getElementsByTagName("Detail"+currentFormNo);
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail2>"); valueXmlString.append("<Detail"+currentFormNo+">");
ctr = 0; ctr = 0;
int childNodeListLength1 = childNodeList.getLength(); int childNodeListLength1 = childNodeList.getLength();
System.out.println("childNodelistLength1" + childNodeListLength1); System.out.println("childNodelistLength1" + childNodeListLength1);
...@@ -434,7 +431,7 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe ...@@ -434,7 +431,7 @@ public class CostCentre extends ValidatorEJB implements CostCentreRemote, CostCe
valueXmlString.append("<sh_descr>").append("<![CDATA[" + acctshdescr.trim() + "]]>").append("</sh_descr>"); valueXmlString.append("<sh_descr>").append("<![CDATA[" + acctshdescr.trim() + "]]>").append("</sh_descr>");
} }
}//end of itemchanged for the acct_code }//end of itemchanged for the acct_code
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail"+currentFormNo+">");
} // end of else if } // end of else if
valueXmlString.append("</Root>"); valueXmlString.append("</Root>");
} // END OF TRY } // END OF TRY
......
/**
DEVELOPED BY Saiprasad G ON 16/08/18
PURPOSE : Cost cetnter code and Cost Center Account */
package ibase.webitm.ejb.fin; package ibase.webitm.ejb.fin;
import java.rmi.RemoteException; import java.rmi.RemoteException;
......
/**
DEVELOPED BY Saiprasad G ON 16/08/18
PURPOSE : Cost cetnter code and Cost Center Account*/
package ibase.webitm.ejb.fin; package ibase.webitm.ejb.fin;
import java.rmi.RemoteException; import java.rmi.RemoteException;
......
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