use of com.netsteadfast.greenstep.vo.SysProgVO in project bamboobsc by billchen198318.
the class SystemProgramManagementAction method loadSysProgData.
/**
* 修改模式載入 TB_SYS_PROG 資料
*
* @throws ServiceException
* @throws Exception
*/
private void loadSysProgData() throws ServiceException, Exception {
this.transformFields2ValueObject(this.sysProg, new String[] { "oid" });
DefaultResult<SysProgVO> result = this.sysProgService.findObjectByOid(this.sysProg);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
this.sysProg = result.getValue();
TbSysIcon sysIcon = new TbSysIcon();
sysIcon.setIconId(sysProg.getIcon());
sysIcon = this.sysIconService.findByEntityUK(sysIcon);
if (sysIcon != null) {
this.editIconValue = sysIcon.getOid();
}
TbSys sys = new TbSys();
sys.setSysId(this.sysProg.getProgSystem());
sys = this.sysService.findByEntityUK(sys);
if (sys != null) {
this.editProgSystemValue = sys.getOid();
}
}
use of com.netsteadfast.greenstep.vo.SysProgVO in project bamboobsc by billchen198318.
the class SystemProgramManagementSaveOrUpdateAction method update.
/**
* 更新 TB_SYS_PROG 資料
*
* @throws ControllerException
* @throws AuthorityException
* @throws ServiceException
* @throws Exception
*/
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
this.checkFields("E");
SysProgVO sysProg = new SysProgVO();
this.transformFields2ValueObject(sysProg, new String[] { "oid", "progId", "name", "url", "itemType", "isWindow" }, new String[] { "oid", "CORE_PROG001D0002E_progId", "CORE_PROG001D0002E_name", "CORE_PROG001D0002E_url", "CORE_PROG001D0002E_itemType", "CORE_PROG001D0002E_isWindow" });
sysProg.setEditMode(YesNo.NO);
sysProg.setIsDialog(YesNo.NO);
if ("true".equals(this.getFields().get("CORE_PROG001D0002E_editMode"))) {
sysProg.setEditMode(YesNo.YES);
}
if ("true".equals(this.getFields().get("CORE_PROG001D0002E_isDialog"))) {
sysProg.setIsDialog(YesNo.YES);
sysProg.setDialogW(SimpleUtils.getInt(this.getFields().get("CORE_PROG001D0002E_dialogW"), 50));
sysProg.setDialogH(SimpleUtils.getInt(this.getFields().get("CORE_PROG001D0002E_dialogH"), 25));
}
DefaultResult<SysProgVO> result = this.systemProgramLogicService.update(sysProg, this.getFields().get("CORE_PROG001D0002E_progSystem"), this.getFields().get("CORE_PROG001D0002E_icon"));
this.message = result.getSystemMessage().getValue();
if (result.getValue() == null) {
return;
}
this.success = IS_YES;
}
Aggregations