Ejemplo n.º 1
0
        public List<MatchBetNew> GenerateMemberBetlistFromText(string text1)
        {
            List<MatchBetNew> list4 = new List<MatchBetNew>();
            List<string> list3 = new List<string>();
            ArrayList list2 = new ArrayList();
            ArrayList list5 = new ArrayList();
            int num = 0;
            string current = "";
            try
            {
                while (num > -1)
                {
                    list3.Add(CommonFunction.substring(text1, num, ",['", "])", ref num).Trim());
                }
                List<string>.Enumerator enumerator = list3.GetEnumerator();
                try
                {
                    //enumerator;
                    while (enumerator.MoveNext())
                    {
                        current = enumerator.Current;
                        list2 = CommonFunction.SeperateStringBySymbol(current, "','");
                        if (list2.Count >= 14)
                        {
                            bool flag = false;
                            MatchBetNew item = new MatchBetNew();
                            item.set_ID(list2[8].ToString().Trim());
                            int num2 = 0;
                            item.set_MemberName(CommonFunction.substring(list2[7].ToString() + "#", 0, "],'", "#", ref num2));
                            if (base._objMemberList.get_MemberRange() == EnumCollection.eMemberRange.AllMember)
                            {
                                item.set_BetFollowMethod(base._objMemberList.get_GlobalBetFollowMethod());
                            }
                            else
                            {
                                Member member = base._objMemberList.get_Item(item.get_MemberName());
                                if (member != null)
                                {
                                    item.set_BetFollowMethod(member.get_BetFollowMethod());
                                }
                                else
                                {
                                    item.set_BetFollowMethod(EnumCollection.eBetFollowMethod.Normal);
                                }
                            }
                            string sportType = list2[9].ToString().Trim();
                            if (Enum.IsDefined(typeof(EnumCollection.eSportType), sportType))
                            {
                                item.set_SportType((EnumCollection.eSportType)Enum.Parse(typeof(EnumCollection.eSportType), sportType));
                            }
                            item.set_BetDate(list2[10].ToString() + " " + list2[11].ToString());
                            item.set_Company(base._strAgentSiteName);
                            item.set_League(list2[6].ToString().Trim().Replace("&nbsp;", ""));
                            item.set_HomeName(list2[4].ToString().Trim().Replace("&nbsp;", ""));
                            item.set_AwayName(list2[5].ToString().Trim().Replace("&nbsp;", ""));
                            item.set_SelectedMatch(list2[0].ToString().Trim().Replace("&nbsp;", ""));
                            item.set_HDP(list2[1].ToString().Trim().Replace("&nbsp;", ""));
                            item.HDPValue = list2[1].ToString().Trim().Replace("&nbsp;", "");

                            string matchType = list2[2].ToString().ToLower();
                            item.set_MatchType(matchType);
                            switch (matchType)
                            {
                                case "handicap":
                                    item.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    item.set_BetType(EnumCollection.eBetType.HDP);
                                    if (item.get_SelectedMatch().ToLower() == item.get_AwayName().ToLower())
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.FT_Away);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == item.get_HomeName().ToLower())
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.FT_Home);
                                    }
                                    else
                                    {
                                        flag = true;
                                    }
                                    break;

                                case "first half o/u":
                                    item.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                    item.set_BetType(EnumCollection.eBetType.OU);
                                    if (item.get_SelectedMatch().ToLower() == "over")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.Half_Over);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == "under")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.Half_Under);
                                    }
                                    else
                                    {
                                        flag = true;
                                    }
                                    break;

                                case "over/under":
                                    item.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    item.set_BetType(EnumCollection.eBetType.OU);
                                    if (item.get_SelectedMatch().ToLower() == "over")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.FT_Over);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == "under")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.FT_Under);
                                    }
                                    else
                                    {
                                        flag = true;
                                    }
                                    break;

                                case "first half hdp":
                                    item.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                    item.set_BetType(EnumCollection.eBetType.HDP);
                                    if (item.get_SelectedMatch().ToLower() == item.get_AwayName().ToLower())
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.Half_Away);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == item.get_HomeName().ToLower())
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.Half_Home);
                                    }
                                    else
                                    {
                                        flag = true;
                                    }
                                    break;
                                case "first half 1x2":
                                    item.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                                    item.set_BetType(EnumCollection.eBetType.lX2);
                                    if (item.get_SelectedMatch().ToLower() == "1")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.Half_1);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == "x")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.Half_X);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == "2")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.Half_2);
                                    }
                                    else
                                    {
                                        flag = true;
                                    }
                                    break;
                                    break;
                                case "1x2":
                                    item.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                                    item.set_BetType(EnumCollection.eBetType.lX2);
                                    if (item.get_SelectedMatch().ToLower() == "1")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.FT_1);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == "x")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.FT_X);
                                    }
                                    else if (item.get_SelectedMatch().ToLower() == "2")
                                    {
                                        item.set_BetTarget(EnumCollection.eBetTarget.FT_2);
                                    }
                                    else
                                    {
                                        flag = true;
                                    }
                                    break;
                                default:
                                    item.set_MemberName(string.Empty);
                                    break;
                            }
                            if (list2[3].ToString().Contains("Live"))
                            {
                                item.set_GameType(EnumCollection.eGameType.Running);
                                item.set_RunningStatus(EnumCollection.eRunningStatus.Running);
                                num2 = 0;
                                list5 = CommonFunction.SeperateStringBySymbol(CommonFunction.substring(Conversions.ToString(Operators.ConcatenateObject(list2[3], "#")), 0, "!", "#", ref num2).Trim(), ":");
                                if (list5.Count == 2)
                                {
                                    item.set_HomeScore((int)Math.Round(Conversion.Val(list5[0].ToString().Trim())));
                                    item.set_AwayScore((int)Math.Round(Conversion.Val(list5[1].ToString().Trim())));
                                }
                            }
                            else
                            {
                                item.set_GameType(EnumCollection.eGameType.Today);
                                string runningStatus = list2[16].ToString().Trim();
                                if (Enum.IsDefined(typeof(EnumCollection.eRunningStatus), runningStatus))
                                {
                                    item.set_RunningStatus(
                                        (EnumCollection.eRunningStatus)
                                        Enum.Parse(typeof(EnumCollection.eRunningStatus), runningStatus));
                                }
                            }
                            if (item.get_BetType() == EnumCollection.eBetType.HDP)
                            {
                                if (item.get_HDP().Length > 0)
                                {
                                    if (item.get_HDP().Substring(0, 1) == "-")
                                    {
                                        if ((item.get_BetTarget() == EnumCollection.eBetTarget.FT_Home) | (item.get_BetTarget() == EnumCollection.eBetTarget.Half_Home))
                                        {
                                            item.set_HomeColor(Color.Red);
                                            item.set_AwayColor(Color.Blue);
                                        }
                                        else
                                        {
                                            item.set_HomeColor(Color.Blue);
                                            item.set_AwayColor(Color.Red);
                                        }
                                    }
                                    else if ((item.get_BetTarget() == EnumCollection.eBetTarget.FT_Home) | (item.get_BetTarget() == EnumCollection.eBetTarget.Half_Home))
                                    {
                                        item.set_HomeColor(Color.Blue);
                                        item.set_AwayColor(Color.Red);
                                    }
                                    else
                                    {
                                        item.set_HomeColor(Color.Red);
                                        item.set_AwayColor(Color.Blue);
                                    }
                                }
                            }
                            else
                            {
                                item.set_HomeColor(Color.Blue);
                                item.set_AwayColor(Color.Blue);
                            }

                            if (string.IsNullOrEmpty(item.get_HDP()))
                            {
                                item.set_HDP("0.0");
                            }

                            item.set_HDP(SportBookFunction.ConvertHDPType(CommonFunction.TrimSymbol(item.get_HDP(), "-")));
                            if (item.get_HDP() == "0.0")
                            {
                                item.set_HomeColor(Color.Blue);
                                item.set_AwayColor(Color.Blue);
                            }
                            item.set_CreateDate(DateTime.Now);
                            item.set_MatchDate(list2[11].ToString().Trim());
                            item.set_OddsString(list2[12].ToString().Trim());
                            item.set_BetAmount(Conversions.ToString(Conversion.Val(list2[14].ToString().Trim().Replace(",", ""))));
                            /***switch (list2[13].ToString().Trim().ToLower())
                            {
                                case "h":
                                    item.set_Odds(SportBookFunction.ConvertHKToMalayOdds(item.get_Odds()));
                                    item.set_OddsType(EnumCollection.eOddsType.HK);
                                    break;

                                case "i":
                                    item.set_Odds(SportBookFunction.ConvertIndoToMalayOdds(item.get_Odds()));
                                    item.set_OddsType(EnumCollection.eOddsType.Indo);
                                    break;

                                case "e":
                                    item.set_Odds(SportBookFunction.ConvertEuroToMalayOdds(item.get_Odds()));
                                    item.set_OddsType(EnumCollection.eOddsType.Euro);
                                    break;
                            }***/
                            item.set_IPAddress(CommonFunction.TrimSymbol(list2[list2.Count - 1].ToString().Trim(), "'"));
                            if ((item.get_MemberName() != string.Empty) & !flag)
                            {
                                list4.Add(item);
                            }
                        }
                    }
                    return list4;
                }
                finally
                {
                    enumerator.Dispose();
                }
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                base._objErrorLogger.write(base._strName + ": EXCEPTION IN GenerateMemberBetlistFromText: " + exception.Message);
                ProjectData.ClearProjectError();
            }
            return list4;
        }
Ejemplo n.º 2
0
        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();
            }
        }
Ejemplo n.º 3
0
        // 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();
            }
        }
Ejemplo n.º 4
0
        public MatchBetNew GenerateMatchBet(EnumCollection.eBetTarget target1)
        {
            MatchBetNew new3 = new MatchBetNew();
            new3.set_HomeName(this.get_HomeName());
            new3.set_AwayName(this.get_AwayName());
            new3.set_HomeMatchingID(this.get_HomeMatchingID());
            new3.set_AwayMatchingID(this.get_AwayMatchingID());
            new3.set_League(this.get_League());
            new3.set_MatchDate(this.get_MatchTime().ToString());
            new3.set_ManualMatchID(this._intManualMatchingID);
            new3.set_HomeScore(this._intHomeScore);
            new3.set_AwayScore(this._intAwayScore);
            new3.set_RunningStatus(this._objRunningStatus);
            new3.set_GameType(this._objGameType);
            new3.set_Company(this._strWebsite);
            new3.set_BetTarget(target1);
            new3.set_Info1(this._strInfo1);
            new3.set_Info2(this._strInfo2);
            new3.set_Info3(this._strInfo3);
            new3.set_Info4(this._strInfo4);
            switch (target1)
            {
                case EnumCollection.eBetTarget.FT_Home:
                    new3.set_SelectedMatch(this.get_HomeName());
                    new3.set_HDP(this.get_FTHDP());
                    new3.set_Odds(this.get_FT_HomeOdds());
                    new3.set_BetType(EnumCollection.eBetType.HDP);
                    new3.set_ID(this.get_FTHDP_ID());
                    new3.set_ID2(this.get_FTHDP_ID2());
                    new3.set_HomeColor(this.get_FTHomeColor());
                    new3.set_AwayColor(this.get_FTAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                    new3.set_HomeBetLink(this._strFT_HomeBetLink);
                    new3.set_AwayBetLink(this._strFT_AwayBetLink);
                    new3.set_SelectedBetLink(this._strFT_HomeBetLink);
                    new3.set_MatchID(this._strFT_ID);
                    return new3;

                case EnumCollection.eBetTarget.FT_Away:
                    new3.set_SelectedMatch(this.get_AwayName());
                    new3.set_HDP(this.get_FTHDP());
                    new3.set_Odds(this.get_FT_AwayOdds());
                    new3.set_BetType(EnumCollection.eBetType.HDP);
                    new3.set_ID(this.get_FTHDP_ID());
                    new3.set_ID2(this.get_FTHDP_ID2());
                    new3.set_HomeColor(this.get_FTHomeColor());
                    new3.set_AwayColor(this.get_FTAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                    new3.set_HomeBetLink(this._strFT_HomeBetLink);
                    new3.set_AwayBetLink(this._strFT_AwayBetLink);
                    new3.set_SelectedBetLink(this._strFT_AwayBetLink);
                    new3.set_MatchID(this._strFT_ID);
                    return new3;

                case EnumCollection.eBetTarget.FT_Over:
                    new3.set_SelectedMatch("Over");
                    new3.set_HDP(this.get_FTOU());
                    new3.set_Odds(this.get_FT_OverOdds());
                    new3.set_BetType(EnumCollection.eBetType.OU);
                    new3.set_ID(this.get_FTOU_ID());
                    new3.set_ID2(this.get_FTOU_ID2());
                    new3.set_HomeColor(this.get_FTHomeColor());
                    new3.set_AwayColor(this.get_FTAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                    new3.set_HomeBetLink(this._strFT_OverBetLink);
                    new3.set_AwayBetLink(this._strFT_UnderBetLink);
                    new3.set_SelectedBetLink(this._strFT_OverBetLink);
                    new3.set_MatchID(this._strFT_ID);
                    return new3;

                case EnumCollection.eBetTarget.FT_Under:
                    new3.set_SelectedMatch("Under");
                    new3.set_HDP(this.get_FTOU());
                    new3.set_Odds(this.get_FT_UnderOdds());
                    new3.set_BetType(EnumCollection.eBetType.OU);
                    new3.set_ID(this.get_FTOU_ID());
                    new3.set_ID2(this.get_FTOU_ID2());
                    new3.set_HomeColor(this.get_FTHomeColor());
                    new3.set_AwayColor(this.get_FTAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                    new3.set_HomeBetLink(this._strFT_OverBetLink);
                    new3.set_AwayBetLink(this._strFT_UnderBetLink);
                    new3.set_SelectedBetLink(this._strFT_UnderBetLink);
                    new3.set_MatchID(this._strFT_ID);
                    return new3;

                case EnumCollection.eBetTarget.Half_Home:
                    new3.set_SelectedMatch(this.get_HomeName());
                    new3.set_HDP(this.get_HalfHDP());
                    new3.set_Odds(this.get_Half_HomeOdds());
                    new3.set_BetType(EnumCollection.eBetType.HDP);
                    new3.set_ID(this.get_HalfHDP_ID());
                    new3.set_ID2(this.get_HalfHDP_ID2());
                    new3.set_HomeColor(this.get_HalfHomeColor());
                    new3.set_AwayColor(this.get_HalfAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                    new3.set_HomeBetLink(this._strHalf_HomeBetLink);
                    new3.set_AwayBetLink(this._strHalf_AwayBetLink);
                    new3.set_SelectedBetLink(this._strHalf_HomeBetLink);
                    new3.set_MatchID(this._strHalf_ID);
                    return new3;

                case EnumCollection.eBetTarget.Half_Away:
                    new3.set_SelectedMatch(this.get_AwayName());
                    new3.set_HDP(this.get_HalfHDP());
                    new3.set_Odds(this.get_Half_AwayOdds());
                    new3.set_BetType(EnumCollection.eBetType.HDP);
                    new3.set_ID(this.get_HalfHDP_ID());
                    new3.set_ID2(this.get_HalfHDP_ID2());
                    new3.set_HomeColor(this.get_HalfHomeColor());
                    new3.set_AwayColor(this.get_HalfAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                    new3.set_HomeBetLink(this._strHalf_HomeBetLink);
                    new3.set_AwayBetLink(this._strHalf_AwayBetLink);
                    new3.set_SelectedBetLink(this._strHalf_AwayBetLink);
                    new3.set_MatchID(this._strHalf_ID);
                    return new3;

                case EnumCollection.eBetTarget.Half_Over:
                    new3.set_SelectedMatch("Over");
                    new3.set_HDP(this.get_HalfOU());
                    new3.set_Odds(this.get_Half_OverOdds());
                    new3.set_BetType(EnumCollection.eBetType.OU);
                    new3.set_ID(this.get_HalfOU_ID());
                    new3.set_ID2(this.get_HalfOU_ID2());
                    new3.set_HomeColor(this.get_HalfHomeColor());
                    new3.set_AwayColor(this.get_HalfAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                    new3.set_HomeBetLink(this._strHalf_OverBetLink);
                    new3.set_AwayBetLink(this._strHalf_UnderBetLink);
                    new3.set_SelectedBetLink(this._strHalf_OverBetLink);
                    new3.set_MatchID(this._strHalf_ID);
                    return new3;

                case EnumCollection.eBetTarget.Half_Under:
                    new3.set_SelectedMatch("Under");
                    new3.set_HDP(this.get_HalfOU());
                    new3.set_Odds(this.get_Half_UnderOdds());
                    new3.set_BetType(EnumCollection.eBetType.OU);
                    new3.set_ID(this.get_HalfOU_ID());
                    new3.set_ID2(this.get_HalfOU_ID2());
                    new3.set_HomeColor(this.get_HalfHomeColor());
                    new3.set_AwayColor(this.get_HalfAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                    new3.set_HomeBetLink(this._strHalf_OverBetLink);
                    new3.set_AwayBetLink(this._strHalf_UnderBetLink);
                    new3.set_SelectedBetLink(this._strHalf_UnderBetLink);
                    new3.set_MatchID(this._strHalf_ID);
                    return new3;
                // add 1x2
                case EnumCollection.eBetTarget.FT_1:
                    new3.set_SelectedMatch("1");
                    new3.set_HDP(this.get_FT1X2());
                    new3.set_Odds(this.get_FT_1X2HomeOddsString());
                    new3.set_BetType(EnumCollection.eBetType.lX2);
                    new3.set_ID(this.get_FT1X2_ID());
                    new3.set_ID2(this.get_FT1X2_ID());
                    new3.set_HomeColor(this.get_FTHomeColor());
                    new3.set_AwayColor(this.get_FTAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                    new3.set_MatchID(this.get_FT_ID());
                    return new3;
                case EnumCollection.eBetTarget.FT_X:
                    new3.set_SelectedMatch("X");
                    new3.set_HDP(this.get_FT1X2());
                    new3.set_Odds(this.get_FT_1X2DrawOddsString());
                    new3.set_BetType(EnumCollection.eBetType.lX2);
                    new3.set_ID(this.get_FT1X2_ID());
                    new3.set_ID2(this.get_FT1X2_ID());
                    new3.set_HomeColor(this.get_FTHomeColor());
                    new3.set_AwayColor(this.get_FTAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                    new3.set_MatchID(this.get_FT_ID());
                    return new3;
                case EnumCollection.eBetTarget.FT_2:
                    new3.set_SelectedMatch("2");
                    new3.set_HDP(this.get_FT1X2());
                    new3.set_Odds(this.get_FT_1X2AwayOddsString());
                    new3.set_BetType(EnumCollection.eBetType.lX2);
                    new3.set_ID(this.get_FT1X2_ID());
                    new3.set_ID2(this.get_FT1X2_ID());
                    new3.set_HomeColor(this.get_FTHomeColor());
                    new3.set_AwayColor(this.get_FTAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FT);
                    new3.set_MatchID(this.get_FT_ID());
                    return new3;
                case EnumCollection.eBetTarget.Half_1:
                    new3.set_SelectedMatch("1");
                    new3.set_HDP(this.get_Half1X2());
                    new3.set_Odds(this.get_Half_1X2HomeOddsString());
                    new3.set_BetType(EnumCollection.eBetType.lX2);
                    new3.set_ID(this.get_Half1X2_ID());
                    new3.set_ID2(this.get_Half1X2_ID());
                    new3.set_HomeColor(this.get_HalfHomeColor());
                    new3.set_AwayColor(this.get_HalfAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                    new3.set_MatchID(this.get_Half_ID());
                    return new3;
                case EnumCollection.eBetTarget.Half_X:
                    new3.set_SelectedMatch("X");
                    new3.set_HDP(this.get_Half1X2());
                    new3.set_Odds(this.get_Half_1X2DrawOddsString());
                    new3.set_BetType(EnumCollection.eBetType.lX2);
                    new3.set_ID(this.get_Half1X2_ID());
                    new3.set_ID2(this.get_Half1X2_ID());
                    new3.set_HomeColor(this.get_HalfHomeColor());
                    new3.set_AwayColor(this.get_HalfAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                    new3.set_MatchID(this.get_Half_ID());
                    return new3;
                case EnumCollection.eBetTarget.Half_2:
                    new3.set_SelectedMatch("2");
                    new3.set_HDP(this.get_Half1X2());
                    new3.set_Odds(this.get_Half_1X2AwayOddsString());
                    new3.set_BetType(EnumCollection.eBetType.lX2);
                    new3.set_ID(this.get_Half1X2_ID());
                    new3.set_ID2(this.get_Half1X2_ID());
                    new3.set_HomeColor(this.get_HalfHomeColor());
                    new3.set_AwayColor(this.get_HalfAwayColor());
                    new3.set_BetCoverage(EnumCollection.eBetCoverage.FirstHalf);
                    new3.set_MatchID(this.get_Half_ID());
                    return new3;
            }
            return new3;
        }
Ejemplo n.º 5
0
 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;
 }