Commit 652bb8e4 authored by vvengurlekar's avatar vvengurlekar

WeekOffCreation.java - all weeks is set by default or if rotate is no


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199633 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 765345bc
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import java.util.*;
import java.text.*;
import java.sql.*;
import javax.ejb.*;
import org.w3c.dom.*;
import java.sql.Connection;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility;
import javax.ejb.Stateless; // added for ejb3
import org.w3c.dom.Document;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
@Stateless // added for ejb3
public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLocal,WeekOffCreationRemote //SessionBean
......@@ -67,7 +68,9 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca
int currentYear = 0, currentFormNo = 0;
java.util.Date currentDate = null, date1 = null, date2 = null;
String offFor , offDay = "";//Added by sarita on 28 JANUARY 2019
GenericUtility genericUtility = GenericUtility.getInstance();
//Changed by Varsha V on 15-04-19 to use E12GenericUtility
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>");
try
......@@ -103,7 +106,9 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca
offDay = genericUtility.getColumnValue("off_day",currentDom);
System.out.println("Values in CurrentDom are :: rotate["+rotate+"]\t offFor["+offFor+"]\t offDay["+offDay+"]");
valueXmlString.append("<rotate>").append(rotate).append("</rotate>");
valueXmlString.append("<off_for>").append(offFor).append("</off_for>");
//Changes done by Varsha V on 15-04-19 to set all weeks by default
//valueXmlString.append("<off_for>").append(offFor).append("</off_for>");
valueXmlString.append("<off_for protect = '0'>").append("A").append("</off_for>");
valueXmlString.append("<off_day>").append(offDay).append("</off_day>");
//Added and Commented by sarita on 28 JANUARY 2019 [END]
}
......@@ -116,7 +121,8 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca
}
else
{
valueXmlString.append("<off_for protect = '0'>").append("</off_for>");
//valueXmlString.append("<off_for protect = '0'>").append("</off_for>");
valueXmlString.append("<off_for protect = '0'>").append("A").append("</off_for>");
}
}
valueXmlString.append("</Detail>");
......
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