Small updates
This commit is contained in:
parent
f3e8bc09e0
commit
b6b4dc0cea
|
@ -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;
|
||||
|
|
|
@ -10,7 +10,6 @@ namespace CryptoCalc
|
|||
{
|
||||
public class DBInteraction
|
||||
{
|
||||
|
||||
public static void SaveData<T>(ref T data) where T : DBClasses
|
||||
{
|
||||
if (data is null)
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue