private void RequestCompleteTicketFromAgent(IAsyncResult result1) { try { int num2 = 0; int num3 = 0; string str11 = ""; string str12 = ""; string str9 = ""; string str7 = ""; string str3 = ""; string inputStr = ""; string str4 = ""; string str6 = ""; string str13 = ""; ArrayList list = new ArrayList(); string str14 = ""; string str = ""; int num = 0; WebRequestStateEx2 asyncState = (WebRequestStateEx2) result1.AsyncState; WebRequest request = asyncState.get_Request(); int num4 = 0; string str15 = null; str13 = CommonFunction.ConvertWebRequestToString(request, ref num4, ref str15); if (this.IsLoggedOut(ref str13)) { base._isLoginSuccess = false; throw new Exception("Get Ticket Failed, Account Logged Out!"); } this.WriteProgramLogger("Get SingBet Ticket Complete. (" + DateTime.Now.Subtract(base._datTicketStart).TotalMilliseconds.ToString() + "ms)"); this.WriteBetlistLogger("Ticket: " + str13 + "\r\nActually selected: " + asyncState.get_MatchBetParentSite().get_SelectedMatch()); this.ExtractInfoFromTicket(str13, asyncState.get_BetType(), ref str11, ref str12, ref str9, ref str4, ref str3, ref str7, ref inputStr, ref str6, ref num2, ref num3, ref str, ref list); this.WriteProgramLogger("Odds : " + str7); MatchBetNew item = new MatchBetNew(); item.set_League(str4); item.set_SelectedMatch(str9); item.set_HDP(str3); item.set_OddsString(str7); item.set_MaxBetAmount(inputStr); item.set_HomeColor(asyncState.get_MatchBetParentSite().get_HomeColor()); item.set_AwayColor(asyncState.get_MatchBetParentSite().get_AwayColor()); item.set_BetCoverage(asyncState.get_MatchBetParentSite().get_BetCoverage()); item.set_BetType(asyncState.get_MatchBetParentSite().get_BetType()); item.set_BetFollowMethod(asyncState.get_MatchBetParentSite().get_BetFollowMethod()); item.set_ID(asyncState.get_MatchBetParentSite().get_ID()); item.set_MemberName(asyncState.get_MatchBetParentSite().get_MemberName()); item.set_OddsType(base._objBetOddsType); if (asyncState.get_MatchChildSite().get_AwayName().ToUpper() == str12.ToUpper()) { item.set_HomeName(str11); item.set_HomeScore(num2); item.set_AwayName(str12); item.set_AwayScore(num3); } else { item.set_HomeName(str12); item.set_HomeScore(num3); item.set_AwayName(str11); item.set_AwayScore(num2); } if (asyncState.get_BetAmount() == Conversions.ToDouble("-1")) { item.set_BetAmount(inputStr); } else { item.set_BetAmount(Conversions.ToString(asyncState.get_BetAmount())); } if (Conversion.Val(item.get_BetAmount()) > Conversion.Val(inputStr)) { item.set_BetAmount(inputStr); } if (Conversion.Val(item.get_BetAmount()) > base._intMaxBetLimiter) { item.set_BetAmount(Conversions.ToString(base._intMaxBetLimiter)); } if (base._isAutoAdjustToMinBetAmount && (Conversion.Val(item.get_BetAmount()) < Conversion.Val(str6))) { item.set_BetAmount(str6); } item.set_BetAmount(Conversions.ToString(Conversion.Int(Conversion.Val(item.get_BetAmount())))); if (asyncState.get_BetType() == EnumCollection.eBetType.HDP) { str14 = Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(("gold=" + item.get_BetAmount() + "&uid=") + this._strUID + "&active=", list[1]), "&strong="), list[2]), "&line_type="), list[3]), "&gid="), list[4]), "&type="), list[5]), "&gnum="), list[6]), "&concede_r="), list[7]), "&radio_r="), list[8]), "&ioradio_r_h="), list[9]), "&gmax_single="), list[10]), "&gmin_single="), list[11]), "&singlecredit="), list[12]), "&singleorder="), list[13]), "&restsinglecredit="), list[14]), "&wagerstotal="), list[15]), "&restcredit="), list[0x10]), "&pay_type="), list[0x11]), "&odd_f_type="), list[0x12])); } else { str14 = Conversions.ToString(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(Operators.ConcatenateObject(("gold=" + item.get_BetAmount() + "&uid=") + this._strUID + "&active=", list[1]), "&line_type="), list[2]), "&gid="), list[3]), "&type="), list[4]), "&gnum="), list[5]), "&concede_h="), list[6]), "&radio_h="), list[7]), "&ioradio_r_h="), list[8]), "&gmax_single="), list[9]), "&gmin_single="), list[10]), "&singlecredit="), list[11]), "&singleorder="), list[12]), "&restsinglecredit="), list[13]), "&wagerstotal="), list[14]), "&restcredit="), list[15]), "&pay_type="), list[0x10]), "&odd_f_type="), list[0x11])); } this.WriteBetlistLogger("Bet Post: " + str14); if ((asyncState.get_AgentToClientBetObj() != null) && (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt() != null)) { if (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_FollowOddsOption() == EnumCollection.eFollowOddsOption.HaltIfOddsLessThan) { if (SpiderFunction.IsOddsALessThanOddsB(item.get_Odds(), asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())) { this.WriteProgramLogger(string.Format("Odds Too Less ([{0}] < [{1}])", item.get_Odds(), asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())); item.set_Description(string.Format("Odds Too Less ([{0}] < [{1}])", item.get_Odds(), asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); return; } } else if (((asyncState.get_MatchBetParentSite().get_BetFollowMethod() == EnumCollection.eBetFollowMethod.Normal) & (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_FollowOddsOption() == EnumCollection.eFollowOddsOption.HaltIfOddsDifferentMoreThan)) && (SpiderFunction.GetOddsDiffSameSide(item.get_Odds(), asyncState.get_MatchBetParentSite().get_Odds()) > asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())) { this.WriteProgramLogger(string.Format("Odds Different Too Much ([{0}] > [{1}])", SpiderFunction.GetOddsDiffSameSide(item.get_Odds(), asyncState.get_MatchBetParentSite().get_Odds()), asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())); item.set_Description(string.Format("Odds Different Too Much ([{0}] > [{1}])", SpiderFunction.GetOddsDiffSameSide(item.get_Odds(), asyncState.get_MatchBetParentSite().get_Odds()), asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); return; } } if ((asyncState.get_MatchBetParentSite().get_HomeScore() == item.get_HomeScore()) & (asyncState.get_MatchBetParentSite().get_AwayScore() == item.get_AwayScore())) { if (!base._isPerMatchLimitEnabled | (base._isPerMatchLimitEnabled & base._objPerMatchLimitList.IsCanBet(item, (int) Math.Round(Conversion.Val(item.get_BetAmount())), ref num))) { if (num < Conversion.Val(item.get_BetAmount())) { item.set_BetAmount(num.ToString()); } this.RaiseEventGetTicketComplete(base._strName, true, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), item); if (base._isAutoBetting) { if (base._isToTrySimilarHDP | (!base._isToTrySimilarHDP & (asyncState.get_MatchBetParentSite().get_HDP() == str3))) { this.WriteProgramLogger("Can Bet SingBet."); this.Bet(request.RequestUri.ToString(), str14, str, item, asyncState.get_MatchParentSite(), asyncState.get_BetTarget()); } else { base._isBetting = false; this.WriteProgramLogger("Cannot Bet SingBet."); this.WriteBetlistLogger(SpiderFunction.GenerateDetailedMatchInfo(asyncState.get_MatchBetParentSite(), asyncState.get_MatchBetChildSite(), "Failed Ticket HDP/ODDS Change", "SingAgent")); item.set_Description("HDP/Odds Change"); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { base._isBetting = false; this.WriteProgramLogger("Auto Bet OFF."); item.set_Description("Auto Bet OFF."); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { base._isBetting = false; this.WriteProgramLogger("Exceed Per Match Limit!"); item.set_Description("Exceed Per Match Limit!"); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { base._isBetting = false; this.WriteProgramLogger(string.Format("Score Changed [{0}-{1}] -> [{2}-{3}]", new object[] { asyncState.get_MatchBetParentSite().get_HomeScore(), asyncState.get_MatchBetParentSite().get_AwayScore(), item.get_HomeScore(), item.get_AwayScore() })); item.set_Description(string.Format("Score Changed [{0}-{1}] -> [{2}-{3}]", new object[] { asyncState.get_MatchBetParentSite().get_HomeScore(), asyncState.get_MatchBetParentSite().get_AwayScore(), item.get_HomeScore(), item.get_AwayScore() })); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } catch (Exception exception1) { ProjectData.SetProjectError(exception1); Exception exception = exception1; base._isBetting = false; base._objErrorLogger.write(base._strName + ": EXCEPTION IN RequestCompleteTicketFromAgent: " + exception.Message); this.WriteProgramLogger(base._strName + ": EXCEPTION IN RequestCompleteTicketFromAgent: " + exception.Message); WebRequestStateEx2 ex2 = (WebRequestStateEx2) result1.AsyncState; this.RaiseEventGetTicketComplete(base._strName, true, ex2.get_BetTarget(), ex2.get_MatchParentSite(), ex2.get_MatchBetParentSite(), ex2.get_MatchChildSite(), ex2.get_MatchBetChildSite(), null); ProjectData.ClearProjectError(); } }
private void RequestCompleteTicketFromAgent(IAsyncResult result1) { try { // Michael // EnumCollection.eBetType type; EnumCollection.eBetType type = EnumCollection.eBetType.HDP; int num4 = 0; int num = 0; string str4 = ""; string str = ""; string str10 = ""; string str8 = ""; string str3 = ""; string inputStr = ""; string str7 = ""; string str5 = ""; string str12 = ""; ArrayList list = new ArrayList(); string str13 = ""; int num3 = 0; int num2 = 0; WebRequestStateEx2 asyncState = (WebRequestStateEx2)result1.AsyncState; int num5 = 0; string str14 = null; str12 = CommonFunction.ConvertWebRequestToString(asyncState.get_Request(), ref num5, ref str14); this.WriteProgramLogger("Get SBOBet Ticket Complete. (" + DateTime.Now.Subtract(base._datTicketStart).TotalMilliseconds.ToString() + "ms)"); this.WriteBetlistLogger("Ticket: " + str12); this.WriteProgramLogger("Ticket: " + str12); if(string.IsNullOrEmpty(str12) || this.IsLoggedOut(ref str12)) { throw new Exception(this._strAccountID + " has getted ticket fail."); } this.ExtractInfoFromTicket(str12, ref str4, ref str, ref str10, ref str5, ref type, ref str3, ref str8, ref inputStr, ref str7, ref num4, ref num, ref num2); this.WriteProgramLogger("Odds : " + str8); MatchBetNew item = new MatchBetNew(); item.set_Company(asyncState.get_MatchBetParentSite().get_Company()); item.set_League(str5); item.set_HomeName(str4); item.set_AwayName(str); item.set_SelectedMatch(asyncState.get_MatchBetParentSite().get_SelectedMatch()); item.HDPValue = str3; if (!string.IsNullOrEmpty(str3)) { string HDP_id = this.ConvertHDPTypeSBO(str3); item.set_HDP(HDP_id); } item.set_OddsString(str8); item.set_MaxBetAmount(inputStr); item.set_SportType(asyncState.get_MatchBetParentSite().get_SportType()); item.set_HomeColor(asyncState.get_MatchBetParentSite().get_HomeColor()); item.set_AwayColor(asyncState.get_MatchBetParentSite().get_AwayColor()); item.set_BetCoverage(asyncState.get_MatchBetParentSite().get_BetCoverage()); item.set_BetType(asyncState.get_BetType()); item.set_BetTarget(asyncState.get_BetTarget()); item.set_BetFollowMethod(asyncState.get_MatchBetParentSite().get_BetFollowMethod()); item.set_ID(asyncState.get_MatchBetParentSite().get_ID()); item.set_MemberName(asyncState.get_MatchBetParentSite().get_MemberName()); item.set_HomeScore(num4); item.set_AwayScore(num); item.set_MatchType(asyncState.get_MatchBetParentSite().get_MatchType()); item.set_MatchDate(asyncState.get_MatchBetChildSite().get_MatchDate()); item.set_OddsType(base._objBetOddsType); item.set_GameType(asyncState.get_MatchBetParentSite().get_GameType()); item.set_RunningStatus(asyncState.get_MatchBetParentSite().get_RunningStatus()); if (asyncState.get_BetAmount() == Conversions.ToDouble("-1")) { item.set_BetAmount(inputStr); } else { item.set_BetAmount(Conversions.ToString(asyncState.get_BetAmount())); } if (Conversion.Val(item.get_BetAmount()) > Conversion.Val(inputStr)) { item.set_BetAmount(inputStr); } /*** start Aorta if (Conversion.Val(item.get_BetAmount()) > base._intMaxBetLimiter) { item.set_BetAmount(Conversions.ToString(base._intMaxBetLimiter)); } if (base._isAutoAdjustToMinBetAmount && (Conversion.Val(item.get_BetAmount()) < Conversion.Val(str7))) { item.set_BetAmount(str7); }***/ item.set_BetAmount(Conversions.ToString(Conversion.Int(Conversion.Val(item.get_BetAmount())))); if (str12.Contains(".showTicket(0)")) { throw new Exception("Odds are closed or temporary not available."); } if ((asyncState.get_AgentToClientBetObj() != null) && (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt() != null)) { if (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_FollowOddsOption() == EnumCollection.eFollowOddsOption.HaltIfOddsLessThan) { if (SpiderFunction.IsOddsALessThanOddsB(item.get_Odds(), asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())) { item.set_Description(string.Format("Odds Too Less ([{0}] < [{1}])", item.get_OddsString(), asyncState.get_MatchBetParentSite().get_OddsString())); this.WriteProgramLogger(item.get_Description()); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); return; } } else if (((asyncState.get_MatchBetParentSite().get_BetFollowMethod() == EnumCollection.eBetFollowMethod.Normal) & (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_FollowOddsOption() == EnumCollection.eFollowOddsOption.HaltIfOddsDifferentMoreThan)) && (SpiderFunction.GetOddsDiffSameSide(item.get_Odds(), asyncState.get_MatchBetParentSite().get_Odds()) > asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())) { item.set_Description(string.Format("Odds Different Too Much ([{0}] > [{1}]", item.get_OddsString(), asyncState.get_MatchBetParentSite().get_OddsString())); this.WriteProgramLogger(item.get_Description()); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); return; } } base._isBetting = false; if ((asyncState.get_MatchBetParentSite().get_HomeScore() == num4) & (asyncState.get_MatchBetParentSite().get_AwayScore() == num)) { if (!base._isPerMatchLimitEnabled | (base._isPerMatchLimitEnabled & base._objPerMatchLimitList.IsCanBet(item, (int)Math.Round(Conversion.Val(item.get_BetAmount())), ref num3))) { if (num3 < Conversion.Val(item.get_BetAmount())) { item.set_BetAmount(num3.ToString()); } str13 = string.Format("stake={0}&betcount={1}&loginname={2}&stakeInAuto={3}", new object[] { item.get_BetAmount(), num2.ToString(), this._strLoginName, item.get_BetAmount() }); this.RaiseEventGetTicketComplete(base._strName, true, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), item); if (base._isAutoBetting) { if (base._isToTrySimilarHDP | (!base._isToTrySimilarHDP & (asyncState.get_MatchBetParentSite().get_HDP() == str3))) { this.WriteProgramLogger("Can Bet SBOBet.[INFO] " + str13); this.WriteBetlistLogger("Can Bet SBOBet. POST: " + str13); this.Bet(str13, item, asyncState.get_MatchChildSite(), asyncState.get_BetTarget()); } else { this.WriteProgramLogger("Cannot Bet SBOBet."); this.WriteBetlistLogger(" Cannot Bet SBOBet. POST: " + str13); this.WriteBetlistLogger(SpiderFunction.GenerateDetailedMatchInfo(asyncState.get_MatchBetParentSite(), asyncState.get_MatchBetChildSite(), "Failed Ticket HDP/ODDS Change", "SBOAgent")); item.set_Description("HDP/Odds Change"); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger("Auto Bet OFF."); item.set_Description("Auto Bet OFF."); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger("Exceed Per Match Limit!"); item.set_Description("Exceed Per Match Limit!"); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger(string.Format("Score Changed [{0}-{1}] -> [{2}-{3}]", new object[] { asyncState.get_MatchBetParentSite().get_HomeScore(), asyncState.get_MatchBetParentSite().get_AwayScore(), num4, num })); item.set_Description(string.Format("Score Changed [{0}-{1}] -> [{2}-{3}]", new object[] { asyncState.get_MatchBetParentSite().get_HomeScore(), asyncState.get_MatchBetParentSite().get_AwayScore(), num4, num })); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } catch (Exception exception1) { ProjectData.SetProjectError(exception1); Exception exception = exception1; base._isBetting = false; base._objErrorLogger.write(base._strName + ": EXCEPTION IN RequestCompleteTicketFromAgent: " + exception.Message); this.WriteProgramLogger(base._strName + ": EXCEPTION IN RequestCompleteTicketFromAgent: " + exception.Message); WebRequestStateEx2 ex2 = (WebRequestStateEx2)result1.AsyncState; this.get__objBetQueueMonitor().SaveBetInfo(exception.Message, ex2.get_MatchBetParentSite()); this.RaiseEventGetTicketComplete(base._strName, true, ex2.get_BetTarget(), ex2.get_MatchParentSite(), ex2.get_MatchBetParentSite(), ex2.get_MatchChildSite(), ex2.get_MatchBetChildSite(), null); ProjectData.ClearProjectError(); } }
private void RequestCompleteTicket(IAsyncResult result1) { try { // Michael // EnumCollection.eBetType type; EnumCollection.eBetType type = EnumCollection.eBetType.HDP; string str4 = ""; string str = ""; string str10 = ""; int num2 = 0; int num = 0; string str8 = ""; string str3 = ""; string inputStr = ""; string str5 = ""; string str12 = ""; ArrayList list = new ArrayList(); WebRequestStateEx2 asyncState = (WebRequestStateEx2) result1.AsyncState; int num3 = 0; string str14 = null; str12 = CommonFunction.ConvertWebRequestToString(asyncState.get_Request(), ref num3, ref str14); this.WriteProgramLogger("Get SB188 Ticket Complete."); str14 = Conversions.ToString((int) type); this.ExtractInfoFromTicket(str12, ref str4, ref str, ref str10, ref str5, ref str14, ref str3, ref str8, ref inputStr, ref num2, ref num); type = (EnumCollection.eBetType) Conversions.ToInteger(str14); this.WriteProgramLogger("Odds : " + str8); MatchBetNew new2 = new MatchBetNew(); new2.set_League(str5); new2.set_HomeName(str4); new2.set_AwayName(str); new2.set_SelectedMatch(str10); new2.set_HDP(str3); new2.set_OddsString(str8); new2.set_BetType(type); new2.set_BetTarget(asyncState.get_BetTarget()); new2.set_MaxBetAmount(inputStr); new2.set_HomeScore(num2); new2.set_AwayScore(num); switch (base._objBetAmountStyle) { case EnumCollection.eBetAmountStyle.Fixed: if (Conversion.Val(base._intDefaultBetAmount) <= Conversion.Val(inputStr)) { break; } new2.set_BetAmount(Conversion.Val(inputStr).ToString()); goto Label_01A7; case EnumCollection.eBetAmountStyle.MaxBet: new2.set_BetAmount(Conversion.Val(inputStr).ToString()); goto Label_01A7; default: goto Label_01A7; } new2.set_BetAmount(this._intDefaultBetAmount.ToString()); Label_01A7: if (Conversion.Val(new2.get_BetAmount()) > Conversion.Val(inputStr)) { new2.set_BetAmount(inputStr); } if (Conversion.Val(new2.get_BetAmount()) > base._intMaxBetLimiter) { new2.set_BetAmount(Conversions.ToString(base._intMaxBetLimiter)); } new2.set_BetAmount(Conversions.ToString(Conversion.Int(Conversion.Val(new2.get_BetAmount())))); base._isBetting = false; } catch (Exception exception1) { ProjectData.SetProjectError(exception1); Exception exception = exception1; base._isBetting = false; base._objErrorLogger.write(base._strName + ": EXCEPTION IN RequestCompleteTicket: " + exception.Message); this.WriteProgramLogger(base._strName + ": EXCEPTION IN RequestCompleteTicket: " + exception.Message); WebRequestStateEx2 ex2 = (WebRequestStateEx2) result1.AsyncState; this.RaiseEventGetTicketComplete(base._strName, true, ex2.get_BetTarget(), ex2.get_MatchParentSite(), ex2.get_MatchBetParentSite(), ex2.get_MatchChildSite(), ex2.get_MatchBetChildSite(), null); ProjectData.ClearProjectError(); } }
// Aorta private void RequestCompleteTicketFromAgent(IAsyncResult result1) { try { int num3 = 0; int num = 0; string str4 = ""; string str = ""; string str10 = ""; string str8 = ""; string str3 = ""; string inputStr = ""; string str5 = ""; string str7 = ""; string str2 = ""; string str11 = ""; string str9 = ""; string str12 = ""; ArrayList list = new ArrayList(); string str14 = ""; int num2 = 0; string str13 = ""; WebRequestStateEx2 asyncState = (WebRequestStateEx2)result1.AsyncState; int num4 = 0; string str16 = null; str12 = CommonFunction.ConvertWebRequestToString(asyncState.get_Request(), ref num4, ref str16); str13 = str12.ToLower(); this.WriteProgramLogger("Get IBCBet Ticket Complete. (" + Conversions.ToString(DateTime.Now.Subtract(base._datTicketStart).TotalMilliseconds) + "ms)"); this.WriteBetlistLogger("Ticket: " + str12); this.WriteProgramLogger("Ticket: " + str12); if (string.IsNullOrEmpty(str13) || this.IsLoggedOut(ref str12)) { throw new Exception(this._strAccountID + " has getted ticket fail."); } this.ExtractInfoFromTicket(str12, ref str4, ref str, ref str10, ref str5, ref str3, ref str8, ref inputStr, ref str7, ref str2, ref str9, ref str11, ref num3, ref num); this.WriteProgramLogger("IBCBet Client Odds : " + str8); if (!(str13.Contains("suspend") | str13.Contains("'close'"))) { MatchBetNew item = new MatchBetNew(); item.set_Company(asyncState.get_MatchBetParentSite().get_Company()); item.set_League(str5); item.set_HomeName(str4); item.set_AwayName(str); item.set_SelectedMatch(str10); item.HDPValue = str3; if (!string.IsNullOrEmpty(str3)) { string HDP_id = SportBookFunction.ConvertHDPType(str3); item.set_HDP(HDP_id); } item.set_OddsString(str8); item.set_MaxBetAmount(inputStr); item.set_SportType(asyncState.get_MatchBetParentSite().get_SportType()); item.set_HomeColor(asyncState.get_MatchBetParentSite().get_HomeColor()); item.set_AwayColor(asyncState.get_MatchBetParentSite().get_AwayColor()); item.set_BetCoverage(asyncState.get_MatchBetParentSite().get_BetCoverage()); item.set_BetType(asyncState.get_MatchBetParentSite().get_BetType()); item.set_BetFollowMethod(asyncState.get_MatchBetParentSite().get_BetFollowMethod()); item.set_ID(asyncState.get_MatchBetParentSite().get_ID()); item.set_MemberName(asyncState.get_MatchBetParentSite().get_MemberName()); item.set_HomeScore(num3); item.set_AwayScore(num); item.set_MatchType(asyncState.get_MatchBetParentSite().get_MatchType()); item.set_MatchDate(asyncState.get_MatchBetChildSite().get_MatchDate()); item.set_GameType(asyncState.get_MatchBetParentSite().get_GameType()); item.set_RunningStatus(asyncState.get_MatchBetParentSite().get_RunningStatus()); item.set_MatchID(asyncState.get_MatchBetChildSite().getMatchID()); item.set_IPAddress(base.ipAdress); switch (str9) { case "2": item.set_OddsType(EnumCollection.eOddsType.HK); break; case "4": item.set_OddsType(EnumCollection.eOddsType.Malay); break; } if (asyncState.get_BetAmount() == Conversions.ToDouble("-1")) { item.set_BetAmount(inputStr); } else { item.set_BetAmount(Conversions.ToString(asyncState.get_BetAmount())); } if (Conversion.Val(item.get_BetAmount()) > Conversion.Val(inputStr)) { item.set_BetAmount(inputStr); } /***** start Aorta if (Conversion.Val(item.get_BetAmount()) > base._intMaxBetLimiter) { //item.set_BetAmount(Conversions.ToString(base._intMaxBetLimiter)); } if (base._isAutoAdjustToMinBetAmount && (Conversion.Val(item.get_BetAmount()) < Conversion.Val(str7))) { item.set_BetAmount(str7); } end Aorta *****/ item.set_BetAmount(Conversions.ToString(Conversion.Int(Conversion.Val(item.get_BetAmount())))); if ((asyncState.get_AgentToClientBetObj() != null) && (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt() != null)) { if (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_FollowOddsOption() == EnumCollection.eFollowOddsOption.HaltIfOddsLessThan) { if (SpiderFunction.IsOddsALessThanOddsB(item.get_Odds(), asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())) { item.set_Description(string.Format("Odds Too Less ([{0}] < [{1}])", item.get_OddsString(), asyncState.get_MatchBetParentSite().get_OddsString())); this.WriteProgramLogger(item.get_Description()); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); return; } } else if (((asyncState.get_MatchBetParentSite().get_BetFollowMethod() == EnumCollection.eBetFollowMethod.Normal) & (asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_FollowOddsOption() == EnumCollection.eFollowOddsOption.HaltIfOddsDifferentMoreThan)) && (SpiderFunction.GetOddsDiffSameSide(item.get_Odds(), asyncState.get_MatchBetParentSite().get_Odds()) > asyncState.get_AgentToClientBetObj().get_FollowOddsOpt().get_OddsValue())) { item.set_Description(string.Format("Odds Different Too Much ([{0}] > [{1}]", item.get_OddsString(), asyncState.get_MatchBetParentSite().get_OddsString())); this.WriteProgramLogger(item.get_Description()); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); return; } } if ((asyncState.get_MatchBetParentSite().get_HomeScore() == num3) & (asyncState.get_MatchBetParentSite().get_AwayScore() == num)) { if (!base._isPerMatchLimitEnabled | (base._isPerMatchLimitEnabled & base._objPerMatchLimitList.IsCanBet(item, (int)Math.Round(Conversion.Val(item.get_BetAmount())), ref num2))) { if (num2 < Conversion.Val(item.get_BetAmount())) { item.set_BetAmount(num2.ToString()); } str14 = "BPstake=" + item.get_BetAmount() + "&stakeRequest=&oddsRequest=" + str8 + "&oddChange1=Odds+has+changed+from&oddChange2=to&MINBET=" + str7 + "&MAXBET=" + inputStr + "&bettype=" + str2 + "&lowerminmesg=Your+stake+is+lower+than+minimun+bet%21%21%21&highermaxmesg=Your+stake+is+higher+than+maximum+bet%21%21%21&areyousuremesg=Are+you+sure+you+want+process+the+bet%3F&incorrectStakeMesg=Incorrect+Stake.&oddsWarning=WARNING%21%21%21+WE+HAVE+GIVEN+A+NEW+ODDS+%26+NEW+STAKE%21%21%21&betconfirmmesg=Please+click+OK+to+confirm+the+bet%3F&siteType=&hidStake10=Stake+must+be+in+multiples+of+10&hidStake20=Stake+must+be+in+multiples+of+20&sporttype=" + str11 + "&username="******"&oddsType=" + str9; this.RaiseEventGetTicketComplete(base._strName, true, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), item); if (base._isAutoBetting) { if (base._isToTrySimilarHDP | (!base._isToTrySimilarHDP & (asyncState.get_MatchBetParentSite().get_HDP() == str3))) { this.WriteProgramLogger("Can Bet IBCBet.[INFO] " + str14); this.WriteBetlistLogger("Can Bet IBCBet. POST: " + str14); this.Bet(str14, item, asyncState.get_MatchChildSite(), asyncState.get_BetTarget()); } else { this.WriteProgramLogger("Cannot Bet IBCBet.[INFO] " + str14); this.WriteBetlistLogger(" Cannot Bet IBCBet. POST: " + str14); this.WriteBetlistLogger(SpiderFunction.GenerateDetailedMatchInfo(asyncState.get_MatchBetParentSite(), asyncState.get_MatchBetChildSite(), "Failed Ticket HDP/ODDS Change", "IBCAgent")); item.set_Description("HDP/Odds Change"); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger("Auto Bet OFF."); item.set_Description("Auto Bet OFF."); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger("Exceed Per Match Limit!"); item.set_Description("Exceed Per Match Limit!"); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger(string.Format("h Changed [{0}-{1}] -> [{2}-{3}]", new object[] { asyncState.get_MatchBetParentSite().get_HomeScore(), asyncState.get_MatchBetParentSite().get_AwayScore(), num3, num })); item.set_Description(string.Format("Score Changed [{0}-{1}] -> [{2}-{3}]", new object[] { asyncState.get_MatchBetParentSite().get_HomeScore(), asyncState.get_MatchBetParentSite().get_AwayScore(), num3, num })); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().SaveBetInfo(item.get_Description(), asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), item.get_Description()); base._isBetting = false; this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { string str15 = ""; if (str13.Contains("suspend")) { str15 = "Cannot Bet...Match Suspended!"; } else if (str13.Contains("'close'")) { str15 = "Cannot Bet...Match Closed!"; } else { str15 = "Cannot Bet...Odds is Empty!"; } base._isBetting = false; this.WriteProgramLogger(str15); this.get__objBetQueueMonitor().SaveBetInfo(str15, asyncState.get_MatchBetParentSite()); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetParentSite().get_ID(), str15); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } catch (Exception exception1) { ProjectData.SetProjectError(exception1); Exception exception = exception1; base._isBetting = false; base._objErrorLogger.write(base._strName + ": EXCEPTION IN RequestCompleteTicketFromAgent: " + exception.Message); this.WriteProgramLogger(base._strName + ": EXCEPTION IN RequestCompleteTicketFromAgent: " + exception.Message); WebRequestStateEx2 ex2 = (WebRequestStateEx2)result1.AsyncState; this.get__objBetQueueMonitor().SaveBetInfo(exception.Message, ex2.get_MatchBetParentSite()); this.RaiseEventGetTicketComplete(base._strName, true, ex2.get_BetTarget(), ex2.get_MatchParentSite(), ex2.get_MatchBetParentSite(), ex2.get_MatchChildSite(), ex2.get_MatchBetChildSite(), null); ProjectData.ClearProjectError(); } }
private void RequestCompleteTicket(IAsyncResult result1) { try { int num2 = 0; int num = 0; string str4 = ""; string str = ""; string str10 = ""; string str8 = ""; string str3 = ""; string inputStr = ""; string str5 = ""; string str7 = ""; string str2 = ""; string str11 = ""; string str9 = ""; string str12 = ""; ArrayList list = new ArrayList(); string str13 = ""; WebRequestStateEx2 asyncState = (WebRequestStateEx2)result1.AsyncState; int num3 = 0; string str14 = null; str12 = CommonFunction.ConvertWebRequestToString(asyncState.get_Request(), ref num3, ref str14); this.WriteProgramLogger("Get IBCBet Ticket Complete."); this.ExtractInfoFromTicket(str12, ref str4, ref str, ref str10, ref str5, ref str3, ref str8, ref inputStr, ref str7, ref str2, ref str9, ref str11, ref num2, ref num); this.WriteProgramLogger("IBCBet Client Odds : " + str8); MatchBetNew item = new MatchBetNew(); item.set_League(str5); item.set_HomeName(str4); item.set_AwayName(str); item.set_SelectedMatch(str10); item.set_HDP(str3); item.set_OddsString(str8); item.set_BetType(asyncState.get_BetType()); item.set_BetTarget(asyncState.get_BetTarget()); item.set_MaxBetAmount(inputStr); item.set_HomeScore(num2); item.set_AwayScore(num); switch (base._objBetAmountStyle) { case EnumCollection.eBetAmountStyle.Fixed: if (Conversion.Val(base._intDefaultBetAmount) <= Conversion.Val(inputStr)) { break; } item.set_BetAmount(Conversion.Val(inputStr).ToString()); goto Label_019F; case EnumCollection.eBetAmountStyle.MaxBet: item.set_BetAmount(Conversion.Val(inputStr).ToString()); goto Label_019F; default: goto Label_019F; } item.set_BetAmount(this._intDefaultBetAmount.ToString()); Label_019F: if (Conversion.Val(item.get_BetAmount()) > Conversion.Val(inputStr)) { item.set_BetAmount(inputStr); } if (Conversion.Val(item.get_BetAmount()) > base._intMaxBetLimiter) { item.set_BetAmount(Conversions.ToString(base._intMaxBetLimiter)); } item.set_BetAmount(Conversions.ToString(Conversion.Int(Conversion.Val(item.get_BetAmount())))); base._isBetting = false; if ((asyncState.get_MatchBetParentSite().get_HomeScore() == num2) & (asyncState.get_MatchBetParentSite().get_AwayScore() == num)) { num3 = 0; if (!base._isPerMatchLimitEnabled | (base._isPerMatchLimitEnabled & base._objPerMatchLimitList.IsCanBet(item, ref num3))) { str13 = "BPstake=" + item.get_BetAmount() + "&stakeRequest=&oddsRequest=" + str8 + "&oddChange1=Odds+has+changed+from&oddChange2=to&MINBET=" + str7 + "&MAXBET=" + inputStr + "&bettype=" + str2 + "&lowerminmesg=Your+stake+is+lower+than+minimun+bet%21%21%21&highermaxmesg=Your+stake+is+higher+than+maximum+bet%21%21%21&areyousuremesg=Are+you+sure+you+want+process+the+bet%3F&incorrectStakeMesg=Incorrect+Stake.&oddsWarning=WARNING%21%21%21+WE+HAVE+GIVEN+A+NEW+ODDS+%26+NEW+STAKE%21%21%21&betconfirmmesg=Please+click+OK+to+confirm+the+bet%3F&siteType=&hidStake10=Stake+must+be+in+multiples+of+10&hidStake20=Stake+must+be+in+multiples+of+20&sporttype=" + str11 + "&username="******"&oddsType=" + str9; this.RaiseEventGetTicketComplete(base._strName, true, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), item); if (base._isAutoBetting) { if (SpiderFunction.IsTicketValid(str12, asyncState.get_MatchBetParentSite(), item, 5.0, base._dblOddsDifferentBad, (int)Math.Round(base._dblOddsDifferentBetter))) { this.WriteProgramLogger("Can Bet IBCBet."); } else { this.WriteProgramLogger("Cannot Bet IBCBet."); this.WriteBetlistLogger(SpiderFunction.GenerateDetailedMatchInfo(asyncState.get_MatchParentSite(), asyncState.get_MatchBetChildSite(), item, asyncState.get_BetTarget(), "Failed Ticket HDP/ODDS Change", "IBCAgent")); item.set_Description("HDP/Odds Change"); base._objBetListFailed.Add(item); this.get__objBetQueueMonitor().UpdateMatchStatus(asyncState.get_MatchBetChildSite().get_ID(), "Cannot Bet IBCBet."); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger("Auto Bet OFF."); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger("Exceed Per Match Limit!"); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } else { this.WriteProgramLogger("Score Changed!"); this.RaiseEventGetTicketComplete(base._strName, false, asyncState.get_BetTarget(), asyncState.get_MatchParentSite(), asyncState.get_MatchBetParentSite(), asyncState.get_MatchChildSite(), asyncState.get_MatchBetChildSite(), null); } } catch (Exception exception1) { ProjectData.SetProjectError(exception1); Exception exception = exception1; base._isBetting = false; base._objErrorLogger.write(base._strName + ": EXCEPTION IN RequestCompleteTicket: " + exception.Message); this.WriteProgramLogger(base._strName + ": EXCEPTION IN RequestCompleteTicket: " + exception.Message); WebRequestStateEx2 ex2 = (WebRequestStateEx2)result1.AsyncState; this.RaiseEventGetTicketComplete(base._strName, true, ex2.get_BetTarget(), ex2.get_MatchParentSite(), ex2.get_MatchBetParentSite(), ex2.get_MatchChildSite(), ex2.get_MatchBetChildSite(), null); ProjectData.ClearProjectError(); } }
public MatchBetNew Clone() { MatchBetNew new3 = new MatchBetNew(); new3.set_CreateDate(this._datCreate); new3.set_SportType(this._objSportType); new3.set_MatchID(this._strMatchID); new3.set_ID(this._strID); new3.set_ID2(this._strID2); new3.set_Company(this._strCompany); new3.set_League(this._strLeague); new3.set_HomeName(this._strHomeName); new3.set_AwayName(this._strAwayName); new3.set_SelectedMatch(this._strMatchSelected); new3.set_HomeColor(this._clrHome); new3.set_AwayColor(this._clrAway); new3.set_HomeBetLink(this._strHomeBetLink); new3.set_AwayBetLink(this._strAwayBetLink); new3.set_SelectedBetLink(this._strSelectedBetLink); new3.set_MatchDate(this._strMatchDate); new3.set_BetDate(this._strBetDate); new3.set_HDP(this._strHdp); new3.set_Odds(this._dblOdds); new3.set_BetAmount(this._strAmount); new3.set_OddsType(this._objOddsType); new3.set_BetCoverage(this._objBetCoverage); new3.set_BetType(this._objBetType); new3.set_BetTarget(this._objBetTarget); new3.set_BetFollowMethod(this._objBetFollowMethod); new3.set_MemberName(this._strMemberName); new3.set_MaxBetAmount(this._strMaxBet); new3.set_HomeScore(this._intHomeScore); new3.set_AwayScore(this._intAwayScore); new3.set_Description(this._strDescription); new3.set_HomeMatchingID(this._intHomeMatchingID); new3.set_AwayMatchingID(this._intAwayMatchingID); new3.set_HomeMatchingName(this._strHomeMatchingName); new3.set_AwayMatchingName(this._strAwayMatchingName); new3.set_LeagueMatchingID(this._intLeagueMatchingID); new3.set_GameType(this._objGameType); new3.set_RunningStatus(this._objRunningStatus); new3.set_EstimatePayout(this._dclEstimatePayout); new3.set_MatchResult(this._objMatchResult); if (this._objMatchResultInfo != null) { new3.set_MatchResultInfo(this._objMatchResultInfo.CloneObject()); } new3.set_Company(this._strCompany); new3.set_ReceiptID(this._strReceiptID); new3.set_IPAddress(this._strIPAddress); new3.set_ClientName(this._strClientName); new3.set_IsUpdated(this.get_IsUpdated()); new3.set_UniqueID(this.get_UniqueID()); new3.set_ReceiptStatus(this._objReceiptStatus); new3.set_IsReceiptOccupied(this._isReceiptOccupied); new3.set_Info1(this.get_Info1()); new3.set_Info2(this.get_Info2()); new3.set_Info3(this.get_Info3()); new3.set_Info4(this.get_Info4()); new3.GenerateUpperCaseInfo(); return new3; }