/**
 * 
 */
package ibase.dashboard.mfg.bean;

import java.rmi.RemoteException;
import ibase.dashboard.mfg.ejb.ProductionVsBudgetReportRemote;
import ibase.system.config.AppConnectParm;
import ibase.webitm.utility.ITMException;

import javax.naming.InitialContext;

/**
 * @author base
 *
 */
public class ProductionVsBudgetReportBean

{
	ProductionVsBudgetReportRemote  budgetReportRemote=null;

	/**
	 * 
	 */
	public ProductionVsBudgetReportBean()
	{
		AppConnectParm appConnectParm=new AppConnectParm();
		try
        {
	        InitialContext context=new InitialContext(appConnectParm.getProperty());
	        budgetReportRemote=(ProductionVsBudgetReportRemote)context.lookup("ibase/ProductionVsBudgetReport/remote");
        }
		catch (Exception e)
        {
			System.out.println(" ibase.dashboard.mfg.bean :ProductionVsBudgetReportBean "+e);
	        e.printStackTrace();
        }
	}
	
	
	public String getProductionBudget(String frmDate,String toDate) throws RemoteException, ITMException
    {
		String xmlString="";
		try
		{
		xmlString= budgetReportRemote.getProductionBudget(frmDate, toDate);
		}
		catch (Exception e)
		{
			System.out.println("ibase.dashboard.mfg.bean :ProductionVsBudgetReportBean "+e);
	        e.printStackTrace();
		}
		
		return xmlString;
    }
}
