public IResult MakeContribution(IFond fond, IBalance balance) { IResult result = Result.GetDefaultResult(); if (fond.HasMember(this).Success) { ITransaction accountSpending = new Transaction(); accountSpending.Name = TransactionNameHolder .GetName(TransactionName.FondSpending); accountSpending.Description = string.Format("{0} - {1}", fond.Name, balance.GetStrValue()); accountSpending.Type = new TransactionType(TransactionTypes .Spending.ToString()); accountSpending.Time = DateTime.Now.ToLongTimeString(); accountSpending.Amount = balance; ITransaction fondEarning = new Transaction(); fondEarning.Name = TransactionNameHolder .GetName(TransactionName.AccountContribution); fondEarning.Description = string.Format("{0} - {1}", this.Name, balance.GetStrValue()); fondEarning.Type = new TransactionType(TransactionTypes .Earning.ToString()); fondEarning.Time = DateTime.Now.ToLongTimeString(); fondEarning.Amount = balance; this.SpendMoney(accountSpending); fond.ReceiveMoney(fondEarning); result.Success = true; result.Message = string.Format(MessageHolder .GetMessage(MessageType.MakeContribution), this.Name, fond.Name); } else { result.Message = fond.HasMember(this).Message; } return(result); }