Beispiel #1
0
        public static int ReturnAmount(this ITicket ticket, string attch)
        {
            var str = string.Empty;

            foreach (var ante in ticket.GetAnteCodeList())
            {
                str += string.IsNullOrEmpty(str)
                    ? string.Format("{0}_{1}_{2}", ante.MatchId, ante.GameType, ante.AnteNumber)
                    : string.Format("|{0}_{1}_{2}", ante.MatchId, ante.GameType, ante.AnteNumber);
            }
            var num        = 0;
            var arraryList = attch.Split(',');

            foreach (var item in arraryList)
            {
                var arrary = item.ToUpper().Split('^');
                if (arrary.Contains(str))
                {
                    num = int.Parse(arrary[1]);
                }
            }
            if (num == 0)
            {
                return(-1);
            }
            return(num);
        }
Beispiel #2
0
        //竞彩、北单
        public static string ToAnteString_HuaYang(this ITicket ticket)
        {
            var strList      = new List <string>();
            var withGameType = false;

            if (!string.IsNullOrEmpty(ticket.GameType) && ticket.GameType.Equals("HH", StringComparison.OrdinalIgnoreCase))
            {
                if (ticket.GetAnteCodeList().GroupBy(a => a.GameType).Count() > 1)
                {
                    withGameType = true;
                }
            }
            foreach (var ante in ticket.GetAnteCodeList())
            {
                strList.Add(ante.ToAnteString_HuaYang(ante.GameType ?? ticket.GameType, withGameType));
            }
            return(string.Join(";", strList));
        }
Beispiel #3
0
        public static string ToAnteString_liangcaiToMatchIdLoc(this ITicket ticket, string issuseNumber)
        {
            var strList = new List <string>();

            foreach (var ante in ticket.GetAnteCodeList())
            {
                strList.Add(string.Format("{0}{1}", issuseNumber, ante.MatchId));
            }
            return(string.Join(",", strList));
        }
Beispiel #4
0
        ////根据playType 1_1判断是单关  区DS下面
        //public static string GetOddsToMatchId(this ITicket ticket,string playType)
        //{
        //    var strList = new List<string>();
        //    foreach (var ante in ticket.GetAnteCodeList())
        //    {
        //        if (playType.Trim()=="1_1")
        //        {

        //        }
        //        else
        //        {
        //            if (ante.GameCode.ToUpper() == "JCZQ")
        //            {
        //                switch (ante.GameType.ToUpper())
        //                {
        //                    case "BF":
        //                        var oddManager = new JCZQ_OddsManager(tran);
        //                        break;
        //                    case "BQC":
        //                        break;
        //                    case "BRQSPF":
        //                        break;
        //                    case "SPF":
        //                        break;
        //                    case "ZJQ":
        //                        break;
        //                    default:
        //                        break;
        //                }
        //            }
        //            if (ante.GameCode.ToUpper() == "JCLQ")
        //            {
        //                switch (ante.GameType.ToUpper())
        //                {
        //                    case "DXF":
        //                        break;
        //                    case "RFSF":
        //                        break;
        //                    case "SF":
        //                        break;
        //                    case "SFC":
        //                        break;
        //                    default:
        //                        break;
        //                }
        //            }
        //        }

        //        strList.Add(string.Format("{0}_{1}", ante.MatchId, ante.AnteNumber));
        //    }
        //    return string.Join("/", strList);
        //}
        public static string ToAnteString_zhongminToMatchId(this ITicket ticket)
        {
            var strList = new List <string>();

            foreach (var ante in ticket.GetAnteCodeList())
            {
                strList.Add(string.Format("{0}", ante.MatchId));
            }
            return(string.Join(",", strList));
        }
Beispiel #5
0
        public static string ToAnteString_TMToMatchIdLoc(this ITicket ticket)
        {
            var strList = new List <string>();

            foreach (var ante in ticket.GetAnteCodeList())
            {
                strList.Add(ante.MatchId);
            }
            return(string.Join(",", strList));
        }
Beispiel #6
0
        public static string ToAnteString_LiangCai(this ITicket ticket, string PlayType)
        {
            var strList      = new List <string>();
            var withGameType = false;

            if (!string.IsNullOrEmpty(ticket.GameType) && ticket.GameType.Equals("HH", StringComparison.OrdinalIgnoreCase))
            {
                if (ticket.GetAnteCodeList().GroupBy(a => a.GameType).Count() > 1)
                {
                    withGameType = true;
                }
            }
            foreach (var ante in ticket.GetAnteCodeList())
            {
                strList.Add(ante.ToAnteString_LiangCai(ante.GameType ?? ticket.GameType, withGameType));
            }
            //return string.Join(";", strList);
            return(string.Format("{0}|{1}|{2}", ConvertGameType(ticket.GameCode, ticket.GameType), string.Join(",", strList), ConvertPlayType(ticket.GameCode, PlayType)));
        }
Beispiel #7
0
        public static string ToAnteString_LocalhostShop_LC(this ITicket ticket)
        {
            var strList = new List <string>();

            foreach (var ante in ticket.GetAnteCodeList())
            {
                if (ticket.GameType == "HH")
                {
                    strList.Add(string.Format("{0}_{1}_{2}", ante.GameType, ante.MatchId, ante.AnteNumber));
                }
                else
                {
                    strList.Add(string.Format("{0}_{1}", ante.MatchId, ante.AnteNumber));
                }
            }
            return(string.Join("/", strList));
        }