// ReSharper restore UnusedAutoPropertyAccessor.Local public bool Equals(ITransactionVM other) { if (ReferenceEquals(this, other)) return true; if (other == null) return false; var asFake = other as FakeTransactionVM; return asFake != null && asFake.Transaction != null && asFake.Transaction.Equals(Transaction); }
public bool Equals(ITransactionVM other) { if (ReferenceEquals(this, other)) return true; if (other == null) return false; var vm = other as TransactionVM; return vm != null && vm.transaction != null && vm.transaction.Equals(transaction); }
private static bool CanSaveTransaction(ITransactionVM trans) { return trans.Purchases != null && trans.Purchases.Any() && (trans.TotalCost != 0 || trans.Purchases.Count > 1) && trans.Purchases.All(purchase => (!string.IsNullOrEmpty(purchase.ItemName) && purchase.SubTotal != 0)); }