diff --git a/DBClasses.cs b/DBClasses.cs index 55171e2..ccb3af4 100644 --- a/DBClasses.cs +++ b/DBClasses.cs @@ -7,7 +7,6 @@ namespace CryptoCalc public interface IDBClasses { string DBVariables { get; set; } - string DBTableName { get; } string DBSaveDataString { get; } } @@ -16,7 +15,7 @@ namespace CryptoCalc { #region Publics public virtual string DBVariables { get; set; } - public virtual string DBTableName => throw new NotImplementedException(); + public virtual string DBTableName { get; } public string DBSaveDataString => $"({Regex.Replace(DBVariables, "@", "")}) values ({DBVariables})"; public int Index { get; set; } @@ -140,10 +139,10 @@ namespace CryptoCalc public Wallet() { SetDBStrings(); } - public Wallet(int year, int month, int day, string platform, string name, string currency, float balance, int defaultWallet, string note) + public Wallet(DateTime dateTime, string platform, string name, string currency, float balance, int defaultWallet, string note) { SaveUnixTimeNow(); - UnixTimeCreated = GetUnixTime(new DateTime(year, month, day)); + UnixTimeCreated = GetUnixTime(dateTime); Platform = platform; Name = name; Currency = currency; diff --git a/DBInteraction.cs b/DBInteraction.cs index cd50c22..116109d 100644 --- a/DBInteraction.cs +++ b/DBInteraction.cs @@ -10,7 +10,6 @@ namespace CryptoCalc { public class DBInteraction { - public static void SaveData(ref T data) where T : DBClasses { if (data is null) diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 4bfc358..00daf72 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -66,7 +66,7 @@ namespace CryptoCalc { Wallet w = new(); w.SaveUnixTimeNow(); - w.UnixTimeCreated = w.GetUnixTime(new DateTime(2018, 10, 1)); + w.UnixTimeCreated = w.GetUnixTime(new DateTime(rand.Next(2011, DateTime.Now.Year), rand.Next(1,12), rand.Next(1, 28))); w.Platform = "Ledger"; w.Name = "TestWallet"; w.Currency = "SOL";