示例#1
0
        private void BindStripHistory()
        {
            if (_list == null)
            {
                _list = PlayerStrip.GetClubBingoHistory(ClubID);

                foreach (var bh in _list)
                {
                    var br = new BingoResult(bh.Result, bh.ResultDetail);
                    switch (br.Result)
                    {
                    case BingoResultType.Strip:
                        if (br.ResultDetail == "strip")
                        {
                            bh.AdditionalData =
                                "<span class=\"ClubSys_Strip SHIRT\">球衣</span><span class=\"ClubSys_Strip SHORTS\">球裤</span><span class=\"ClubSys_Strip SOCK\">球袜</span>";
                        }
                        else if (br.ResultDetail.Contains("strips"))
                        {
                            bh.AdditionalData =
                                "<span class=\"ClubSys_Strip SHIRT\">球衣</span><span class=\"ClubSys_Strip SHORTS\">球裤</span><span class=\"ClubSys_Strip SOCK\">球袜</span><span class=\"ClubSys_Strip RATE\">×5</span>";
                        }
                        else
                        {
                            bh.AdditionalData =
                                BingoUtil.ShowBothBingoDetail(
                                    ("<span class=\"ClubSys_Strip " + br.ResultDetail.ToUpper() + "\">{0}</span>"),
                                    br);
                        }
                        break;

                    case BingoResultType.Card:
                        if (br.ResultDetail == "legend")
                        {
                            bh.AdditionalData = "<span class=\"ClubSys_Strip VIDEO\">视频</span>";
                        }
                        else
                        {
                            bh.AdditionalData =
                                $"<span class=\"ClubSys_Strip CARD\">{Player.Cache.Load(new Guid(br.ResultDetail)).DisplayName}</span>";
                        }
                        break;

                    case BingoResultType.Cash:
                        bh.AdditionalData = "<span class=\"ClubSys_Strip CASH\">枪手币: " + br.ResultDetail + "</span>";
                        break;

                    case BingoResultType.Both:
                        bh.AdditionalData =
                            BingoUtil.ShowBothBingoDetail(
                                "<span class=\"ClubSys_Strip " +
                                br.ResultDetail.Substring(0, br.ResultDetail.IndexOf("+")).ToUpper() +
                                "\">{0}</span><span class=\"ClubSys_Strip CASH\">枪手币: {1}</span>", br);
                        break;
                    }
                }
            }

            gvClubStrip.DataSource = _list;
            gvClubStrip.DataBind();
        }