Пример #1
0
        bool setDataO6(string retbuff, string strDateTarg, string placeTarg,
                       string racenumTarg)
        {
            DateTime dateTime;

            JVData_Struct.JV_O6_ODDS_SANRENTAN mO6Data =
                new JVData_Struct.JV_O6_ODDS_SANRENTAN();

            mO6Data.SetDataB(ref retbuff);
            dateTime = DateTime.Parse(
                (mO6Data.id.Year +
                 mO6Data.id.MonthDay).Insert(4, "/").Insert(7, "/"));
            if (dateTime > DateTime.Parse(strDateTarg.Insert(4, "/").Insert(7, "/")))
            {
                return(false);
            }

            string strJyo = cCommon.JyoCord(mO6Data.id.JyoCD);

            if (!(strDateTarg == mO6Data.id.Year + mO6Data.id.MonthDay &&
                  placeTarg == strJyo &&
                  mO6Data.id.RaceNum == racenumTarg))
            {
                return(false);
            }

            for (int i = 0; i < 4896; i++)
            {
                if (mO6Data.OddsSanrentanInfo[i].Kumi.Trim() == "" ||
                    mO6Data.OddsSanrentanInfo[i].Odds.Trim() == "" ||
                    mO6Data.OddsSanrentanInfo[i].Odds.Contains("-") ||
                    mO6Data.OddsSanrentanInfo[i].Odds.Contains("*"))
                {
                    continue;
                }
                if (int.Parse(mO6Data.OddsSanrentanInfo[i].Odds) == 0)
                {
                    continue;
                }
                clsOddsSanrentan cOddsSanrentan = new clsOddsSanrentan();
                cOddsSanrentan.Kumi    = mO6Data.OddsSanrentanInfo[i].Kumi;
                cOddsSanrentan.Umaban1 = int.Parse(mO6Data.OddsSanrentanInfo[i].Kumi.Substring(0, 2));
                cOddsSanrentan.Umaban2 = int.Parse(mO6Data.OddsSanrentanInfo[i].Kumi.Substring(2, 2));
                cOddsSanrentan.Umaban3 = int.Parse(mO6Data.OddsSanrentanInfo[i].Kumi.Substring(4, 2));
                //cOddsSanrentan.OddsSanrentan = string.Format("{0:0.0}",
                //    int.Parse(mO6Data.OddsSanrentanInfo[i].Odds));
                cOddsSanrentan.OddsSanrentan = int.Parse(mO6Data.OddsSanrentanInfo[i].Odds) / 10;
                listOddsSanrentan.Add(cOddsSanrentan);
            }

            return(true);
        }
Пример #2
0
        public List <clsOddsSanrentan> setDataO6(string retbuff, string strDateTarg, string placeTarg,
                                                 string racenumTarg)
        {
            List <clsOddsSanrentan> ret = new List <clsOddsSanrentan>();

            DateTime dateTime;

            JVData_Struct.JV_O6_ODDS_SANRENTAN mO6Data =
                new JVData_Struct.JV_O6_ODDS_SANRENTAN();

            mO6Data.SetDataB(ref retbuff);
            dateTime = DateTime.Parse(
                (mO6Data.id.Year +
                 mO6Data.id.MonthDay).Insert(4, "/").Insert(7, "/"));
            if (dateTime > DateTime.Parse(strDateTarg.Insert(4, "/").Insert(7, "/")))
            {
                return(null);
            }

            string strJyo = JyoCord(mO6Data.id.JyoCD);

            if (!(strDateTarg == mO6Data.id.Year + mO6Data.id.MonthDay &&
                  placeTarg == strJyo &&
                  mO6Data.id.RaceNum == racenumTarg))
            {
                return(null);
            }

            for (int i = 0; i < 4896; i++)
            {
                if (mO6Data.OddsSanrentanInfo[i].Kumi.Trim() == "" ||
                    mO6Data.OddsSanrentanInfo[i].Odds.Trim() == "" ||
                    mO6Data.OddsSanrentanInfo[i].Odds.Contains("-") ||
                    mO6Data.OddsSanrentanInfo[i].Odds.Contains("*"))
                {
                    continue;
                }
                if (int.Parse(mO6Data.OddsSanrentanInfo[i].Odds) == 0)
                {
                    continue;
                }
                clsOddsSanrentan cOddsSanrentan = new clsOddsSanrentan();
                cOddsSanrentan.Kumi          = mO6Data.OddsSanrentanInfo[i].Kumi;
                cOddsSanrentan.Umaban1       = int.Parse(mO6Data.OddsSanrentanInfo[i].Kumi.Substring(0, 2));
                cOddsSanrentan.Umaban2       = int.Parse(mO6Data.OddsSanrentanInfo[i].Kumi.Substring(2, 2));
                cOddsSanrentan.Umaban3       = int.Parse(mO6Data.OddsSanrentanInfo[i].Kumi.Substring(4, 2));
                cOddsSanrentan.OddsSanrentan = (double)int.Parse(mO6Data.OddsSanrentanInfo[i].Odds) / 10;
                ret.Add(cOddsSanrentan);
            }

            return(ret);
        }