Example #1
0
 @Override
 protected void confirm() throws RemoteException {
   super.confirm();
   if (isAllLegal()) {
     double basic = Double.valueOf(findItem("basic").toString());
     vo.salary.setSalaryByMonth(basic);
     switch (type) {
       case ADDNUM:
         double addnum = Double.valueOf(findItem("num").toString());
         vo.salary.setAddNum(addnum);
         break;
       case ADDONCE:
         double addonce = Double.valueOf(findItem("once").toString());
         vo.salary.setAddOnce(addonce);
         break;
       default:
         break;
     }
     if (personelbl.update(vo) == ResultMessage.SUCCESS) {
       LogUtil.addLog("制定薪资策略");
       ELSStateBar.showStateBar(GetPanelUtil.getFunctionPanel(this), "修改成功");
       back();
     } else {
       ELSStateBar.showStateBar(GetPanelUtil.getFunctionPanel(this), "修改失败");
     }
   }
 }
Example #2
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), "添加失败");
     }
   }
 }