Ejemplo n.º 1
0
 public static MatchNew FindMatchByMatchBetViaMatchingIDIgnoreColor(MatchBetNew new1, List<MatchNew> list1)
 {
     MatchNew newww3 = new MatchNew();
     MatchNew new4 = new MatchNew();
     if ((new1.get_HomeMatchingID() > 0) & (new1.get_AwayMatchingID() > 0))
     {
         new1.GenerateUpperCaseInfo();
         if (new1.get_BetCoverage() == EnumCollection.eBetCoverage.FT)
         {
             if (new1.get_BetType() == EnumCollection.eBetType.HDP)
             {
                 foreach (MatchNew new3 in list1)
                 {
                     if ((((new3.get_Type() == EnumCollection.eMatchType.Match) & (new3.get_HomeMatchingID() > 0)) & (new3.get_AwayMatchingID() > 0)) && (((new1.get_HomeMatchingID() == new3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == new3.get_AwayMatchingID())) & (new1.get_HDP() == new3.get_FTHDP())))
                     {
                         return new3;
                     }
                 }
                 return new4;
             }
             foreach (MatchNew new3 in list1)
             {
                 if ((((new3.get_Type() == EnumCollection.eMatchType.Match) & (new3.get_HomeMatchingID() > 0)) & (new3.get_AwayMatchingID() > 0)) && (((new1.get_HomeMatchingID() == new3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == new3.get_AwayMatchingID())) & (new1.get_HDP() == new3.get_FTOU())))
                 {
                     return new3;
                 }
             }
             return new4;
         }
         if (new1.get_BetType() == EnumCollection.eBetType.HDP)
         {
             foreach (MatchNew new3 in list1)
             {
                 if ((((new3.get_Type() == EnumCollection.eMatchType.Match) & (new3.get_HomeMatchingID() > 0)) & (new3.get_AwayMatchingID() > 0)) && (((new1.get_HomeMatchingID() == new3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == new3.get_AwayMatchingID())) & (new1.get_HDP() == new3.get_HalfHDP())))
                 {
                     return new3;
                 }
             }
             return new4;
         }
         foreach (MatchNew new3 in list1)
         {
             if ((((new3.get_Type() == EnumCollection.eMatchType.Match) & (new3.get_HomeMatchingID() > 0)) & (new3.get_AwayMatchingID() > 0)) && (((new1.get_HomeMatchingID() == new3.get_HomeMatchingID()) & (new1.get_AwayMatchingID() == new3.get_AwayMatchingID())) & (new1.get_HDP() == new3.get_HalfOU())))
             {
                 return new3;
             }
         }
     }
     return new4;
 }
Ejemplo n.º 2
0
 private int GetIndexByMatch(MatchBetNew new1)
 {
     int num2;
     int num3 = -1;
     if (this._intType != 1)
     {
         int num6 = this._objList.Count - 1;
         for (num2 = 0; num2 <= num6; num2++)
         {
             if ((this._objList[num2].get_HomeName() == new1.get_HomeName()) & (this._objList[num2].get_AwayName() == new1.get_AwayName()))
             {
                 num3 = num2;
                 break;
             }
         }
     }
     else
     {
         int num4 = this._objList.Count - 1;
         for (num2 = 0; num2 <= num4; num2++)
         {
             if (((((((this._objList[num2].get_HomeName() == new1.get_HomeName()) & (this._objList[num2].get_AwayName() == new1.get_AwayName())) & (this._objList[num2].get_BetCoverage() == new1.get_BetCoverage())) & (this._objList[num2].get_BetType() == new1.get_BetType())) & (this._objList[num2].get_HomeColor() == new1.get_HomeColor())) & (this._objList[num2].get_AwayColor() == new1.get_AwayColor())) & (this._objList[num2].get_HDP() == new1.get_HDP()))
             {
                 num3 = num2;
                 break;
             }
         }
         if (((num3 == -1) & (new1.get_HomeMatchingID() > 0)) & (new1.get_AwayMatchingID() > 0))
         {
             int num5 = this._objList.Count - 1;
             for (num2 = 0; num2 <= num5; num2++)
             {
                 if (((((((this._objList[num2].get_HomeMatchingID() == new1.get_HomeMatchingID()) & (this._objList[num2].get_AwayMatchingID() == new1.get_AwayMatchingID())) & (this._objList[num2].get_BetCoverage() == new1.get_BetCoverage())) & (this._objList[num2].get_BetType() == new1.get_BetType())) & (this._objList[num2].get_HomeColor() == new1.get_HomeColor())) & (this._objList[num2].get_AwayColor() == new1.get_AwayColor())) & (this._objList[num2].get_HDP() == new1.get_HDP()))
                 {
                     return num2;
                 }
             }
         }
         return num3;
     }
     if (((num3 == -1) & (new1.get_HomeMatchingID() > 0)) & (new1.get_AwayMatchingID() > 0))
     {
         int num7 = this._objList.Count - 1;
         for (num2 = 0; num2 <= num7; num2++)
         {
             if ((this._objList[num2].get_HomeMatchingID() == new1.get_HomeMatchingID()) & (this._objList[num2].get_AwayMatchingID() == new1.get_AwayMatchingID()))
             {
                 return num2;
             }
         }
     }
     return num3;
 }