Ejemplo n.º 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();
     }
 }
Ejemplo n.º 2
0
        public void TestInsertCard()
        {
            Card card = new Card
            {
                Name = "TestCard"
            };

            cardRepository.InsertCard(card);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 4
0
 /// <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;
 }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// insert card
 /// </summary>
 /// <param name="card"></param>
 public void InsertCard(Card card)
 {
     context.Cards.AddObject(card);
     context.SaveChanges();
 }
Ejemplo n.º 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();
 }