public void Count(Budget budget) { this.PrintLine(53); Painter.BlueWhite(); Console.WriteLine(string.Format("|{0, -53}|", $"COUNT: {budget.Count}")); Painter.BlackGray(); this.PrintLine(53); }
public void AveragePerDay(Budget expensesVariable) { int daysInMonth = DateTime.DaysInMonth(2019, DateTime.Now.Month); decimal averagePerDay = expensesVariable.Total() / daysInMonth; this.PrintLine(53); Painter.BlueWhite(); Console.WriteLine(string.Format("|{0, -53}|", $"AVERAGE PER DAY: {averagePerDay:F1} lv.")); Painter.BlackGray(); this.PrintLine(53); }
private void PrintTitle() { int year = DateTime.Now.Year; int month = DateTime.Now.Month; int day = DateTime.Now.Day; this.PrintLine(53); Painter.BlueWhite(); Console.WriteLine(string.Format("|{0,18}{1,-17}{2,18}|", string.Empty, $"BUDGET {year}-{month}-{day}", string.Empty)); Painter.BlackGray(); }
private void Balance(decimal balance, decimal incomesTotal) { this.PrintLine(53); Painter.BlueWhite(); if (incomesTotal > 0) { Console.WriteLine(string.Format( "|{0,-43}{1,-10}|", $"TOTAL BALANCE: {balance.ToString("+#;-#;0")} lv.", $"({balance / incomesTotal:P1})")); } else { Console.WriteLine(string.Format( "|{0,-43}{1,-10}|", $"TOTAL BALANCE: {balance.ToString("+#;-#;0")} lv.", "(N/A %)")); } Painter.BlackGray(); this.PrintLine(53); }