From 710bd3eb0778a928d02a7a70619056ac02b56046 Mon Sep 17 00:00:00 2001 From: amarsoft Date: Sat, 21 Jul 2018 14:15:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=AD=E8=AF=81=E8=AF=A6=E6=83=85=E6=A8=A1?= =?UTF-8?q?=E6=9D=BFhangler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../handler/voucher/VoucherConfigHandler.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src_tenwa/com/tenwa/customer/handler/voucher/VoucherConfigHandler.java diff --git a/src_tenwa/com/tenwa/customer/handler/voucher/VoucherConfigHandler.java b/src_tenwa/com/tenwa/customer/handler/voucher/VoucherConfigHandler.java new file mode 100644 index 000000000..9c7469000 --- /dev/null +++ b/src_tenwa/com/tenwa/customer/handler/voucher/VoucherConfigHandler.java @@ -0,0 +1,18 @@ +package com.tenwa.customer.handler.voucher; + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.dw.handler.impl.CommonHandler; +import com.tenwa.util.SerialNumberUtil; + +public class VoucherConfigHandler extends CommonHandler{ + @Override + protected void initDisplayForAdd(BizObject bo) throws Exception { + JBOTransaction tx = JBOFactory.createJBOTransaction(); + String VoucherNumber = SerialNumberUtil.getVoucherNumber(tx); + tx.commit(); + bo.setAttributeValue("VOUCHER_NO", VoucherNumber); + super.initDisplayForAdd(bo); + } +}