List界面標(biāo)準(zhǔn)類方法

1、案例一 對List界面記錄字段進(jìn)行批量修改

  //批量修改
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());
      # 創(chuàng)建新的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、案例二 自定義流水號(hào)

    # 獲取流水號(hào)
   private static String getMark(){
       String mark = null;
       String prifex ="GZG";
       SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String nowTime = sdf.format(new Date());# 取當(dāng)前時(shí)間
        mark = prifex + nowTime;
         return mark;
   }

**3、案例三 檢查自定義權(quán)限項(xiàng) **

    public void transCheck_actionPerformed(ActionEvent evt) throws Exception
    {
         # 'transPay_ManCheck' 為開發(fā)的權(quán)限項(xiàng)
        if(!PermissionUtils.CheckFunctionPermission("transPay_ManCheck",false)){
            MsgBox.showError("你沒有付款單與交易明細(xì)對賬平臺(tái)權(quán)限!");
            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、案例四 判斷當(dāng)前用戶是否是職員

    # 當(dāng)前用戶非職員不能做單
    if (SysContext.getSysContext().getCurrentUserInfo().getType().getName() != "PERSON") {
        MsgBox.showInfo(this,"當(dāng)前用戶非職員不能做單");    
        SysUtil.abort();        
    }

未完待續(xù)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 178,724評(píng)論 25 709
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,502評(píng)論 19 139
  • 點(diǎn)擊查看原文 Web SDK 開發(fā)手冊 SDK 概述 網(wǎng)易云信 SDK 為 Web 應(yīng)用提供一個(gè)完善的 IM 系統(tǒng)...
    layjoy閱讀 14,278評(píng)論 0 15
  • 自認(rèn)為很牛逼的是,小時(shí)候就有自己的一套理論。 印象最深刻的一句話,“如果現(xiàn)在不做,明天也不會(huì)做,要干什么,現(xiàn)在就去...
    古金三葉閱讀 552評(píng)論 0 1
  • 意志力是成功的必要條件。我現(xiàn)在提高意志力的手段有:堅(jiān)持洗冷水澡,堅(jiān)持長跑,堅(jiān)持練習(xí)英語,堅(jiān)持早睡早起,堅(jiān)持學(xué)習(xí)??。...
    啊蕃俠閱讀 262評(píng)論 0 1

友情鏈接更多精彩內(nèi)容