use of com.moneychanger.core.OpenTransactionAccount in project otapij by FellowTraveler.
the class OpenTransactionAccountTopPanel method jButton_DepositCashActionPerformed.
//GEN-LAST:event_jButton_WithdrawCashActionPerformed
private void jButton_DepositCashActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton_DepositCashActionPerformed
String[] purseDetails = new OpenTransactionAccount().getPurseBalance(jTextField_ServerID.getText(), jTextField_AssetID.getText(), jTextField_NymID.getText());
/*if(purseDetails==null){
JOptionPane.showMessageDialog(this, "Error in cash deposit. Empty purse","Error",JOptionPane.ERROR_MESSAGE);
return;
}*/
new DepositCashDialog(null, true, purseDetails, jTextField_ServerID.getText(), jTextField_NymID.getText(), jTextField_AccountID.getText()).setVisible(true);
}
use of com.moneychanger.core.OpenTransactionAccount in project otapij by FellowTraveler.
the class ExchangeBasketAcctDialog method initValues.
// End of variables declaration//GEN-END:variables
private void initValues() {
OpenTransactionAccount otAccount = new OpenTransactionAccount();
accountMap = otAccount.getAccounts(assetID, nymID, serverID);
Helpers.populateComboWithoutAll(accountMap, jComboBox1);
}
use of com.moneychanger.core.OpenTransactionAccount in project otapij by FellowTraveler.
the class SendTransferDialog method jButton1ActionPerformed.
// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton1ActionPerformed
try {
if (!Helpers.isValidDouble(jTextField2.getText())) {
JOptionPane.showMessageDialog(this, "Please enter valid number for amount", "Number Format Error", JOptionPane.ERROR_MESSAGE);
return;
}
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
System.out.println("serverID:" + serverID + ",nymID:" + nymID + ",accountID:" + accountID);
boolean success = new OpenTransactionAccount().sendTransfer(serverID, nymID, accountID, jTextField2.getText(), jTextArea1.getText(), jTextField1.getText());
/**
* Reload the inbox and top accounts panel if success
*/
if (success) {
JOptionPane.showMessageDialog(this, "Account to Account Transfer done successfully", "Success", JOptionPane.INFORMATION_MESSAGE);
Helpers.reloadOTDetails(accountID);
MainPage.reLoadAccount();
} else
JOptionPane.showMessageDialog(this, "Error in Account to Account transfer", "Server Error", JOptionPane.ERROR_MESSAGE);
} catch (Exception e) {
e.printStackTrace();
} finally {
setCursor(Cursor.getDefaultCursor());
}
dispose();
}
use of com.moneychanger.core.OpenTransactionAccount in project otapij by FellowTraveler.
the class SendTransferDialog method initValues.
// End of variables declaration//GEN-END:variables
private void initValues() {
OpenTransactionAccount otAccount = new OpenTransactionAccount();
accountMap = otAccount.getAccounts(accountID, serverID);
Helpers.populateCombo(accountMap, jComboBox1);
}
use of com.moneychanger.core.OpenTransactionAccount in project otapij by FellowTraveler.
the class WithdrawCashDialog method jButton1ActionPerformed.
// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton1ActionPerformed
try {
if (!Helpers.isValidDouble(jTextField1.getText())) {
JOptionPane.showMessageDialog(this, "Please enter valid number", "Number Format Error", JOptionPane.ERROR_MESSAGE);
return;
}
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
boolean success = new OpenTransactionAccount().withdrawCash(serverID, nymID, accountID, jTextField1.getText());
/**
* Reload the inbox and top accounts panel if success
*/
if (success) {
JOptionPane.showMessageDialog(this, "Cash withdrawn successfully", "Success", JOptionPane.INFORMATION_MESSAGE);
Helpers.reloadOTDetails(accountID);
MainPage.reLoadAccount();
} else {
JOptionPane.showMessageDialog(this, "Error in cash withdrawal", "Error", JOptionPane.ERROR_MESSAGE);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
setCursor(Cursor.getDefaultCursor());
}
this.dispose();
}
Aggregations