3132333435363738
public void update(Module module) { entityManager.persist(module); } public void del(Long moduleid) { Module module = entityManager.find(Module.class, moduleid); entityManager.remove(module); }
4445464748495051
private ModuleMaintService moduleMaintService; @Begin(nested=true) public void add() { moduleList= moduleMaintService.getModuleByProjectid(project.getProjectid()); module = new Module(); myAct="add"; }
585960616263646566
if (myAct.equals("add")){ module.setProject(project); moduleMaintService.save(module); moduleList= moduleMaintService.getModuleByProjectid(project.getProjectid()); module = new Module(); myAct="add"; } }
686970717273747576
if (myAct.equals("edit")){ module.setProject(project); moduleMaintService.update(module); moduleList= moduleMaintService.getModuleByProjectid(project.getProjectid()); module = new Module(); myAct="add"; } }
7677787980818283
} public void del() { moduleMaintService.del(moduleid); moduleList= moduleMaintService.getModuleByProjectid(project.getProjectid()); module = new Module(); myAct="add"; }