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();
|
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)
|
public Transaction(string currency, decimal amount, string type, string feeCurrency, decimal feeAmount)
|
||||||
{
|
{
|
||||||
SaveUnixTimeNow();
|
SaveUnixTimeNow();
|
||||||
|
|
|
@ -44,10 +44,12 @@ namespace CryptoCalc
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveButtonFromInput_Click(object sender, RoutedEventArgs e)
|
private void saveButtonFromInput_Click(object sender, RoutedEventArgs e)
|
||||||
|
private void SaveTransactionButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
transactionDB.SaveData
|
transactionDB.SaveData
|
||||||
(
|
(
|
||||||
new Transaction(
|
new Transaction(
|
||||||
|
(DateTime)insertTransactionDatePicker.SelectedDate,
|
||||||
selectedWallet.Index,
|
selectedWallet.Index,
|
||||||
inputCurrency.Text,
|
inputCurrency.Text,
|
||||||
Convert.ToDecimal(inputAmount.Text, CultureInfo.InvariantCulture),
|
Convert.ToDecimal(inputAmount.Text, CultureInfo.InvariantCulture),
|
||||||
|
|
Loading…
Reference in New Issue