CO代碼:
成都創(chuàng)新互聯(lián)秉承實現(xiàn)全網(wǎng)價值營銷的理念,以專業(yè)定制企業(yè)官網(wǎng),成都做網(wǎng)站、網(wǎng)站設(shè)計、外貿(mào)營銷網(wǎng)站建設(shè),成都微信小程序,網(wǎng)頁設(shè)計制作,移動網(wǎng)站建設(shè),營銷型網(wǎng)站建設(shè)幫助傳統(tǒng)企業(yè)實現(xiàn)“互聯(lián)網(wǎng)+”轉(zhuǎn)型升級專業(yè)定制企業(yè)官網(wǎng),公司注重人才、技術(shù)和管理,匯聚了一批優(yōu)秀的互聯(lián)網(wǎng)技術(shù)人才,對客戶都以感恩的心態(tài)奉獻自己的專業(yè)和所長。//獲取當(dāng)前修改的行
String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Serializable[] param ={ rowReference};
am.invokeMethod("checkItemCategoryExists",param);
AM代碼:
public void checkItemCategoryExists(String rowReference) {
OARow row = (OARow)findRowByRef(rowReference);
if (row != null) {
OADBTransaction txn = getOADBTransaction();
CallableStatement cstmt = null;
String result;
String sq1 =
"BEGIN ?:=cux_srm_category_pkg.check_item_cat_exists(?,?,?,?); END;";
try {
cstmt = txn.createCallableStatement(sq1, 1);
cstmt.registerOutParameter(1, OracleTypes.VARCHAR);
cstmt.setString(2,
row.getAttribute("CategorySetId").toString());
cstmt.setString(3,
row.getAttribute("OrganizationId").toString());
cstmt.setString(4,
row.getAttribute("InventoryItemId").toString());
cstmt.setString(5,
row.getAttribute("ItemCategoryId").toString());
cstmt.execute();
result = cstmt.getString(1);
if (result.equals("Y"))
throw new OAException("該物料已存在,請重新輸入", OAException.ERROR);
} catch (Exception e) {
throw OAException.wrapperException(e);
} finally {
if (cstmt != null) {
try {
cstmt.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
} //end checkItemCategoryExists()