//司机维护功能
@Override
public void actionDriverUpdate_actionPerformed(ActionEvent e)
throws Exception {
ArrayList selectedIdValues = getSelectedIdValues();
UIContext context = new UIContext(this);
context.put("array", selectedIdValues.toString());
IUIWindow window =
UIFactory.createUIFactory(UIFactoryName.MODEL)
.create("com.kingdee.eas.guiliumuye.duckbreeding.client.DrvierUpdateEditUI",
context, null, com.kingdee.eas.common.client.OprtState.ADDNEW);
window.show();
// ArrayList selectedIdValues = getSelectedIdValues();
// UIContext context = new com.kingdee.eas.common.client.UIContext();
// context.put("array", selectedIdValues.toString());
// String uiName = "com.kingdee.eas.guiliumuye.duckbreeding.client.DrvierUpdateEditUI";
// uiWindow = com.kingdee.bos.ui.face.UIFactory.createUIFactory(com.kingdee.eas.common.client.UIFactoryName.MODEL).create(uiName, context,null,com.kingdee.eas.common.client.OprtState.ADDNEW);
// uiWindow.show();
super.actionDriverUpdate_actionPerformed(e);
}
@Override
public void onLoad() throws Exception {
// TODO Auto-generated method stub
//得到的序时簿的ids
String ids = this.getUIContext().get("array").toString();
super.onLoad();
}
@Override
public void actionUpdateDriver_actionPerformed(ActionEvent e)
throws Exception {
// TODO Auto-generated method stub
//得到选中的司机
CarInfomationInfo carInfomationInfo=(CarInfomationInfo) this.prmtdriver.getValue();
BOSUuid id = carInfomationInfo.getId();
//得到的序时簿的ids
String ids = this.getUIContext().get("array").toString();
ids = ids.substring(1, ids.length()-1);
//去掉空格
ids=ids.replace(" ","");
String[] split = ids.split(",");
StringBuffer ids2=new StringBuffer();
for (int i = 0; i < split.length; i++) {
if (!"".equals(split[i]) && split[i] != null)
ids2.append("'" + split[i] + "',");
}
String result = ids2.toString();
String tp = result.substring(result.length() - 1, result.length());
if (",".equals(tp))
result=result.substring(0, result.length() - 1);
String sql=" update CT_DUC_SaleOrdertz set CFDRIVERID='"+id+"' where fid in ("+ result +") ";
boolean exeSQL = SQLFacadeFactory.getRemoteInstance().exeSQL(sql);
//关闭子页面(当前)
this.disposeUIWindow();
//得到父页面(销售订单)
SaleOrdertzListUI fatherUI = (SaleOrdertzListUI) this.getUIContext().get("Owner") ;
//刷新父页面
fatherUI.refreshList();
super.actionUpdateDriver_actionPerformed(e);
}
//司机维护功能
@Override
public void actionDriverUpdate_actionPerformed(ActionEvent e)
throws Exception {
ArrayList selectedIdValues = getSelectedIdValues();
UIContext context = new UIContext(this);
context.put("array", selectedIdValues.toString());
IUIWindow window =
UIFactory.createUIFactory(UIFactoryName.MODEL)
.create("com.kingdee.eas.guiliumuye.duckbreeding.client.DrvierUpdateEditUI",
context, null, com.kingdee.eas.common.client.OprtState.ADDNEW);
window.show();
// ArrayList selectedIdValues = getSelectedIdValues();
// UIContext context = new com.kingdee.eas.common.client.UIContext();
// context.put("array", selectedIdValues.toString());
// String uiName = "com.kingdee.eas.guiliumuye.duckbreeding.client.DrvierUpdateEditUI";
// uiWindow = com.kingdee.bos.ui.face.UIFactory.createUIFactory(com.kingdee.eas.common.client.UIFactoryName.MODEL).create(uiName, context,null,com.kingdee.eas.common.client.OprtState.ADDNEW);
// uiWindow.show();
super.actionDriverUpdate_actionPerformed(e);
}