public Expense(ExpenseDirection dir, expanseType type, string subject) { Date = DateTime.Now; Direction = dir; Subject = subject; Type = type; }
public Expense(string date, string dir, string type, string amount, string subject) { Date = DateTime.Parse(date); Direction = dir == "הוצאה" ? ExpenseDirection.OutCome : ExpenseDirection.InCome; Subject = subject; Amount = double.Parse(amount); Type = type == "Cash" ? expanseType.Cash : expanseType.CreditCard; }