int estimatedclosemonth1 = Integer.parseInt(estimatedclosemonth);
int estimatedcloseday1 = Integer.parseInt(estimatedcloseday);
int estimatedcloseyear1 = Integer.parseInt(estimatedcloseyear);
Calendar estimatedClose = new GregorianCalendar();
estimatedClose.set(estimatedcloseyear1, estimatedclosemonth1 - 1, estimatedcloseday1);
opportunityVO.setEstimatedClose(new Timestamp(estimatedClose.getTimeInMillis()));
} catch (NumberFormatException nfe) {
logger.info("[execute]: blank date fields");
} catch (Exception e) {
logger.error("[execute]: Exception");
}
}
if (typeofoperation.equals(SaleConstantKeys.ADD)) {
remote.addOpportunity(ownerId, opportunityVO);
} else if (typeofoperation.equals(SaleConstantKeys.EDIT)) {
String opportunityid = request.getParameter("opportunityid");
if ((opportunityForm.getActualclosemonth() != null) && (opportunityForm.getActualcloseday() != null)
&& (opportunityForm.getActualcloseyear() != null)) {
String actualclosemonth = opportunityForm.getActualclosemonth();
String actualcloseday = opportunityForm.getActualcloseday();
String actualcloseyear = opportunityForm.getActualcloseyear();
try {
int actualclosemonth1 = Integer.parseInt(actualclosemonth);
int actualcloseday1 = Integer.parseInt(actualcloseday);
int actualcloseyear1 = Integer.parseInt(actualcloseyear);
Calendar actualClose = new GregorianCalendar(actualcloseyear1, actualclosemonth1 - 1, actualcloseday1);
opportunityVO.setActualclose(new Timestamp(actualClose.getTimeInMillis()));
} catch (NumberFormatException nfe) {
logger.info("[execute]: blank date fields");
} catch (Exception e) {
logger.error("[execute]: Exception", e);
}