コード例 #1
0
 public void materialGroupComboBoxSelected() {
   try {
     selectedMaterialGroup = matController.getMaterialGroup(selectedMaterialGroupID);
     // editGRItem.setOtherMaterial("");
     createMaterialSelectItem();
   } catch (ControllerException e) {
     FacesUtils.reportError(FacesContext.getCurrentInstance(), e.getMessage(), e.getMessage(), e);
     e.printStackTrace();
   }
 }
コード例 #2
0
 public void materialComboBoxSelected() {
   try {
     selectedMaterial = matController.getMaterial(selectedMaterialID);
     editGRItem.setMaterial(selectedMaterial);
     if (selectedMaterial != null) {
       editGRItem.setReceiveUnit(selectedMaterial.getOrderUnit());
       editGRItem.setUnitPrice(selectedMaterial.getOrderUnitPrice());
     }
   } catch (ControllerException e) {
     FacesUtils.reportError(FacesContext.getCurrentInstance(), e.getMessage(), e.getMessage(), e);
     e.printStackTrace();
   }
 }
コード例 #3
0
 private void createMaterialSelectItem() {
   try {
     ArrayList<Material> matList = matController.getMaterials(selectedMaterialGroup);
     materialSelectItemList.clear();
     materialSelectItemList.add(new SelectItem(Long.valueOf(-1), "àÅ×Í¡ÇÑÊ´Ø"));
     SelectItem selectItem;
     for (Material material : matList) {
       selectItem = new SelectItem(material.getId(), material.toString());
       materialSelectItemList.add(selectItem);
     }
   } catch (ControllerException e) {
     e.printStackTrace();
     FacesUtils.reportError(FacesContext.getCurrentInstance(), e.getMessage(), e.getMessage(), e);
   }
 }
コード例 #4
0
 private void createMaterialGroupSelectItemList() {
   try {
     ArrayList<MaterialGroup> materialGroupList = matController.getMaterialGroups(warehouseCode);
     SelectItem selectItem;
     materialGroupSelectItemList.clear();
     materialGroupSelectItemList.add(new SelectItem(Long.valueOf(-1), "àÅ×Í¡¡ÅØèÁÇÑÊ´Ø"));
     for (MaterialGroup materialGroup : materialGroupList) {
       selectItem = new SelectItem(materialGroup.getId(), materialGroup.toString());
       materialGroupSelectItemList.add(selectItem);
     }
   } catch (ControllerException e) {
     FacesUtils.reportError(FacesContext.getCurrentInstance(), e.getMessage(), e.getMessage(), e);
     e.printStackTrace();
   }
 }
コード例 #5
0
 private void getSuggestionList() {
   try {
     // ª×èͼÙéŧ¹ÒÁã¹ãº¨Ñ´«×éÍ
     recipientNameList.clear();
     recipientNameList = grController.getRecipientNames(warehouseCode);
     recipientPosList.clear();
     recipientPosList = grController.getRecipientPOs(warehouseCode);
     entryNameList.clear();
     entryNameList = grController.getEntryNames(warehouseCode);
     entryPosList.clear();
     entryPosList = grController.getEntryPos(warehouseCode);
     // ˹èÇ«×éÍ
     orderUnitList = matController.getOrderUnits(warehouseCode);
   } catch (ControllerException e) {
     FacesUtils.reportError(FacesContext.getCurrentInstance(), e.getMessage(), e.getMessage(), e);
     e.printStackTrace();
   }
 }