Beispiel #1
0
 /// <summary>
 /// Interface that transfers a given value from one acount to another account.
 /// It also accepts values from another currencies.
 /// To select a currency, please insert the integer from below.
 /// EUR = 0
 ///	USD = 1
 ///	GBP = 2
 ///	INR = 3
 ///	JPY = 4
 /// </summary>
 /// <param name="tmpFromAccID"></param>
 /// <param name="tmpToAccID"></param>
 /// <param name="tmpValue"></param>
 /// <param name="currency"></param>
 /// <returns>Returns 0 if the transfer is successfully.</returns>
 public static int Intf_transfer(int custId, int tmpFromAccID, int tmpToAccID, float tmpValue, int currency)
 {
     //Note that this DLL doesn´t need a customerID to create a transaction.
     if (currency == 0)
     {
         return(xmlcontroler_transferMoney(tmpFromAccID, tmpToAccID, tmpValue) ? 0 : -1);
     }
     else
     {
         return(xmlcontroler_transferMoney(tmpFromAccID, tmpToAccID, Convert.ToSingle(CurrencyExchangeWrapper.Intf_exchange(tmpValue, currency, 0))) ? 0 : -1);
     }
 }
 /// <summary>
 /// Interface that transfers a given value from one acount to another account.
 /// It also accepts values from another currencies.
 /// To select a currency, please insert the integer from below.
 /// EUR = 0
 ///	USD = 1
 ///	GBP = 2
 ///	INR = 3
 ///	JPY = 4
 /// </summary>
 /// <param name="tmpFromAccID"></param>
 /// <param name="tmpToAccID"></param>
 /// <param name="tmpValue"></param>
 /// <param name="currency"></param>
 /// <returns>Returns true if the transfer is successfully.</returns>
 public static int Intf_transfer(int custId, int tmpFromAccID, int tmpToAccID, float tmpValue, int currency)
 {
     if (currency == 0)
     {
         return(createTransaction(custId, tmpFromAccID, tmpToAccID, Helper.StoIPtr("transfer"), tmpValue));
     }
     else
     {
         return(createTransaction(custId, tmpFromAccID, tmpToAccID, Helper.StoIPtr("transfer"), Convert.ToSingle(CurrencyExchangeWrapper.Intf_exchange(tmpValue, currency, 0))));
     }
 }