public static Hashtable GetHashTableIdMark(List <objMatch> Odd_SboList, List <objMatch> Odd_IbetList) { Hashtable Output = new Hashtable(); foreach (objMatch Odd_Sbo in Odd_SboList) { foreach (objMatch Odd_Ibet in Odd_IbetList) { if (Convert.ToDateTime(Odd_Sbo.TimeNonLive) < Convert.ToDateTime(Odd_Ibet.TimeNonLive)) { continue; } if (UtilSoccer.ChuanTenLeauge_Sbo(Odd_Sbo.LeaugeName) == UtilSoccer.ChuanTenLeauge_Ibet(Odd_Ibet.LeaugeName)) { if (UtilSoccer.ChuanTenTeam_Sbo(Odd_Sbo.HomeName) == UtilSoccer.ChuanTenTeam_Ibet(Odd_Ibet.HomeName) && UtilSoccer.ChuanTenTeam_Sbo(Odd_Sbo.AwayName) == UtilSoccer.ChuanTenTeam_Ibet(Odd_Ibet.AwayName)) { if (UtilSoccer.formatHdp(Odd_Sbo.hdp) == UtilSoccer.formatHdp(Odd_Ibet.hdp) && Odd_Sbo.BetType == Odd_Ibet.BetType) { Output.Add(Odd_Sbo.IdKeo, Odd_Ibet.IdKeo); break; } } } } } return(Output); }
private void UpdateStringLive() { lstSboLiveBet.Clear(); string DataOddSboLive = http.Fetch(mainLink + "/web-root/restricted/odds-display/today-data.aspx?od-param=2,1,1,1,2,2,2,2,3,1&fi=0&v=0&dl=3", HttpHelper.HttpMethod.Get, null, null); DataOddSboLive = DataOddSboLive.Replace("\\u200C", ""); string leagueDataLive = "[" + Util.GetSubstringByString(DataOddSboLive, "[[[", "]],[[") + "]"; leagueDataLive = leagueDataLive.Replace("],[", "]\n["); hsLeague.Clear(); foreach (string league in leagueDataLive.Split('\n')) { string leagueTemp = league.Replace("[", "").Replace("]", "").Replace("'", ""); string nameleagueTemp = UtilSoccer.ChuanTenLeauge_Sbo(leagueTemp.Split(',')[1]); if (nameleagueTemp.IndexOf("SPECIFIC") != -1 || nameleagueTemp.IndexOf("CORNERS") != -1 || nameleagueTemp.IndexOf("BOOKING") != -1 || nameleagueTemp.IndexOf("FANTASY MATCH") != -1 || nameleagueTemp.IndexOf("WHICH TEAM") != -1 || nameleagueTemp.IndexOf("TOTAL GOALS") != -1 || nameleagueTemp.IndexOf("INJURY") != -1 || nameleagueTemp.IndexOf("WINNER") != -1) { continue; } hsLeague.Add(leagueTemp.Split(',')[0], nameleagueTemp); } string matchDataLive = "[" + Util.GetSubstringByString(DataOddSboLive, "]],[[", "]],[[") + "]"; matchDataLive = matchDataLive.Replace("],[", "]\n["); hsMatch.Clear(); foreach (string matchLive in matchDataLive.Split('\n')) { string matchTempLive = matchLive.Replace("[", "").Replace("]", "").Replace("'", ""); string[] arr_matchTempLive = matchTempLive.Split(','); string idmatchLive = Util.GetSubstringByStringLast(DataOddSboLive, "[", "," + arr_matchTempLive[0]); try { hsMatch.Add(idmatchLive, hsLeague[arr_matchTempLive[2]].ToString() + "," + arr_matchTempLive[3] + "," + arr_matchTempLive[4] + "," + arr_matchTempLive[7]); } catch { continue; } } string oddDataLive = "[[" + Util.GetSubstringByString(DataOddSboLive, ",,[[", "]]],,") + "]]]"; foreach (string OddTempLive in oddDataLive.Split(new string[] { "]],[" }, StringSplitOptions.None)) { objMatch OddLive = new objMatch(); string OddTemp = OddTempLive.Replace("[", "").Replace("]", "").Replace("'", ""); string[] arr_OddTemp = OddTemp.Split(','); string infomatch = ""; try { infomatch = hsMatch[arr_OddTemp[1]].ToString(); } catch { continue; } OddLive.LeaugeName = UtilSoccer.ChuanTenLeauge_Sbo(infomatch.Split(',')[0]); OddLive.HomeName = UtilSoccer.ChuanTenTeam_Sbo(infomatch.Split(',')[1]); OddLive.AwayName = UtilSoccer.ChuanTenTeam_Sbo(infomatch.Split(',')[2]); OddLive.TimeLive = infomatch.Split(',')[3]; OddLive.IdKeo = arr_OddTemp[0]; OddLive.hdp = UtilSoccer.formatHdp(arr_OddTemp[5]); OddLive.BetType = arr_OddTemp[2]; OddLive.Odd1 = arr_OddTemp[6]; OddLive.Odd2 = arr_OddTemp[7]; lstSboLiveBet.Add(OddLive); } }