void clicked()
{
Dialog dialog;
DialogField dialogField,dialogField1;
Common common;
SalesLine _contractline,_SalesLine;
str tmp;
;
dialog = new dialog();
dialog.caption("修改生产基地");
dialogField = dialog.addField(typeid(Name) ,"生产基地代号");
_contractline = common;
if(dialog.run()){
try {
if(dialogField.value()){
tmp=dialogField.value();
ttsbegin;
for (_contractline=SalesLine_ds.getFirst(true) ? SalesLine_ds.getFirst(true) : SalesLine_ds.cursor();
_contractline;
_contractline=SalesLine_ds.getNext())
{
select forupdate _SalesLine where _SalesLine.RecId == _contractline.RecId;
_SalesLine.selectForUpdate(true);
_SalesLine.name=tmp;
_SalesLine.update();
}
ttscommit;
SalesLine_ds.executeQuery();
}
}
catch(Exception::Error)
{
ttsAbort;
error("更新过程中发生错误,更新取消!");
}
}
}