Selectable date for manual transactions
This commit is contained in:
parent
64a1334f1e
commit
eb7ef0821f
14
DBClasses.cs
14
DBClasses.cs
|
@ -107,6 +107,20 @@ namespace CryptoCalc
|
|||
SetDBStrings();
|
||||
}
|
||||
|
||||
public Transaction(DateTime dateTime, long walletID, string currency, decimal amount, string type)
|
||||
{
|
||||
UnixTime = GetUnixTime(dateTime);
|
||||
WalletID = walletID;
|
||||
Currency = currency;
|
||||
(Amount, AmountDecimal) = Util.SplitDecimal(amount);
|
||||
TransactionType = type;
|
||||
|
||||
Platform = "";
|
||||
Note = "";
|
||||
|
||||
SetDBStrings();
|
||||
}
|
||||
|
||||
public Transaction(string currency, decimal amount, string type, string feeCurrency, decimal feeAmount)
|
||||
{
|
||||
SaveUnixTimeNow();
|
||||
|
|
|
@ -44,10 +44,12 @@ namespace CryptoCalc
|
|||
}
|
||||
|
||||
private void saveButtonFromInput_Click(object sender, RoutedEventArgs e)
|
||||
private void SaveTransactionButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
transactionDB.SaveData
|
||||
(
|
||||
new Transaction(
|
||||
(DateTime)insertTransactionDatePicker.SelectedDate,
|
||||
selectedWallet.Index,
|
||||
inputCurrency.Text,
|
||||
Convert.ToDecimal(inputAmount.Text, CultureInfo.InvariantCulture),
|
||||
|
|
Loading…
Reference in New Issue