public static Income Create( TransactionDescription description, DateTime transactionDate, PaymentType paymentType, Double amount, BudgetType budgetType, Note note, FundType fundType) { if (paymentType == null) { return(null); } if (budgetType == null) { return(null); } if (fundType == null) { return(null); } if (transactionDate == DateTime.MinValue) { return(null); } if (amount <= 0.00) { return(null); } return(new Income( description, transactionDate, paymentType, amount, budgetType, note, fundType)); }
private Income( TransactionDescription description, DateTime transactionDate, PaymentType paymentType, double amount, BudgetType budgetType, Note note, FundType fundType) : base(description, transactionDate, paymentType, amount, budgetType, note, fundType) { }
public static Payment Create( TransactionDescription description, DateTime transactionDate, PaymentType paymentType, Double amount, BudgetType budgetType, SpendType spendType, Note note, string chequeNumber, FundType fundType) { if (paymentType == null) { return(null); } if (budgetType == null) { return(null); } if (spendType == null) { return(null); } if (fundType == null) { return(null); } if (transactionDate == DateTime.MinValue) { return(null); } if (amount <= 0.00) { return(null); } if (!string.IsNullOrWhiteSpace(chequeNumber)) { int result; if (!int.TryParse(chequeNumber, out result)) { return(null); } } return(new Payment( description, transactionDate, paymentType, amount, budgetType, spendType, note, chequeNumber, fundType)); }
private Payment( TransactionDescription description, DateTime transactionDate, PaymentType paymentType, double amount, BudgetType budgetType, SpendType spendType, Note note, string chequeNumber, FundType fundType) : base(description, transactionDate, paymentType, amount, budgetType, note, fundType) { SpendType = spendType; ChequeNumber = chequeNumber; }
protected Transaction( TransactionDescription description, DateTime transactionDate, PaymentType paymentType, Double amount, BudgetType budgetType, Note note, FundType fundType ) : this() { Description = description; Date = transactionDate; PaymentType = paymentType; BudgetType = budgetType; Amount = amount; Notes = note; BankCleared = false; FundType = fundType; }
private FundType GetFund() { return(FundType.Create("Revenue", "Revenue")); }