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>(); }
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>(); }
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)); }