Exemplo n.º 1
0
 private void UpdateJsonTransactionEmptyGroupId(JsonTransaction transaction)
 {
     if (transaction.GroupId == Guid.Empty)
     {
         AddedEntity <Group> addedGroup = _addedGroups.Where(x => x.ClientId == transaction.GroupClientId).FirstOrDefault();
         if (addedGroup != null)
         {
             transaction.GroupId = addedGroup.Entity.Id;
         }
     }
 }
Exemplo n.º 2
0
        private void UpdateJsonTransactionWithNewPeopleIds(JsonTransaction transaction)
        {
            foreach (int payeeClientId in transaction.PayeesClientIds)
            {
                AddedEntity <Person> payee = _addedPeople.Where(x => x.ClientId == payeeClientId).FirstOrDefault();
                if (payee != null && payee.Entity != null)
                {
                    transaction.Payees.Add(payee.Entity.Id);
                }
            }

            AddedEntity <Person> payer = _addedPeople.Where(x => x.ClientId == transaction.PayerClientId).FirstOrDefault();

            if (payer != null && payer.Entity != null)
            {
                transaction.PayerId = payer.Entity.Id;
            }
        }
Exemplo n.º 3
0
 protected virtual void OnAddedEntity(TEntity entity)
 {
     AddedEntity?.Invoke(this, new ComponentEventArgs <TEntity>(entity));
 }