Ejemplo n.º 1
0
        // 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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
		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));
		}