Exemple #1
0
        private void btn_compute_Click(object sender, EventArgs e)
        {
            string win  = txt_win.Text;
            string draw = txt_draw.Text;
            string lose = txt_lose.Text;

            if (cb_usa.Checked)
            {
                win  = AnalyseTool.convert_ameriaca_odd(win);
                draw = AnalyseTool.convert_ameriaca_odd(draw);
                lose = AnalyseTool.convert_ameriaca_odd(lose);
            }
            if (cb_eng.Checked)
            {
                win  = AnalyseTool.convert_english_odd(win);
                draw = AnalyseTool.convert_english_odd(draw);
                lose = AnalyseTool.convert_english_odd(lose);
            }

            if (string.IsNullOrEmpty(win) || string.IsNullOrEmpty(draw))
            {
                return;
            }

            if (!string.IsNullOrEmpty(sb.ToString()))
            {
                sb.AppendLine("----------------------------------------------");
            }

            if (cb_usa.Checked || cb_eng.Checked)
            {
                sb.AppendLine("ODD".PR(15) + txt_win.Text.PR(10) + txt_draw.Text.PR(10) + txt_lose.Text.PR(10));
            }
            BsonDocument doc_odd = new BsonDocument();

            if (!string.IsNullOrEmpty(lose))
            {
                doc_odd = AnalyseTool.get_odd_doc_from_europe(win, draw, lose);
                sb.AppendLine("ODD".PR(15) + doc_odd["win"].PR(10) + doc_odd["draw"].PR(10) + doc_odd["lose"].PR(10));
                sb.AppendLine("PERSENT".PR(15) + doc_odd["persent_win"].PR(10) + doc_odd["persent_draw"].PR(10) + doc_odd["persent_lose"].PR(10));
                sb.AppendLine("RETURN PESENT:".PR(15) + doc_odd["persent_return"].PR(10));
            }
            else
            {
                doc_odd = AnalyseTool.get_odd_doc_from_europe(win, draw);
                sb.AppendLine("ODD".PR(15) + doc_odd["home"].PR(10) + doc_odd["away"].PR(10));
                sb.AppendLine("PERSENT".PR(15) + doc_odd["persent_home"].PR(10) + doc_odd["persent_away"].PR(10));
                sb.AppendLine("RETURN PESENT:".PR(15) + doc_odd["persent_return"].PR(10));
            }
            this.txt_result.Text = sb.ToString();
        }
Exemple #2
0
        private void btn_compute_Click(object sender, EventArgs e)
        {
            string win1  = txt_win_1.Text;
            string draw1 = txt_draw_1.Text;
            string lose1 = txt_lose_1.Text;

            if (cb_usa_1.Checked)
            {
                win1  = AnalyseTool.convert_ameriaca_odd(win1);
                draw1 = AnalyseTool.convert_ameriaca_odd(draw1);
                lose1 = AnalyseTool.convert_ameriaca_odd(lose1);
            }
            if (cb_eng_1.Checked)
            {
                win1  = AnalyseTool.convert_english_odd(win1);
                draw1 = AnalyseTool.convert_english_odd(draw1);
                lose1 = AnalyseTool.convert_english_odd(lose1);
            }

            string win2  = txt_win_2.Text;
            string draw2 = txt_draw_2.Text;
            string lose2 = txt_lose_2.Text;

            if (cb_usa_2.Checked)
            {
                win2  = AnalyseTool.convert_ameriaca_odd(win2);
                draw2 = AnalyseTool.convert_ameriaca_odd(draw2);
                lose2 = AnalyseTool.convert_ameriaca_odd(lose2);
            }
            if (cb_eng_2.Checked)
            {
                win2  = AnalyseTool.convert_english_odd(win2);
                draw2 = AnalyseTool.convert_english_odd(draw2);
                lose2 = AnalyseTool.convert_english_odd(lose2);
            }

            string win  = win1;
            string draw = draw1;
            string lose = lose1;

            if (Convert.ToDecimal(win2) > Convert.ToDecimal(win))
            {
                win = win2;
            }
            if (Convert.ToDecimal(draw2) > Convert.ToDecimal(win))
            {
                draw = draw2;
            }
            if (Convert.ToDecimal(lose2) > Convert.ToDecimal(lose))
            {
                lose = lose2;
            }


            if (string.IsNullOrEmpty(win) || string.IsNullOrEmpty(draw) || string.IsNullOrEmpty(lose))
            {
                return;
            }

            BsonDocument doc_odd1 = AnalyseTool.get_odd_doc_from_europe(win1, draw1, lose1);
            BsonDocument doc_odd2 = AnalyseTool.get_odd_doc_from_europe(win2, draw2, lose2);
            BsonDocument doc_odd  = AnalyseTool.get_odd_doc_from_europe(win, draw, lose);

            if (!string.IsNullOrEmpty(sb.ToString()))
            {
                sb.AppendLine("=================================================");
            }


            sb.AppendLine("-----------ONE");
            if (cb_usa_1.Checked)
            {
                sb.AppendLine("USA".PR(15) + txt_win_1.Text.PR(10) + txt_draw_1.Text.PR(10) + txt_lose_1.Text.PR(10));
            }
            if (cb_eng_1.Checked)
            {
                sb.AppendLine("ENG".PR(15) + txt_win_1.Text.PR(10) + txt_draw_1.Text.PR(10) + txt_lose_1.Text.PR(10));
            }
            sb.AppendLine("ODD".PR(15) + doc_odd1["win"].PR(10) + doc_odd1["draw"].PR(10) + doc_odd1["lose"].PR(10));
            sb.AppendLine("PERSENT".PR(15) + doc_odd1["persent_win"].PR(10) + doc_odd1["persent_draw"].PR(10) + doc_odd1["persent_lose"].PR(10));
            sb.AppendLine("RETURN PESENT:".PR(15) + doc_odd1["persent_return"].PR(10));


            sb.AppendLine("-----------TWO");
            if (cb_usa_2.Checked)
            {
                sb.AppendLine("USA".PR(15) + txt_win_2.Text.PR(10) + txt_draw_2.Text.PR(10) + txt_lose_2.Text.PR(10));
                sb.AppendLine("".PR(15) + win2.PR(10) + draw2.PR(10) + lose2.PR(10));
            }
            if (cb_eng_2.Checked)
            {
                sb.AppendLine("ENG".PR(15) + txt_win_2.Text.PR(10) + txt_draw_2.Text.PR(10) + txt_lose_2.Text.PR(10));
                sb.AppendLine("".PR(15) + win2.PR(10) + draw2.PR(10) + lose2.PR(10));
            }
            sb.AppendLine("ODD".PR(15) + doc_odd2["win"].PR(10) + doc_odd2["draw"].PR(10) + doc_odd2["lose"].PR(10));
            sb.AppendLine("PERSENT".PR(15) + doc_odd2["persent_win"].PR(10) + doc_odd2["persent_draw"].PR(10) + doc_odd2["persent_lose"].PR(10));
            sb.AppendLine("RETURN PESENT:".PR(15) + doc_odd2["persent_return"].PR(10));


            sb.AppendLine("-----------ALL");
            sb.AppendLine("ODD".PR(15) + doc_odd["win"].PR(10) + doc_odd["draw"].PR(10) + doc_odd["lose"].PR(10));
            sb.AppendLine("PERSENT".PR(15) + doc_odd["persent_win"].PR(10) + doc_odd["persent_draw"].PR(10) + doc_odd["persent_lose"].PR(10));
            sb.AppendLine("RETURN PESENT:".PR(15) + doc_odd["persent_return"].PR(10));

            this.txt_result.Text = sb.ToString();
        }
Exemple #3
0
    public string get_event_with_detail(string html)
    {
        StringBuilder sb = new StringBuilder();

        //-------------------------------------------
        html = html.Replace("<thead=\"\"", "");

        HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
        doc.LoadHtml(html);

        HtmlNodeCollection nodes_all = doc.DocumentNode.SelectNodes(@"//*");
        List <HtmlNode>    nodes     = new List <HtmlNode>();

        ArrayList list_lg = new ArrayList();
        string    league  = "";

        string   start_time = "";
        string   host       = "";
        string   client     = "";
        string   win        = "";
        string   draw       = "";
        string   lose       = "";
        string   date       = "";
        string   time       = "";
        string   zone       = "";
        string   event_id   = "";
        DateTime dt_time    = DateTime.Now;

        foreach (HtmlNode node in nodes_all)
        {
            zone = "8";
            if (node.Id == "timer")
            {
                //02.09.14, 14:47 (GMT+1)
                string   timer    = node.InnerText.E_TRIM();
                DateTime dt_timer = new DateTime(Convert.ToInt16("20" + timer.Substring(6, 2)), Convert.ToInt16(timer.Substring(3, 2)), Convert.ToInt16(timer.Substring(0, 2)),
                                                 Convert.ToInt16(timer.Substring(9, 2)), Convert.ToInt16(timer.Substring(12, 2)), 0);
                TimeSpan span = DateTime.Now - dt_timer;
                zone = (8 - Math.Round(span.TotalHours)).ToString();
            }

            if (node.Id == "container_EVENTS")
            {
                HtmlNodeCollection nodes_div = node.SELECT_NODES("/div");
                foreach (HtmlNode node_div in nodes_div)
                {
                    if (node_div.Id.Contains("container"))
                    {
                        league = node_div.SELECT_NODE("div[1]/h2[1]").InnerText.E_REMOVE();

                        HtmlNode           test        = node_div.SELECT_NODE("div[2]/div[1]/table[1]");
                        HtmlNodeCollection nodes_table = node_div.SELECT_NODES("div[2]/div[1]/table[1]/tbody");
                        if (nodes_table == null)
                        {
                            continue;
                        }
                        foreach (HtmlNode node_table in nodes_table)
                        {
                            if (node_table.Id.Contains("event"))
                            {
                                event_id = node_table.Id.Replace("event_", "");
                                date     = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[2]").InnerText.E_TRIM();
                                date     = date.Replace("2015", "");
                                if (date.Length == 10)
                                {
                                    start_time = Tool.get_12m_from_eng(date.Substring(2, 3)) + "-" + date.Substring(0, 2) + "●" + date.Substring(5, 5);
                                }
                                if (date.Length == 5)
                                {
                                    start_time = dt_time.ToString("MM-dd") + "●" + date;
                                }
                                host   = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/span[1]/div[1]").InnerText.E_REMOVE();
                                client = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/span[1]/div[2]").InnerText.E_REMOVE();

                                win  = node_table.SELECT_NODE("/tr[1]/td[2]").InnerText.E_REMOVE();
                                draw = node_table.SELECT_NODE("/tr[1]/td[3]").InnerText.E_REMOVE();
                                lose = node_table.SELECT_NODE("/tr[1]/td[4]").InnerText.E_REMOVE();
                                if (win.Contains("/"))
                                {
                                    win  = AnalyseTool.convert_english_odd(win);
                                    draw = AnalyseTool.convert_english_odd(draw);
                                    lose = AnalyseTool.convert_english_odd(lose);
                                }

                                if (!string.IsNullOrEmpty(win.E_TRIM()) && !string.IsNullOrEmpty(draw.E_TRIM()) && !string.IsNullOrEmpty(lose.E_TRIM()))
                                {
                                    sb.AppendLine(league.PR(50) + start_time.PR(20) + host.PR(30) + client.PR(30) + win.PR(10) + draw.PR(10) + lose.PR(10));
                                    //Match100Helper.insert_data("marathonbet", league, start_time, host, client, win, draw, lose, "1", zone);
                                }
                                MbSQL.insert_events(event_id, league, dt_time.ToString("yyyy-MM-dd HH:mm:ss"), host, client);

                                //get the detail information
                                HtmlNodeCollection nodes_tr = node_table.SELECT_NODES("tr");
                                foreach (HtmlNode node_tr in nodes_tr)
                                {
                                    if (node_tr.CLASS().Contains("market-details"))
                                    {
                                        sb.AppendLine("------------------------------------------------------------------------------------");
                                        HtmlNodeCollection nodes_block = node_tr.SELECT_NODES("/td[1]/div[2]/div[1]/div"); //block-market-wrapper
                                        foreach (HtmlNode node_block in nodes_block)
                                        {
                                            HtmlNodeCollection nodes_div1 = node_block.SELECT_NODES("/div[4]/div");
                                            if (nodes_div1 != null)
                                            {
                                                foreach (HtmlNode node_div1 in nodes_div1)
                                                {
                                                    string odd_type = node_div1.SELECT_NODE("/div[1]").InnerText.E_REMOVE();
                                                    sb.AppendLine(odd_type);
                                                    sb.AppendLine("--------------------");
                                                    HtmlNodeCollection nodes_tr1 = node_div1.SELECT_NODES("/table[1]/tbody[1]/tr");

                                                    foreach (HtmlNode node_tr1 in nodes_tr1)
                                                    {
                                                        //sb.AppendLine(node_tr1.InnerText.E_REMOVE());
                                                        HtmlNodeCollection nodes_td1 = node_tr1.SELECT_NODES("/td");
                                                        ArrayList          list      = new ArrayList();
                                                        if (nodes_td1 != null)
                                                        {
                                                            for (int i = 0; i < nodes_td1.Count; i++)
                                                            {
                                                                HtmlNodeCollection nodes_div2 = nodes_td1[i].SELECT_NODES("/div[1]/div");
                                                                if (nodes_div2 != null)
                                                                {
                                                                    for (int j = 0; j < nodes_div2.Count; j++)
                                                                    {
                                                                        sb.Append(nodes_div2[j].InnerText.E_REMOVE().PR(10));
                                                                        list.Add(nodes_div2[j].InnerText.E_REMOVE().Replace("(", "").Replace(")", "").Replace("+", ""));
                                                                    }
                                                                }
                                                            }
                                                            sb.Append(M.N);
                                                        }


                                                        if (odd_type == "To Win Match With Handicap" && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "2", "To Win Match With Handicap",
                                                                              "FULL", "", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                        if (odd_type == "To Win 1st Half With Handicap" && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "2", "To Win 1st Half With Handicap",
                                                                              "1-HALF", "", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                        if (odd_type == "To Win 2nd Half With Handicap" && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "2", "To Win 2nd Half With Handicap",
                                                                              "2-HALF", "", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                        if (odd_type == "Total Goals" && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "3", "Total Goals",
                                                                              "FULL", "", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                        if (odd_type == "Total Goals - 1st Half" && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "3", "Total Goals - 1st Half",
                                                                              "1-HALF", "", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                        if (odd_type == "Total Goals - 2nd Half" && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "3", "Total Goals - 2nd Half",
                                                                              "2-HALF", "", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                        if (odd_type.Contains("Total Goals") && odd_type.Contains(host) && !odd_type.Contains("+") && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "4", "Total Goals",
                                                                              "FULL", "HOME", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                        if (odd_type.Contains("Total Goals") && odd_type.Contains(client) && !odd_type.Contains("+") && list.Count >= 4)
                                                        {
                                                            MbSQL.insert_odds(event_id, "4", "Total Goals",
                                                                              "FULL", "AWAY", "", "", "", "",
                                                                              list[0].ToString(), list[2].ToString(), "", "", "", "",
                                                                              list[1].ToString(), list[3].ToString(), "", "", "", "");
                                                        }
                                                    }
                                                    sb.AppendLine("--------------------");
                                                }
                                            }
                                        }
                                        sb.AppendLine("------------------------------------------------------------------------------------");
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        //------------------------------------------------------
        return(sb.ToString());
    }
Exemple #4
0
        public string  from_marathonbet(string html)
        {
            StringBuilder sb = new StringBuilder();

            //-------------------------------------------
            html = html.Replace("<thead=\"\"", "");

            HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
            doc.LoadHtml(html);

            HtmlNodeCollection nodes_all = doc.DocumentNode.SelectNodes(@"//*");
            List <HtmlNode>    nodes     = new List <HtmlNode>();

            ArrayList list_lg = new ArrayList();
            string    league  = "";

            string start_time = "";
            string host       = "";
            string client     = "";
            string win        = "";
            string draw       = "";
            string lose       = "";
            string date       = "";
            string time       = "";
            string zone       = "";

            foreach (HtmlNode node in nodes_all)
            {
                zone = "8";
                if (node.Id == "timer")
                {
                    //02.09.14, 14:47 (GMT+1)
                    string   timer    = node.InnerText.E_TRIM();
                    DateTime dt_timer = new DateTime(Convert.ToInt16("20" + timer.Substring(6, 2)), Convert.ToInt16(timer.Substring(3, 2)), Convert.ToInt16(timer.Substring(0, 2)),
                                                     Convert.ToInt16(timer.Substring(9, 2)), Convert.ToInt16(timer.Substring(12, 2)), 0);
                    TimeSpan span = DateTime.Now - dt_timer;
                    zone = (8 - Math.Round(span.TotalHours)).ToString();
                }

                if (node.Id == "container_EVENTS")
                {
                    HtmlNodeCollection nodes_div = node.SELECT_NODES("/div");
                    foreach (HtmlNode node_div in nodes_div)
                    {
                        if (node_div.Id.Contains("container"))
                        {
                            league = node_div.SELECT_NODE("div[1]/h2[1]").InnerText;

                            HtmlNode           test        = node_div.SELECT_NODE("div[2]/div[1]/table[1]");
                            HtmlNodeCollection nodes_table = node_div.SELECT_NODES("div[2]/div[1]/table[1]/tbody");
                            foreach (HtmlNode node_table in nodes_table)
                            {
                                if (node_table.Id.Contains("event"))
                                {
                                    date = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[2]").InnerText.E_TRIM();
                                    date = date.Replace("2015", "");
                                    if (date.Length == 10)
                                    {
                                        start_time = Tool.get_12m_from_eng(date.Substring(2, 3)) + "-" + date.Substring(0, 2) + "●" + date.Substring(5, 5);
                                    }
                                    if (date.Length == 5)
                                    {
                                        start_time = date;
                                    }
                                    host   = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/span[1]/div[1]").InnerText;
                                    client = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/span[1]/div[2]").InnerText;

                                    win  = node_table.SELECT_NODE("/tr[1]/td[2]").InnerText.E_REMOVE();
                                    draw = node_table.SELECT_NODE("/tr[1]/td[3]").InnerText.E_REMOVE();
                                    lose = node_table.SELECT_NODE("/tr[1]/td[4]").InnerText.E_REMOVE();
                                    if (win.Contains("/"))
                                    {
                                        win  = AnalyseTool.convert_english_odd(win);
                                        draw = AnalyseTool.convert_english_odd(draw);
                                        lose = AnalyseTool.convert_english_odd(lose);
                                    }

                                    if (!string.IsNullOrEmpty(win.E_TRIM()) && !string.IsNullOrEmpty(draw.E_TRIM()) && !string.IsNullOrEmpty(lose.E_TRIM()))
                                    {
                                        sb.AppendLine(league.PR(50) + start_time.PR(20) + host.PR(30) + client.PR(30) + win.PR(10) + draw.PR(10) + lose.PR(10));
                                        Match100Helper.insert_data("marathonbet", league, start_time, host, client, win, draw, lose, "0", zone);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            //------------------------------------------------------
            return(sb.ToString());
        }
Exemple #5
0
    public string insert_event_data_new(string html)
    {
        StringBuilder sb = new StringBuilder();

        html = html.Replace("<thead=\"\"", "");
        HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
        doc.LoadHtml(html);

        HtmlNodeCollection nodes_all = doc.DocumentNode.SelectNodes(@"//*");
        List <HtmlNode>    nodes     = new List <HtmlNode>();

        ArrayList    list_lg    = new ArrayList();
        string       league     = "";
        DateTime     dt_server  = new DateTime();
        string       start_time = "";
        string       host       = "";
        string       client     = "";
        string       win        = "";
        string       draw       = "";
        string       lose       = "";
        string       date       = "";
        string       time       = "";
        string       zone       = "";
        string       event_id   = "";
        HtmlNode     node_timer = doc.DocumentNode.SELECT_NODE("/html[1]/head[1]/script[2]");
        BsonDocument doc_timer  = MongoHelper.get_doc_from_str(node_timer.InnerText.Replace("//<![CDATA[", "").Replace("//]]>>", "").Replace("initData =", ""));

        string server_time = doc_timer["serverTime"].ToString().E_TRIM();
        string zone_gmt    = doc_timer["tzPrefix"].ToString().E_TRIM();

        zone_gmt = zone_gmt.Replace("GMT", "");
        zone     = string.IsNullOrEmpty(zone_gmt) ? "0" : zone_gmt;
        string[] times = server_time.E_SPLIT(",");
        dt_server = new DateTime(Convert.ToInt16(times[0]), Convert.ToInt16(times[1]), Convert.ToInt16(times[2]), Convert.ToInt16(times[3]), Convert.ToInt16(times[4]), Convert.ToInt16(times[5]));
        //TimeSpan span = DateTime.Now - dt_server;
        //zone = (8 - Math.Round(span.TotalHours)).ToString();

        foreach (HtmlNode node in nodes_all)
        {
            if (node.Id == "container_EVENTS")
            {
                HtmlNodeCollection nodes_div = node.SELECT_NODES("/div");
                foreach (HtmlNode node_div in nodes_div)
                {
                    if (node_div.Id.Contains("container"))
                    {
                        league = node_div.SELECT_NODE("div[1]/h2[1]").InnerText;

                        HtmlNode           test        = node_div.SELECT_NODE("div[2]/div[1]/table[1]");
                        HtmlNodeCollection nodes_table = node_div.SELECT_NODES("div[2]/div[1]/table[1]/tbody");
                        foreach (HtmlNode node_table in nodes_table)
                        {
                            if (node_table.Id.Contains("event"))
                            {
                                event_id = node_table.Id.Replace("event_", "");
                                date     = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tr[1]/td[2]").InnerText.E_TRIM();
                                date     = date.Replace("2015", "");
                                if (date.Length == 10)
                                {
                                    start_time = dt_server.ToString("yyyy-") + Tool.get_12m_from_eng(date.Substring(2, 3)) + "-" + date.Substring(0, 2) + " " + date.Substring(5, 5);
                                }
                                if (date.Length == 5)
                                {
                                    start_time = dt_server.ToString("yyyy-") + dt_server.ToString("MM-dd") + " " + date;
                                }
                                DateTime dt_time = Convert.ToDateTime(start_time);
                                dt_time = dt_time.AddHours(Convert.ToInt16(zone) * (-1));

                                host   = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tr[1]/td[1]/span[1]/div[1]").InnerText;
                                client = node_table.SELECT_NODE("/tr[1]/td[1]/table[1]/tr[1]/td[1]/span[1]/div[2]").InnerText;

                                win  = node_table.SELECT_NODE("/tr[1]/td[2]").InnerText.E_REMOVE();
                                draw = node_table.SELECT_NODE("/tr[1]/td[3]").InnerText.E_REMOVE();
                                lose = node_table.SELECT_NODE("/tr[1]/td[4]").InnerText.E_REMOVE();
                                if (win.Contains("/"))
                                {
                                    win  = AnalyseTool.convert_english_odd(win);
                                    draw = AnalyseTool.convert_english_odd(draw);
                                    lose = AnalyseTool.convert_english_odd(lose);
                                }

                                if (!string.IsNullOrEmpty(win.E_TRIM()) && !string.IsNullOrEmpty(draw.E_TRIM()) && !string.IsNullOrEmpty(lose.E_TRIM()))
                                {
                                    sb.AppendLine(event_id.PR(10) + league.PR(50) + dt_time.ToString("yyyy-MM-dd HH:mm:ss").PR(20) + host.PR(30) + client.PR(30) + win.PR(10) + draw.PR(10) + lose.PR(10));
                                    Match100Helper.insert_data("marathonbet", league, start_time, host, client, win, draw, lose, "0", zone);
                                    MbSQL.insert_events(event_id, league.E_TRIM(), dt_time.ToString("yyyy-MM-dd HH:mm:ss"), host, client);
                                    ;
                                }
                            }
                        }
                    }
                }
            }
        }
        return(sb.ToString());
    }