zoukankan      html  css  js  c++  java
  • eas之关于数字精度的设置


    private void changeshowData(int firstRow,int lastRow)throws EASBizException,BOSException{
    for(int i=firstRow;i<=lastRow;i++){
    IRow row=tblMain.getRow(i);
    //根据币别设置精度
    ICell cell=row.getCell("columnName");//获取到指定单元格对象
    //假定精度为2
    int percision=2;
    try{
    if(cell!=null && cell.getValue()!=null){
    percision=Integer.parseInt(cell.getValue().toString());
    }
    }catch(Exception e){
    percision=2;
    }
    //当该行的币别精度不等于原币精度时才更改精度
    if(percision!=basePercision){
    for(int j=0;j<rowcount;j++){
    tblMain.getColum("billDate").getStyleAttributes().setNumberFormat("%{yyyy-MM-dd}t");
    tblMain.getColum("debitFor").getStyleAttributes().setNumberFormat("%r{#,##0.00}f"");
    tblMain.getColumn("debitFor").getStyleAttributes().setHorizontalAlign(HorizontalAlignment.RIGHT);
    tblMain.getColumn("endBalanceFor").getStyleAttributes().setNumberFormat("%r{#,##0.00}f");
    tblMain.getColumn("endBalanceFor").getStyleAttributes().setHorizontalAlign(HorizontalAlignment.RIGHT);
    }
    }
    }
    }

  • 相关阅读:
    关于float与double
    【编程实践】母牛生小牛
    wlan的QOS配置
    C语言itoa函数和atoi 函数
    类似于QQ的简单的聊天代码
    多线程吃饺子练习
    线程练习
    接口练习
    电视练习
    5.22
  • 原文地址:https://www.cnblogs.com/luojiabao/p/11087770.html
Copyright © 2011-2022 走看看