@Inject public CompStakeholderBean( final CompanyService service, CompanyBean company, PreferencesBean prefBean) { this.companyService = service; this.stakeHolder = companyService.getStakeHolders(company.getCompany()); this.lazyModel = new LazyCarDataModel(stakeHolder); this.setCompany(company.getCompany()); this.setCompBean(company); this.setPrefBean(prefBean); }
public void update() { selectedStakeHolder.setAddress(getSelstakeHoldAddr()); selectedStakeHolder.setDob(new java.sql.Date(getSelstakeHoldDob().getTime())); selectedStakeHolder.setEmail(getSelstakeHoldEmail()); selectedStakeHolder.setPanNo(getSelstakeHoldPan()); selectedStakeHolder.setStakeHolderName(getSelstakeHoldName()); selectedStakeHolder.setCompany(getCompany()); companyService.update(selectedStakeHolder); setGrowlMessage("Update", "Update Successfull"); }
public void save() { StakeHolder stkholder = new StakeHolder(); stkholder.setAddress(getStakeHoldAddr()); stkholder.setDob(new java.sql.Date(getStakeHoldDob().getTime())); stkholder.setEmail(getStakeHoldEmail()); stkholder.setPanNo(getStakeHoldPan()); stkholder.setStakeHolderName(getStakeHoldName()); stkholder.setCompany(getCompany()); stkholder.setUser(getPrefBean().getUser()); companyService.create(stkholder); stakeHolder.add(stkholder); clearValues(); setGrowlMessage("Save", "Insert Successfull"); setEditing(false); }
public void delete() { companyService.delete(selectedStakeHolder); stakeHolder.remove(selectedStakeHolder); setGrowlMessage("Delete", "Delete Successfull"); }