Example #1
0
 /// <summary>
 /// delete card
 /// </summary>
 /// <param name="card"></param>
 public void DeleteCard(Card card)
 {
     var matchedCard = context.Cards.First(c => c.CardId == card.CardId);
     if (matchedCard != null)
     {
         context.Cards.DeleteObject(card);
         context.SaveChanges();
     }
 }
Example #2
0
        public void TestInsertCard()
        {
            Card card = new Card
            {
                Name = "TestCard"
            };

            cardRepository.InsertCard(card);
        }
Example #3
0
        public CardDetailViewModel(Types.DetialViewType viewType, Card card)
            : this(viewType)
        {
            selectedCard = card;

            buyPrice = card.BuyPrice;
            sellPrice = card.SellPrice;
            maxPrice = card.MaxPrice;
            buyPercent = card.BuyPercent;
            sellPercent = card.SellPercent;
            excessivePercent = card.ExcessivePercent;
            maxPriceModifierPercent = card.MaxPriceModifierPercent;

            //password = card.Password;
            //securityQuestion = card.SecurityQuestion;
        }
 /// <summary>
 /// Create a new Card object.
 /// </summary>
 /// <param name="cardId">Initial value of the CardId property.</param>
 /// <param name="cardTypeId">Initial value of the CardTypeId property.</param>
 public static Card CreateCard(global::System.Int32 cardId, global::System.Int32 cardTypeId)
 {
     Card card = new Card();
     card.CardId = cardId;
     card.CardTypeId = cardTypeId;
     return card;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Cards EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCards(Card card)
 {
     base.AddObject("Cards", card);
 }
Example #6
0
 /// <summary>
 /// insert card
 /// </summary>
 /// <param name="card"></param>
 public void InsertCard(Card card)
 {
     context.Cards.AddObject(card);
     context.SaveChanges();
 }
Example #7
0
 /// <summary>
 /// update card
 /// </summary>
 /// <param name="card"></param>
 public void UpdateCard(Card card)
 {
     var matchedCard = context.Cards.First(c => c.CardId == card.CardId);
     matchedCard = card;
     context.SaveChanges();
 }