Commit c51e99e2 authored by vvengurlekar's avatar vvengurlekar

SiteRegNoIC.java - Added code of itemchange for site_code and make fin_entity...

SiteRegNoIC.java - Added code of itemchange for site_code and make fin_entity and eff_from non editable in case of edit

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@182878 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ec5fec92
...@@ -530,13 +530,70 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe ...@@ -530,13 +530,70 @@ public class SiteRegNoIC extends ValidatorEJB implements SiteRegNoICLocal,SiteRe
{ {
System.out.println("@@@@@ itm_defaultedit item change called"); System.out.println("@@@@@ itm_defaultedit item change called");
finEntity = genericUtility.getColumnValue("fin_entity",dom); finEntity = genericUtility.getColumnValue("fin_entity",dom);
valueXmlString.append( "<fin_entity protect=\"0\" ><![CDATA[" ).append(finEntity==null?"":finEntity).append( "]]></fin_entity>\r\n" ); //Commented by Varsha V for making fin_entity field non-editable on 30-3-2018
//valueXmlString.append( "<fin_entity protect=\"0\" ><![CDATA[" ).append(finEntity==null?"":finEntity).append( "]]></fin_entity>\r\n" );
valueXmlString.append( "<fin_entity protect=\"1\" ><![CDATA[" ).append(finEntity==null?"":finEntity).append( "]]></fin_entity>\r\n" );
effFromStr = genericUtility.getColumnValue("eff_from",dom); effFromStr = genericUtility.getColumnValue("eff_from",dom);
validUptoStr = genericUtility.getColumnValue("valid_upto",dom); validUptoStr = genericUtility.getColumnValue("valid_upto",dom);
valueXmlString.append( "<eff_from protect=\"0\" ><![CDATA[" ).append(effFromStr).append( "]]></eff_from>\r\n" ); //Commented by Varsha V for making eff_from field non-editable on 30-3-2018
//valueXmlString.append( "<eff_from protect=\"0\" ><![CDATA[" ).append(effFromStr).append( "]]></eff_from>\r\n" );
valueXmlString.append( "<eff_from protect=\"1\" ><![CDATA[" ).append(effFromStr).append( "]]></eff_from>\r\n" );
valueXmlString.append( "<valid_upto protect=\"0\" ><![CDATA[" ).append(validUptoStr).append( "]]></valid_upto>\r\n" ); valueXmlString.append( "<valid_upto protect=\"0\" ><![CDATA[" ).append(validUptoStr).append( "]]></valid_upto>\r\n" );
} }
//Added itemchange for site_code by Varsha V
if( currentColumn.trim().equalsIgnoreCase( "site_code" ) )
{
System.out.println("@@@@@ site_code item change called");
siteCode = genericUtility.getColumnValue("site_code",dom);
if(siteCode != null && siteCode.trim().length() > 0)
{
if ("99999".equalsIgnoreCase(siteCode))
{
//fin_entity = genericUtility.getColumnValue("fin_entity",dom);
valueXmlString.append( "<fin_entity protect=\"0\" ><![CDATA[" ).append(finEntity==null?"":finEntity).append( "]]></fin_entity>\r\n" );
}
else
{
sql = " Select fin_entity from site where site_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, siteCode );
rs = pstmt.executeQuery();
if (rs.next())
{
finEntity = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
valueXmlString.append( "<fin_entity protect=\"1\" ><![CDATA[" ).append(finEntity==null?"":finEntity).append( "]]></fin_entity>\r\n" );
if( finEntity != null && finEntity.trim().length() > 0 )
{
sql = " select descr from finent where fin_entity = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, finEntity );
rs = pstmt.executeQuery();
if (rs.next())
{
finEntityDescr = rs.getString(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
System.out.println("@@@@@ finEntityDescr["+finEntityDescr+"]");
valueXmlString.append( "<finent_descr protect=\"1\" ><![CDATA[" ).append(finEntityDescr==null?"":finEntityDescr).append( "]]></finent_descr>\r\n" );
}
}
valueXmlString.append( "<finent_descr protect=\"1\" ><![CDATA[" ).append(finEntityDescr==null?"":finEntityDescr).append( "]]></finent_descr>\r\n" );
}
//Ended itemchange for site_code by Varsha V
if( currentColumn.trim().equalsIgnoreCase( "fin_entity" ) ) if( currentColumn.trim().equalsIgnoreCase( "fin_entity" ) )
{ {
System.out.println("@@@@@ fin_entity item change called"); System.out.println("@@@@@ fin_entity item change called");
......
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