Package com.moneychanger.core.dataobjects

Examples of com.moneychanger.core.dataobjects.CashPurseDetails


            CashPurseAccount cashPurseAccount = new CashPurseAccount();
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            boolean isSuccess = cashPurseAccount.depositCashPurse(details.getServerID(), details.getAssetID(), details.getNymID(), details.getPurse(), selectedIndices, jTextField1.getText());
            if (isSuccess) {
                JOptionPane.showMessageDialog(this, "Cash Purse deposited successfully", "Cash Purse Deposit Success", JOptionPane.INFORMATION_MESSAGE);
                CashPurseDetails cashDetails = new CashPurseAccount().getCashPurseDetails(details.getServerID()+":"+details.getAssetID()+":"+details.getNymID());
                CashPurseAccountBottomPanel.populateCashPurseDetails(cashDetails);
                CashPurseAccountTopPanel.populateCashPurseDetails(cashDetails, cashDetails.getBalance());
                MainPage.reLoadAccount();
                //CashPurseAccountBottomPanel.refreshGrid(cashPurseAccount.refreshGridData(details.getServerID(), details.getAssetID(), details.getNymID()));
            } else {
                if(Helpers.getObj()!=null){
                  new CashPurseExportDetails(null, true,(String)Helpers.getObj(),false).setVisible(true);
View Full Code Here


            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            boolean isSuccess = cashPurseAccount.exchangeCashPurse(details.getServerID(), details.getAssetID(), details.getNymID(), details.getPurse(), selectedIndices);
            if (isSuccess) {
                JOptionPane.showMessageDialog(this, "Cash exchanged successfully", "Exchange Success", JOptionPane.INFORMATION_MESSAGE);
                CashPurseDetails cashDetails = new CashPurseAccount().getCashPurseDetails(details.getServerID()+":"+details.getAssetID()+":"+details.getNymID());
                CashPurseAccountBottomPanel.populateCashPurseDetails(cashDetails);
                CashPurseAccountTopPanel.populateCashPurseDetails(cashDetails, cashDetails.getBalance());
                MainPage.reLoadAccount();
                //((CashPurseTableModel) jTable5.getModel()).setValue(cashPurseAccount.refreshGridData(details.getServerID(), details.getAssetID(), details.getNymID()), jTable5);
            } else {
                if(Helpers.getObj()!=null){
                  new CashPurseExportDetails(null, true,(String)Helpers.getObj(),false).setVisible(true);
View Full Code Here

        if (!Utility.VerifyStringVal(cashPurse)) {
            System.out.println("Purse is null");
            return null;
        }
        gridData = getGridData(serverID, assetID, nymID, cashPurse);
        CashPurseDetails cashDetails = new CashPurseDetails();
        cashDetails.setPurseGrid(gridData);
        cashDetails.setBalance(otapiJNI.OTAPI_Basic_Purse_GetTotalValue(serverID, assetID, cashPurse));
        cashDetails.setServerID(serverID);
        cashDetails.setAssetID(assetID);
        cashDetails.setNymID(nymID);
        cashDetails.setPurse(cashPurse);
        cashDetails.setServeName(otapiJNI.OTAPI_Basic_GetServer_Name(serverID));
        cashDetails.setAssetType(otapiJNI.OTAPI_Basic_GetAssetType_Name(assetID));

        if (!Utility.VerifyStringVal(nymID)) {
            cashDetails.setNymName("");
        } else {
            cashDetails.setNymName(otapiJNI.OTAPI_Basic_GetNym_Name(nymID));
        }

        return cashDetails;
    }
View Full Code Here

            isPasted = false;
        try{
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            String purse = cashPurseAccount.exportCashPurse(details.getServerID(), details.getAssetID(), details.getNymID(), details.getPurse(), selectedIndices,jTextField1.getText(),isPasted);
            if(purse!=null){
                CashPurseDetails cashDetails = new CashPurseAccount().getCashPurseDetails(details.getServerID()+":"+details.getAssetID()+":"+details.getNymID());
                CashPurseAccountBottomPanel.populateCashPurseDetails(cashDetails);
                CashPurseAccountTopPanel.populateCashPurseDetails(cashDetails, cashDetails.getBalance());
                MainPage.reLoadAccount();
               
                //((CashPurseTableModel) jTable5.getModel()).setValue(cashPurseAccount.refreshGridData(details.getServerID(), details.getAssetID(), details.getNymID()), jTable5);
            }
            if(Helpers.getObj()!=null){
View Full Code Here

                                    if ("OpenTransactionAccount".equalsIgnoreCase(type)) {
                                        OTDetails otDetails = (OTDetails) details;
                                        Helpers.populateOTDetails(otDetails);
                                        ((AccountTableModel) jTable_AccountTable.getModel()).setValueAt(otDetails.getBalance(), jTable_AccountTable.getSelectedRow(), 1);
                                    } else if ("CashPurseAccount".equalsIgnoreCase(type)) {
                                        CashPurseDetails cashDetails = (CashPurseDetails) details;
                                        populateCashPurseDetails(cashDetails, cashDetails.getBalance());
                                    }

                                    break;
                                } catch (InstantiationException ex) {
                                    Logger.getLogger(MainPage.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

            }
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            boolean success = new CashPurseAccount().importCashPurse(serverID,nymID,assetID,jTextArea1.getText(),isPurse);
            if(success){
                JOptionPane.showMessageDialog(this, "Cash imported successfully","Success",JOptionPane.INFORMATION_MESSAGE);
                CashPurseDetails details = new CashPurseAccount().getCashPurseDetails(serverID+":"+assetID+":"+nymID);
                CashPurseAccountBottomPanel.populateCashPurseDetails(details);
                CashPurseAccountTopPanel.populateCashPurseDetails(details, details.getBalance());
                MainPage.reLoadAccount();
            } else
                JOptionPane.showMessageDialog(this, "Error in cash purse import","Server Error",JOptionPane.ERROR_MESSAGE);
        }catch(Exception e){
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.moneychanger.core.dataobjects.CashPurseDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.