/// <summary> /// 同步比分赔率数据 /// </summary> public void SysnMatchScore() { ISearch search = new MatchScoreSearch(); var match = (MatchScoreDate)search.Process(); if (match != null && match.data.Count > 0) { foreach (Data.FootballGameModel.MatchScore.data item in match.data) { var tt1 = new BaseBLL <tblMatchScorecrs>().FirstOrDefault(x => x.id.Equals(item.id)); if (tt1 != null) { tt1.s1 = item.crs.s1; tt1.s2 = item.crs.s2; tt1.s3 = item.crs.s3; tt1.s4 = item.crs.s4; tt1.s5 = item.crs.s5; tt1.s6 = item.crs.s6; tt1.s7 = item.crs.s7; tt1.s8 = item.crs.s8; tt1.s9 = item.crs.s9; tt1.s10 = item.crs.s10; tt1.s11 = item.crs.s11; tt1.s12 = item.crs.s12; tt1.s13 = item.crs.s13; tt1.s14 = item.crs.s14; tt1.s15 = item.crs.s15; tt1.s16 = item.crs.s16; tt1.s17 = item.crs.s17; tt1.s18 = item.crs.s18; tt1.s19 = item.crs.s19; tt1.s20 = item.crs.s20; tt1.s21 = item.crs.s21; tt1.s22 = item.crs.s22; tt1.s23 = item.crs.s23; tt1.s24 = item.crs.s24; tt1.s25 = item.crs.s25; tt1.s26 = item.crs.s26; tt1.s27 = item.crs.s27; tt1.s28 = item.crs.s28; tt1.s29 = item.crs.s29; tt1.s30 = item.crs.s30; tt1.s31 = item.crs.s31; tt1.o_type = item.crs.o_type; tt1.single = item.crs.single; tt1.fixedodds = item.crs.fixedodds; } else { new BaseBLL <tblMatchScorecrs>().AddEntity(new tblMatchScorecrs { id = item.id, s1 = item.crs.s1, s2 = item.crs.s2, s3 = item.crs.s3, s4 = item.crs.s4, s5 = item.crs.s5, s6 = item.crs.s6, s7 = item.crs.s7, s8 = item.crs.s8, s9 = item.crs.s9, s10 = item.crs.s10, s11 = item.crs.s11, s12 = item.crs.s12, s13 = item.crs.s13, s14 = item.crs.s14, s15 = item.crs.s15, s16 = item.crs.s16, s17 = item.crs.s17, s18 = item.crs.s18, s19 = item.crs.s19, s20 = item.crs.s20, s21 = item.crs.s21, s22 = item.crs.s22, s23 = item.crs.s23, s24 = item.crs.s24, s25 = item.crs.s25, s26 = item.crs.s26, s27 = item.crs.s27, s28 = item.crs.s28, s29 = item.crs.s29, s30 = item.crs.s30, s31 = item.crs.s31, o_type = item.crs.o_type, single = item.crs.single, fixedodds = item.crs.fixedodds }); } } } }
private bool ExportToExcel(System.Web.HttpResponse response, Dictionary <string, string> queryDic, string fileName, string sheetName, List <string[]> renameList) { return(BaseBLL.ExportToExcel(response, fileName, sheetName, GetSqlWhere(sql, queryDic), orderStr, page, rows, renameList)); }
/// <summary> /// 同步最新赛事和胜平负赔率 /// </summary> public void SysnWinOrLose() { ISearch search = new WinOrLoseSearch(); var winOrLose = (WinOrLoseDate)search.Process(); if (winOrLose != null && winOrLose.data.Count > 0) { foreach (Data.FootballGameModel.data item in winOrLose.data) { var tt = new FootballMatchBLL().GetMatchInfo(item.id); var tt1 = new BaseBLL <tblWinOrLosehad>().FirstOrDefault(x => x.id.Equals(item.id)); if (tt != null) { tt.num = item.num; tt.date = item.date; tt.time = item.time; tt.h_cn_abbr = item.h_cn_abbr; tt.a_cn_abbr = item.a_cn_abbr; tt.h_order = item.h_order; tt.a_order = item.a_order; tt.weather = item.weather; tt.temperature = item.temperature; tt.weather_pic = item.weather_pic; tt.l_cn = item.l_cn; tt.l_cn_abbr = item.l_cn; new BaseBLL <tblFootballMatch>().UpdateEntity(tt); } else { new BaseBLL <tblFootballMatch>().AddEntity(new tblFootballMatch { id = item.id, num = item.num, date = item.date, time = item.time, h_cn_abbr = item.h_cn_abbr, a_cn_abbr = item.a_cn_abbr, h_order = item.h_order, a_order = item.a_order, weather = item.weather, temperature = item.temperature, weather_pic = item.weather_pic, l_cn = item.l_cn, l_cn_abbr = item.l_cn_abbr }); } if (tt1 != null) { tt1.a = item.had.a; tt1.d = item.had.d; tt1.h = item.had.h; tt1.o_type = item.had.o_type; tt1.single = item.had.single; tt1.fixedodds = item.had.fixedodds; tt1.b = item.hhad.a; tt1.e = item.hhad.d; tt1.i = item.hhad.h; tt1.ro_type = item.hhad.o_type; tt1.rsingle = item.hhad.single; tt1.rfixedodds = item.hhad.fixedodds; new BaseBLL <tblWinOrLosehad>().UpdateEntity(tt1); } else { new BaseBLL <tblWinOrLosehad>().AddEntity(new tblWinOrLosehad { id = item.id, a = item.had != null ?item.had.a:"", d = item.had != null ? item.had.d : "", h = item.had != null ? item.had.h : "", o_type = item.had != null ? item.had.o_type : "", single = item.had != null ? item.had.single : "", fixedodds = item.had != null ? item.had.fixedodds : "", b = item.hhad.a, e = item.hhad.d, i = item.hhad.h, ro_type = item.hhad.o_type, rsingle = item.hhad.single, rfixedodds = item.hhad.fixedodds }); } } } }
private string GetEasyUIJson(Dictionary <string, string> queryDic) { return(BaseBLL.GetEasyUIJson(GetSqlWhere(sql, queryDic), orderStr, page, rows)); }