Beispiel #1
0
 @Override
 protected void confirm() throws RemoteException {
   if (isAllLegal()) {
     String cnumber = findItem("number").toString();
     String ctime = TimeUtil.getCurrentTime();
     ;
     String goodsnum = findItem("goodsnum").toString();
     String pernum = findItem("pernum").toString();
     String name = findItem("name").toString();
     delvo =
         new Receipt_DeliverVO(
             cnumber, ctime, goodsnum, name, pernum, user.number, user.orgNameID);
     GoodsVO goods = goodsbl.searchGoods(goodsnum);
     // 要获得当前用户的信息
     HistoryVO historyVO =
         new HistoryVO(ctime, UIConstant.CURRENT_ORG.city, UIConstant.CURRENT_ORG.type, false);
     goods.history.add(historyVO);
     goods.placeCity = UIConstant.CURRENT_ORG.city;
     goods.placeOrg = UIConstant.CURRENT_ORG.type;
     goods.delNum = cnumber;
     goodsbl.updateGoods(goods);
     if (receiptbl.add(delvo) == ResultMessage.SUCCESS) {
       ELSStateBar.showStateBar(GetPanelUtil.getFunctionPanel(this), "添加成功");
       ConstantVal.numberbl.addone(NumberType.RECEIPT, number);
       LogUtil.addLog("新增派件单");
       ELSFunctionPanel parent = GetPanelUtil.getFunctionPanel(this);
       // parent.contentPanel.cl.show(parent.contentPanel, "receipts");
       parent.setChosenFunction("receipts");
     } else {
       ELSStateBar.showStateBar(GetPanelUtil.getFunctionPanel(this), "添加失败");
     }
   }
 }
Beispiel #2
0
 @Override
 protected void cancel() {
   if (ELSComfirmDialog.showConfirmDlg(GetPanelUtil.getFunctionPanel(this), "取消新增", "确认放弃新增单据?")) {
     ELSFunctionPanel parent = GetPanelUtil.getFunctionPanel(this);
     // parent.contentPanel.cl.show(parent.contentPanel, "receipts");
     parent.setChosenFunction("receipts");
   }
 }