Removed RawData class

This commit is contained in:
Stedd 2022-01-15 17:11:55 +01:00
parent 8a10fbbb5f
commit 5c1ec6bfed
1 changed files with 31 additions and 96 deletions

View File

@ -95,23 +95,23 @@ namespace CryptoCalc
#region Functions #region Functions
void SetDBStrings() private void SetDBStrings()
{ {
dbVariables = dbVariables =
$"@{nameof(Year)}, " + $"@{nameof(Year)},"
$" @{nameof(Month)}," + + $"@{nameof(Month)},"
$" @{nameof(Day)}," + + $"@{nameof(Day)},"
$" @{nameof(Hour)}," + + $"@{nameof(Hour)},"
$" @{nameof(Minute)}," + + $"@{nameof(Minute)},"
$" @{nameof(Second)}," + + $"@{nameof(Second)},"
$" @{nameof(DateTimeString)}," + + $"@{nameof(DateTimeString)},"
$" @{nameof(Currency)}," + + $"@{nameof(Currency)},"
$" @{nameof(Amount)}," + + $"@{nameof(Amount)},"
$" @{nameof(TransactionType)}," + + $"@{nameof(TransactionType)},"
$" @{nameof(FeeCurrency)}," + + $"@{nameof(FeeCurrency)},"
$" @{nameof(FeeAmount)}," + + $"@{nameof(FeeAmount)},"
$" @{nameof(Platform)}," + + $"@{nameof(Platform)},"
$" @{nameof(Note)}"; + $"@{nameof(Note)}";
variables = Regex.Replace(dbVariables, "@", ""); variables = Regex.Replace(dbVariables, "@", "");
} }
@ -164,25 +164,25 @@ namespace CryptoCalc
#region Functions #region Functions
void SetDBStrings() private void SetDBStrings()
{ {
dbVariables = dbVariables =
$"@{nameof(Year)}, " + $"@{nameof(Year)}, " +
$" @{nameof(Month)}," + $"@{nameof(Month)}," +
$" @{nameof(Day)}," + $"@{nameof(Day)}," +
$" @{nameof(Hour)}," + $"@{nameof(Hour)}," +
$" @{nameof(Minute)}," + $"@{nameof(Minute)}," +
$" @{nameof(Second)}," + $"@{nameof(Second)}," +
$" @{nameof(DateTimeString)}," + $"@{nameof(DateTimeString)}," +
$" @{nameof(CreationYear)}," + $"@{nameof(CreationYear)}," +
$" @{nameof(CreationMonth)}," + $"@{nameof(CreationMonth)}," +
$" @{nameof(CreationDay)}," + $"@{nameof(CreationDay)}," +
$" @{nameof(Platform)}," + $"@{nameof(Platform)}," +
$" @{nameof(Name)}," + $"@{nameof(Name)}," +
$" @{nameof(Currency)}," + $"@{nameof(Currency)}," +
$" @{nameof(Balance)}," + $"@{nameof(Balance)}," +
$" @{nameof(DefaultWallet)}," + $"@{nameof(DefaultWallet)}," +
$" @{nameof(Notes)}"; $"@{nameof(Notes)}";
variables = Regex.Replace(dbVariables, "@", ""); variables = Regex.Replace(dbVariables, "@", "");
} }
@ -192,69 +192,4 @@ namespace CryptoCalc
#endregion #endregion
} }
/*
public class RawData : DB_Classes
{
#region Publics
public override string DBTableName => "RawData";
//public override string DBVariables => "(Date_Year, Date_Month, Date_Day, Time_Hour, Time_Minute, Time_Second, DateTimeString, CryptoCurrency, Amount, TransactionType, Service, Comment) values (@Date_Year, @Date_Month, @Date_Day, @Time_Hour, @Time_Minute, @Time_Second, @DateTimeString, @CryptoCurrency, @Amount, @TransactionType, @Service, @Comment)";
public string CryptoCurrency { get; set; }
public float Amount { get; set; }
public string TransactionType { get; set; }
public string Service { get; set; }
public string Comment { get; set; }
#endregion
#region Contructors
public RawData() { }
public RawData(string _currency, float _amount, string _type)
{
Year = DateTime.Now.Year;
Month = DateTime.Now.Month;
Day = DateTime.Now.Day;
Hour = DateTime.Now.Hour;
Minute = DateTime.Now.Minute;
Second = DateTime.Now.Second;
DateTimeString = DateTime.Now.ToString();
CryptoCurrency = _currency;
Amount = _amount;
TransactionType = _type;
Service = "";
Comment = "";
dbVariables =
$"@{nameof(Year)}, " +
$" @{nameof(Month)}," +
$" @{nameof(Day)}," +
$" @{nameof(Hour)}," +
$" @{nameof(Minute)}," +
$" @{nameof(Second)}," +
$" @{nameof(DateTimeString)}," +
$" @{nameof(tCurrency)}," +
$" @{nameof(tAmount)}," +
$" @{nameof(tTransactionType)}," +
$" @{nameof(tFeeCurrency)}," +
$" @{nameof(tFeeAmount)}," +
$" @{nameof(tPlatform)}," +
$" @{nameof(tNote)}";
variables = Regex.Replace(dbVariables, "@", "");
}
#endregion
#region Functions
public string FullInfo => $"{ Index.ToString() } { DateTimeString } { CryptoCurrency } { Amount } { TransactionType }";
#endregion
}
*/
} }