美文网首页
List界面标准类方法

List界面标准类方法

作者: 唐僧用飘柔 | 来源:发表于2017-04-28 12:43 被阅读35次

1、案例一 对List界面记录字段进行批量修改

  //批量修改
protected void btnBatchUpdate_actionPerformed(ActionEvent e)throws Exception {
    checkSelected();#检查是否有选中的记录
    ArrayList arIds = getSelectedIdValues(); #取到选择的记录ID
    IUIFactory uiFactory = UIFactory.createUIFactory(UIFactoryName.MODEL);
    UIContext uiContext = new UIContext();
    uiContext.put(UIContext.OWNER, this);
    uiContext.put("billType", "付款单");
    uiContext.put("ids", arIds);
    uiContext.put("ar",new ArrayList());
      # 创建新的BatchUpdateRecPayUI窗口
    IUIWindow uiWindow = uiFactory.create(BatchUpdateRecPayUI.class.getName(), uiContext, null);
    uiWindow.show();
    if(uiContext.get("ar")!=null){
        ArrayList ar = (ArrayList) uiContext.get("ar");
        if(ar.size()>0)
            refreshList();
    }
}    
    public void checkSelected()  {
     if ((this.tblMain.getRowCount() != 0) &&(this.tblMain.getSelectManager().size() != 0))
      return;
       MsgBox.showWarning(this, EASResource.getString("com.kingdee.eas.framework.FrameWorkResource.Msg_MustSelected")    );
      SysUtil.abort();
      }     

2、案例二 自定义流水号

    # 获取流水号
   private static String getMark(){
       String mark = null;
       String prifex ="GZG";
       SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String nowTime = sdf.format(new Date());# 取当前时间
        mark = prifex + nowTime;
         return mark;
   }

**3、案例三 检查自定义权限项 **

    public void transCheck_actionPerformed(ActionEvent evt) throws Exception
    {
         # 'transPay_ManCheck' 为开发的权限项
        if(!PermissionUtils.CheckFunctionPermission("transPay_ManCheck",false)){
            MsgBox.showError("你没有付款单与交易明细对账平台权限!");
            return;
        }
        IUIWindow uiWindow = null;
        try
        {
            IUIFactory uiFactory = UIFactory.createUIFactory(UIFactoryName.NEWTAB);
            UIContext ctx = new UIContext();
            ctx.put(UIContext.OWNER, this);
            ctx.put("queryDialog", getQueryDlg());
            uiWindow = uiFactory.create(TransPayBillCheckUI.class.getName(), ctx, null);
            uiWindow.show();
        } 
        catch (UIException e)
        {
            handleException(e);
        }           
    }

4、案例四 判断当前用户是否是职员

    # 当前用户非职员不能做单
    if (SysContext.getSysContext().getCurrentUserInfo().getType().getName() != "PERSON") {
        MsgBox.showInfo(this,"当前用户非职员不能做单");    
        SysUtil.abort();        
    }

未完待续

相关文章

  • List界面标准类方法

    1、案例一 对List界面记录字段进行批量修改 2、案例二 自定义流水号 **3、案例三 检查自定义权限项 *...

  • Collection是类

    都是包含静态方法的工具类 Collections类 排序操作 void reverse(List list):反转...

  • Numpy入门1

    标准安装python里面提供了两种表示数组的方法: list array list的缺点:标准安装的Python中...

  • K线开发之CoreGraphics和CoreAnimation的

    写在前面 关于在IOS端进行原生界面绘制,苹果开发文档里明确提供了几种方法: 使用系统提供的标准视图,例如list...

  • iOS端K线系列之绘制方法比较(CoreGraphics、Cor

    写在前面 关于在IOS端进行原生界面绘制,苹果开发文档里明确提供了几种方法: 使用系统提供的标准视图,例如list...

  • Java容器:List

    集合类的层次关系 List接口简介 List的常用方法 List实例VectorArrayListVector和A...

  • Java集合(3)--Collections工具类

    Collections工具类:用于操作Set、List、Map等集合 1、排序操作 提供了大量类方法用于对List...

  • Java 19-7 集合工具类

    Collections 为工具类 操作Collection的静态方法对list排序 sort(list); 模拟最...

  • Java 常用工具类--集合排序

    集合排序 使用Collections类的sort()方法 sort(List list) 根据元素的自然顺...

  • day22

    eval 模块转换dict, list, tuple json 静态方法 @property @类方法 @clas...

网友评论

      本文标题:List界面标准类方法

      本文链接:https://www.haomeiwen.com/subject/pabozttx.html