コード例 #1
0
        /// <summary>
        /// 实例化一个新的投注记录(追号)
        /// </summary>
        /// <param name="issue">期号</param>
        /// <param name="multiple">倍数</param>
        /// <param name="pay">投注金额</param>
        /// <param name="chasing">所从属的追号记录</param>
        public BettingWithChasing(string issue, double multiple, double pay, Chasing chasing)
        {
            this.Issue = issue;
            this.Multiple = multiple;
            this.Status = BettingStatus.等待开奖;
            this.Bonus = 0;
            this.Chasing = chasing;
            this.LotteryValues = "";

            double t = this.Chasing.HowToPlay.Interface == LotteryInterface.任N不定位
                ? this.Chasing.Owner.PlayInfo.Rebate_IndefinitePosition
                : this.Chasing.Owner.PlayInfo.Rebate_Normal;
            t -= this.Chasing.Points;
            t = (1 - t) / 100;
            this.Pay = Math.Round(pay * t, 2);
        }
コード例 #2
0
 /// <summary>
 /// 实例化一个新的追号信息
 /// </summary>
 /// <param name="model">追号信息的数据模型</param>
 /// <param name="bettings">所从属的投注信息的数据模型</param>
 public ChasingExport(Chasing model, List<BettingWithChasing> bettings)
 {
     this.Id = model.Id;
     this.OwnerId = model.Owner.Id;
     this.Owner = model.Owner.Username;
     this.StartIssue = model.StartIssue;
     this.Continuance = model.Continuance;
     this.Notes = model.Notes;
     this.Points = model.Points;
     this.HowToPlay = model.GetDescription();
     this.Values = model.GetBetStr();
     this.Status = model.Status;
     this.Pay = model.Pay;
     this.Bonus = model.Bonus;
     this.Bettings = bettings.ConvertAll(x => new BettingWithChasingExport(x));
     this.CreatedTime = model.CreatedTime;
 }