public CardActivity Add(int cardID, CardActivityType cardActivityType, DateTime dateTime) { CardActivity cardActivity = new CardActivity() { CardID = cardID, ActivityType = cardActivityType.ToString(), LoggedUser = IdentityProvider.GetUserName(), LoggedDate = dateTime }; return StorageProvider.Add(cardActivity); }
private Card onUpdate(Card card, CardActivityType cardActivityType) { var dateNow = DateProvider.Now(); card.ModifiedDate = dateNow; card.ModifiedUser = IdentityProvider.GetUserName(); var cardResult = StorageProvider.Update(card); if (cardResult != null) { CardActivity cardActivity = new CardActivity(StorageProvider, IdentityProvider); cardResult.CardActivities.Add(cardActivity.Add(card.ID, cardActivityType, dateNow)); } return cardResult; }