timesheetwebimpl.java.svn-base
来自「一个timesheet程序,用来统计开发人员的度量衡web在线程序.用于软件行业」· SVN-BASE 代码 · 共 66 行
SVN-BASE
66 行
package com.nsi.components.timesheet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.nsi.control.exceptions.GeneralFailureException;
import com.nsi.control.exceptions.NsiEventException;
import com.nsi.control.web.ModelManager;
import com.nsi.control.web.ModelUpdateListener;
import com.nsi.util.ValHelper;
/**
* @author Chris Ye, created on Oct 6, 2008
*
* TimeSheetWebImpl
*/
public class TimeSheetWebImpl extends TimeSheetModel implements ModelUpdateListener
{
private static Log log = LogFactory.getLog(TimeSheetWebImpl.class);
/**
* constructor of TimeSheetWebImpl
* @param mm
*/
public TimeSheetWebImpl(ModelManager mm)
{
mm.addListener("com.nsi.components.timesheet.TsBackHandler", this);
}
public void performUpdate() throws GeneralFailureException
{
log.debug("performUpdate() -- invoked");
String resourceid = getResourceid();
String startweek = getStartweek();
String timesheetid = getTimesheetid();
try
{
TimeSheetSrc src = new TimeSheetSrc();
if( ValHelper.getInstance().isNotNullAndEmpty(timesheetid))
{
if( src.isExistTimeSheetbyTSID(timesheetid))
{
src.load();
copy( src.getInfo());
}
}
else
{
if( src.isExistTimeSheetbyRSIDandWKBGN(resourceid, startweek) )
{
src.load();
copy( src.getInfo());
}
}
}
catch(NsiEventException nsievex)
{
log.error("performUpdate() -- caught NsiEventException : ", nsievex );
throw new GeneralFailureException( "performUpdate() -- caught NsiEventException : ", nsievex) ;
}
catch(GeneralFailureException gex)
{
log.error("performUpdate() -- caught GeneralFailureException : ", gex );
throw gex;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?