Beispiel #1
0
 public DealDto(List <CardDto> cardList, int uid)
 {
     this.selectCardList = cardList;
     this.Length         = cardList.Count;
     this.Type           = CardType.GetCardType(cardList);
     this.Weight         = CardWeight.GetWeight(cardList, this.Type);
     this.UserId         = uid;
     this.IsRegular      = (this.Type != CardType.NONE);
     this.RemainCardList = new List <CardDto>();
 }
Beispiel #2
0
 public DealDto(List <CardDto> cardList, int userID)
 {
     this.selectCardList = cardList;
     this.length         = cardList.Count;
     this.type           = CardType.GetCardType(cardList);
     this.weight         = CardWeight.GetWeight(cardList, this.type);
     this.userId         = userID;
     this.isRegular      = (this.type != CardType.NONE);
     this.remainCardList = new List <CardDto>();
 }
Beispiel #3
0
        public async Task <IHttpActionResult> GetCards(string serviceType, string cardType)
        {
            var sql   = @"
select Id, [Type], Title, CardId, Position, Content
from dbo.exeCardsWithItems
where [Type] = @CardType;
";
            var cards = await ExerciseUtils.GetCardsWithItems(sql, new
            {
                CardType = CardType.GetCardType(serviceType, cardType)
            });

            return(Ok(cards));
        }