|
楼主 |
发表于 2019-8-27 09:57:16
|
显示全部楼层
public static void mainDataAfterDelete(){
Table table = (Table) ContextHelper.getActionContext().getParameter("table");
Iterator<Row> rows = table.iterator(com.justep.system.data.ModifyState.DELETE);
Row row;
HashMap<String, String> deleteMap = new HashMap<String, String>();
while(rows.hasNext()){
row = rows.next();
String id = row.getString("ID");
String deleteSQL = "delete MM_E3_stock_I where [PID]='"+id+"'";
deleteMap.clear();
deleteMap.put(DatabaseProduct.MSSQL.name(), deleteSQL);
int count = SQL.executeUpdate(deleteMap, null, "/MM/MM019/data");
System.out.println("delete complete "+count+" rows effect");
}
}
这样写应该没问题吧?可是我删除以后没有进到这个方法里面去,请问前端怎么跟自己写的action关联起来? |
|