批量更新记录
Posted sunny-technology
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了批量更新记录相关的知识,希望对你有一定的参考价值。
界面上通过按钮批量更新数据很常见,列个更新的例子,方便查阅。
销售订单界面,批量更新行地址:
1.定义继承Runbase的类,使用框架更方便
class UpdateSalesLineAddress extends RunBase { DeliveryAddress deliveryAddress; SalesLine salesLine; DialogField d_deliveryAddress; }
2.Dilog界面设计:
public Object dialog() { Dialog dialog = super(); dialog.caption("标题"); d_deliveryAddress = dialog.addField(extendedTypeStr(DeliveryAddress)); //d_deliveryAddress = dialog.addFieldValue(extendedTypeStr(DeliveryAddress),salesLine.DeliveryAddress); return dialog; }
3.获取Dialog界面中需要更新的值:
public boolean getFromDialog() { boolean ret; ret = super(); deliveryAddress = d_deliveryAddress.value(); return ret; }
4.主方法中进行更新
以上是关于批量更新记录的主要内容,如果未能解决你的问题,请参考以下文章