コード例 #1
0
        public decimal updateLiveOkoo()
        {
            DataTable dt = OkooHtml.GetTableOutHtml();
            using (DataClassesMatchDataContext match = new DataClassesMatchDataContext())
            {
                var ll = match.live_okoo.Where(e => e.live_okoo_id > 0);
                match.live_okoo.DeleteAllOnSubmit(ll);//更新后删除
                match.SubmitChanges();

                foreach (DataRow aa in dt.Rows)
                {
                    if (HtmlTextToStr(aa[15].ToString()) != null)
                    {
                        live_okoo lo = new live_okoo();
                        lo.value = HtmlValueToInt(aa[0].ToString());
                        lo.LeagueName = HtmlTextToStr(aa[1].ToString());
                        lo.match_time = HtmlTextToStr(aa[2].ToString());
                        lo.MatchOrder1_HomeName = TeamName(aa[3].ToString());
                        lo.MatchOrder1_HandicapNumber = HtmlTextToStr(aa[4].ToString());
                        lo.MatchOrder1_AwayName = TeamName(aa[5].ToString());
                        lo.ok_1_0 = HtmlTextToStr(aa[6].ToString());
                        lo.ok_1_1 = HtmlTextToStr(aa[7].ToString());
                        lo.ok_1_2 = HtmlTextToStr(aa[8].ToString());
                        lo.MatchInfo = HtmlTextToStr(aa[11].ToString());
                        lo.Match_1_Win = HtmlTextToStr(aa[12].ToString());
                        lo.Match_1_Drawn = HtmlTextToStr(aa[13].ToString());
                        lo.Match_1_Lost = HtmlTextToStr(aa[14].ToString());

                        match.live_okoo.InsertOnSubmit(lo);
                        match.SubmitChanges();
                    }
                }
                return match.live_okoo.Max(e => e.live_okoo_id);
            }
        }
コード例 #2
0
 partial void Deletelive_okoo(live_okoo instance);
コード例 #3
0
 partial void Updatelive_okoo(live_okoo instance);
コード例 #4
0
 partial void Insertlive_okoo(live_okoo instance);