bos 中实现页面跳转。子类刷新父类

 

 

   //司机维护功能

    @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);
	}

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值