XiaoShouTuiHuo.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:SuperMarketManageSystem 作者:
public void componentRemoved(ContainerEvent e) {
    // �������
    clearEmptyRow();
    // �������
    int rows = table.getRowCount();
    int count = 0;
    double money = 0.0;
    // ����Ʒ������
    TbSpinfo column = null;
    if (rows > 0)
        column = (TbSpinfo) table.getValueAt(rows - 1, 0);
    if (rows > 0 && (column == null || column.getId().isEmpty()))
        rows--;
    // �����Ʒ�����ͽ��
    for (int i = 0; i < rows; i++) {
        String column7 = (String) table.getValueAt(i, 7);
        String column6 = (String) table.getValueAt(i, 6);
        int c7 = (column7 == null || column7.isEmpty()) ? 0 : Integer
                .parseInt(column7);
        Double c6 = (column6 == null || column6.isEmpty()) ? 0 : Double
                .valueOf(column6);
        count += c7;
        money += c6 * c7;
    }
    pzs.setText(rows + "");
    hpzs.setText(count + "");
    hjje.setText(money + "");
    // /////////////////////////////////////////////////////////////////
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号