public decimal InsertLiveHtmlTableToDB()
        {
            DataTable dt = SevenmLive.GetHtmlTable();

            DataClassesMatchDataContext match = new DataClassesMatchDataContext(Conn.conn);

            var result = match.Live_Table.Where(r => r.Live_table_id > 0);
            match.Live_Table.DeleteAllOnSubmit(result);
            match.SubmitChanges();

            string ddate = null;
            Queue<string> todayDate = new Queue<string>();

            foreach (DataRow aa in dt.Rows)
            {
                if (HtmlDateToStrLive(aa[1].ToString()) != null)
                {
                    if (HtmlDateToStrLive(aa[1].ToString()).IndexOf("最新賽果") == -1)
                    {
                        ddate = HtmlDateToStrLive(aa[1].ToString());
                        ddate = ddate.Replace("年", "-").Replace("月", "-").Replace("日", " ");
                        todayDate.Enqueue(ddate);
                    }
                    else
                    {
                        ddate = todayDate.Dequeue();
                    }
                }

                if (HtmlTextToStr(aa[3].ToString()) != null)
                {
                    Live_Table lt = new Live_Table();
                    lt.Html_position = aa[0].ToString();
                    lt.Match_type = HtmlTextToStr(aa[2].ToString());
                    lt.S_time = HtmlTextToStr(aa[3].ToString());
                    lt.Home_team = HtmlTextToStr(aa[5].ToString());
                    lt.Full_time_score = HtmlTextToStr(aa[6].ToString());
                    lt.Away_team = HtmlTextToStr(aa[7].ToString());
                    lt.Half_time_score = HtmlTextToStr(aa[8].ToString());
                    lt.S_date = ddate;
                    lt.Home_team_big = HtmlHrefToStr(aa[5].ToString());
                    lt.Away_team_big = HtmlHrefToStr(aa[7].ToString());

                    match.Live_Table.InsertOnSubmit(lt);
                    match.SubmitChanges();
                    
                }
            }
            
            return match.Live_Table.Select(e => e.Live_table_id).Max();
        }
 partial void UpdateLive_Table(Live_Table instance);
 partial void DeleteLive_Table(Live_Table instance);
 partial void InsertLive_Table(Live_Table instance);