public ActionResult _NabobBetsByUserID(List <NabobBetListDto> BetList) { string UserID = User.Identity.GetUserId(); /* foreach (var b in BetList) * { * if (b.isTrueValue == "true") * { * if (b.betModel == 2) * { * b.showTitle = "題目總彩金 " + b.topicMoney + " × 下注金 " + b.money + " ÷ 正解總彩金 " + b.choiceMoney; * if (b.rake > 0) * { * b.showTitle += " × (100-" + b.rake + ")%"; * } * b.showTitle += "=" + b.realmoney; * } * else if (b.betModel == 1) * { * b.showTitle = "下注金 " + b.money + " × 賠率 " + b.Odds + " = " + b.realmoney; * } * } * }*/ BetsByUserID bbui = new BetsByUserID(); //bbui.BetList = BetList.OrderByDescending(p => p.betDatetime).ToList(); bbui.NabobBetList = BetList; bbui.assets = new AssetsRepository().getAssetsByUserID(UserID, 1); return(View(bbui)); }
public ActionResult _DgonBetsByUserID(List <BetListDto> BetList) { string UserID = User.Identity.GetUserId(); foreach (var b in BetList) { if (b.isTrueValue == "true") { if (b.betModel == 2) { b.showTitle = "題目總獎金 " + b.topicMoney + " × 預測金額 " + b.money + " ÷ 正解總獎金 " + b.choiceMoney; if (b.rake > 0) { b.showTitle += " × (100-" + b.rake + ")%"; } b.showTitle += "=" + b.realmoney; } else if (b.betModel == 1) { b.showTitle = "預測金額 " + b.money + " × 倍率 " + b.Odds + " = " + b.realmoney; } } } BetsByUserID bbui = new BetsByUserID(); bbui.BetList = BetList.OrderByDescending(p => p.betDatetime).ToList(); bbui.assets = new AssetsRepository().getAssetsByUserID(UserID, 1); return(View(bbui)); }
public async Task <ActionResult> _BetsByUserIDPhone() { string UserID = User.Identity.GetUserId(); List <BetListDto> BetList = await new BetsRepository().BetsByUserID(UserID); GamePostsRepository _gpr = new GamePostsRepository(); List <GamePosts> gpList = _gpr.getValidAll(); double assets = new AssetsRepository().getAssetsByUserID(UserID, 1); foreach (var b in BetList) { if (b.isTrueValue == "true") { if (b.betModel == 2) { b.showTitle = "題目總獎金 " + b.topicMoney + " × 預測金額 " + b.money + " ÷ 正解總獎金 " + b.choiceMoney; if (b.rake > 0) { b.showTitle += " × (100-" + b.rake + ")%"; } b.showTitle += "=" + b.realmoney; } else if (b.betModel == 1) { b.showTitle = "預測金額 " + b.money + " × 倍率 " + b.Odds + " = " + b.realmoney; } } } BetsByUserID bbui = new BetsByUserID(); /*foreach (var bl in BetList) * { * BetListDto blvm = new BetListDto(); * blvm.gamepostsn = gpList.Where(p => p.GameSn == bl.gameSn).FirstOrDefault().sn; * //bbui.gamepostsn = gpList.Where(p => p.GameSn == bl.gameSn).FirstOrDefault().sn; * BetList.Add(blvm); * }*/ // BetsByUserID bbui = new BetsByUserID(); bbui.BetList = BetList.OrderByDescending(p => p.betDatetime).ToList(); bbui.assets = new AssetsRepository().getAssetsByUserID(UserID, 1); return(View(bbui)); }
public ActionResult _LiveBetsByUserID(List <BetListDto> BetList) { string UserID = User.Identity.GetUserId(); foreach (var b in BetList) { if (b.isTrueValue == "true") { if (b.betModel == 2 && b.walk != 1) { b.showTitle = "題目總獎金 " + b.topicMoney + " × 預測金額 " + b.money + " ÷ 正解總獎金 " + b.choiceMoney; if (b.rake > 0) { b.showTitle += " × (100-" + b.rake + ")%"; } b.showTitle += "=" + b.realmoney; } else if (b.betModel == 1 && b.walk != 1) { b.showTitle = "預測獎金 " + b.money + " × 倍率 " + b.Odds + " = " + b.realmoney; } else { b.showTitle = "先知獎金 " + b.totalmoney + " + " + " 中獎獎金 " + Math.Round((Decimal)(b.realmoney - b.totalmoney), 2, MidpointRounding.AwayFromZero); /*if (b.rake > 0) * { * b.showTitle += " × (100-" + b.rake + ")%"; * }*/ b.showTitle += " = " + b.realmoney; } } } BetsByUserID bbui = new BetsByUserID(); bbui.BetList = BetList.OrderByDescending(p => p.betDatetime).ToList(); bbui.assets = new AssetsRepository().getAssetsByUserID(UserID, 1); return(View(bbui)); }
/*public async System.Threading.Tasks.Task<ActionResult> BetsByUserID() * { * string UserID = User.Identity.GetUserId(); * BetsByUserID bbui = new BetsByUserID(); * List<BetListDto> BetList = new List<BetListDto>(); * * BetList = await new BetsRepository().BetsByUserID(UserID); * * bbui.BetList = BetList.OrderByDescending(p=>p.betDatetime).ToList(); * bbui.assets = new AssetsRepository().getAssetsByUserID(UserID, 1); * * return View(bbui); * }*/ public async System.Threading.Tasks.Task <ActionResult> BetsByUserIDList() { string UserID = User.Identity.GetUserId(); BetsByUserID bbui = new BetsByUserID(); List <BetListDto> BetList = new List <BetListDto>(); BetList = await new BetsRepository().BetsByUserID(UserID); List <BetListDto> blist = new List <BetListDto>(); blist = BetList.OrderByDescending(p => p.betDatetime).ToList(); bbui.BetList = blist.Where(x => x.betModel == 1 || x.betModel == 2 || x.betModel == 7).ToList(); List <NabobBetListDto> NabobBetList = new List <NabobBetListDto>(); NabobBetList = await new BetsRepository().NabobBetsByUserID(UserID); bbui.NabobBetList = NabobBetList; bbui.assets = new AssetsRepository().getAssetsByUserID(UserID, 1); ViewData["DgonList"] = blist.Where(x => x.betModel == 5).ToList(); return(View(bbui)); }