//public static List<??> ?? { get; set; } public static float TotalIncome() { try { return(Income.Sum(s => s.Salary)); } catch (Exception e) { Console.WriteLine(e); return(default);
private void Search() { Income = _reportService.GetIncome(DateFrom, DateTo); Outcome = _reportService.GetOutcome(DateFrom, DateTo); Previous = _reportService.GetCurrentMoney(DateFrom.AddDays(-1)); TotalIncome = Income.Sum(x => x.Money); TotalOutcome = Outcome.Sum(x => x.Money); Remaining = TotalIncome - TotalOutcome; Current = Previous + Remaining; }