public String projectIndex() throws Exception { String id = (String) session.get(BaseAction.BASEIDINSESSION); int startIndex = (page - 1) * Constants.DefaultPageSize; if (startIndex < 0) startIndex = 0; projectPage = projectService.getPage(id, year, Constants.DefaultPageSize, startIndex, null, true); return SUCCESS; }
public String projectRemove() throws Exception { String id = servletRequest.getParameter("id"); try { projectService.remove(id); } catch (ServiceException e) { LOGGER.error(e.getMessage()); } return SUCCESS; }
public String projectSave() throws Exception { String id = (String) session.get(BaseAction.BASEIDINSESSION); EnterpriseBaseModel baseModel = eBaseService.get(id); String year; if (baseModel.getEnterpriseStyle() == EnterpriseBaseModel.EStyle.NONE.getValue()) { year = (String) application.get(Constants.OPTION_SDDECLARE_YEAR); year = Integer.parseInt(year) - 1 + ""; } else year = (String) application.get(Constants.OPTION_NDDECLARE_YEAR); project.setDeclareYear(year); project.setBaseModel(baseModel); try { projectService.saveOrUpdate(project); } catch (ServiceException e) { LOGGER.error(e.getMessage()); } return SUCCESS; }