Exemplo n.º 1
0
 public static MatchNew FindMatchByMatchBetFuzzy(MatchBetNew new1, List<MatchNew> list1)
 {
     MatchNew new3 = new MatchNew();
     MatchNew new4 = new MatchNew();
     new1.GenerateUpperCaseInfo();
     if (new1.get_BetCoverage() == EnumCollection.eBetCoverage.FT)
     {
         if (new1.get_BetType() == EnumCollection.eBetType.HDP)
         {
             foreach (MatchNew neww3 in list1)
             {
                 if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTHDP())) & (new1.get_HomeColor() == neww3.get_FTHomeColor())) & (new1.get_AwayColor() == neww3.get_FTAwayColor())))
                 {
                     return neww3;
                 }
             }
             return new4;
         }
         foreach (MatchNew neww3 in list1)
         {
             if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTOU())))
             {
                 return neww3;
             }
         }
         return new4;
     }
     if (new1.get_BetType() == EnumCollection.eBetType.HDP)
     {
         foreach (MatchNew neww3 in list1)
         {
             if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfHDP())) & ((((new1.get_HomeColor() == neww3.get_HalfHomeColor()) & (new1.get_AwayColor() == neww3.get_HalfAwayColor())) & (new1.get_HDP() != "0.0")) | (new1.get_HDP() == "0.0"))))
             {
                 return neww3;
             }
         }
         return new4;
     }
     foreach (MatchNew neww3 in list1)
     {
         if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((CommonFunction.isFuzzyEqual(new1.get_HomeNameUpper(), neww3.get_HomeName().ToUpper()) & CommonFunction.isFuzzyEqual(new1.get_AwayNameUpper(), neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfOU())))
         {
             return neww3;
         }
     }
     return new4;
 }
Exemplo n.º 2
0
 public static MatchNew FindMatchByMatchBetSingleNameIgnoreColor(MatchBetNew new1, List<MatchNew> list1)
 {
     MatchNew neww3 = new MatchNew();
     MatchNew new4 = new MatchNew();
     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) && (((new1.get_HomeNameUpper() == new3.get_HomeName().ToUpper()) | (new1.get_AwayNameUpper() == new3.get_AwayName().ToUpper())) & (new1.get_HDP() == new3.get_FTHDP())))
                 {
                     return new3;
                 }
             }
             return new4;
         }
         foreach (MatchNew new3 in list1)
         {
             if ((new3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == new3.get_HomeName().ToUpper()) | (new1.get_AwayNameUpper() == new3.get_AwayName().ToUpper())) & (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) && (((new1.get_HomeNameUpper() == new3.get_HomeName().ToUpper()) | (new1.get_AwayNameUpper() == new3.get_AwayName().ToUpper())) & (new1.get_HDP() == new3.get_HalfHDP())))
             {
                 return new3;
             }
         }
         return new4;
     }
     foreach (MatchNew new3 in list1)
     {
         if ((new3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == new3.get_HomeName().ToUpper()) | (new1.get_AwayNameUpper() == new3.get_AwayName().ToUpper())) & (new1.get_HDP() == new3.get_HalfOU())))
         {
             return new3;
         }
     }
     return new4;
 }
Exemplo n.º 3
0
        public static MatchNew FindMatchByMatchBet(MatchBetNew new1, List<MatchNew> list1)
        {
            MatchNew new3 = new MatchNew();
            MatchNew new4 = new MatchNew();
            new1.GenerateUpperCaseInfo();
            if (new1.get_BetCoverage() == EnumCollection.eBetCoverage.FT)
            {
                if (new1.get_BetType() == EnumCollection.eBetType.HDP)
                {
                    foreach (MatchNew neww3 in list1)
                    {

                        if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTHDP())) & (new1.get_HomeColor() == neww3.get_FTHomeColor())) & (new1.get_AwayColor() == neww3.get_FTAwayColor())))
                        {
                            return neww3;
                        }
                    }
                    return new4;
                }
                foreach (MatchNew neww3 in list1)
                {
                    if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FTOU())))
                    {
                        return neww3;
                    }

                    // add 1X2
                    if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_FT1X2() & neww3.get_FT_1X2HomeOddsString() != 0)))
                    {
                        return neww3;
                    }
                }
                return new4;
            }
            if (new1.get_BetType() == EnumCollection.eBetType.HDP)
            {
                foreach (MatchNew neww3 in list1)
                {
                    if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && ((((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfHDP())) & ((((new1.get_HomeColor() == neww3.get_HalfHomeColor()) & (new1.get_AwayColor() == neww3.get_HalfAwayColor())) & (new1.get_HDP() != "0.0")) | (new1.get_HDP() == "0.0"))))
                    {
                        return neww3;
                    }
                }
                return new4;
            }
            foreach (MatchNew neww3 in list1)
            {
                // o/u
                if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_HalfOU())))
                {
                    return neww3;
                }

                // add 1X2
                if ((neww3.get_Type() == EnumCollection.eMatchType.Match) && (((new1.get_HomeNameUpper() == neww3.get_HomeName().ToUpper()) & (new1.get_AwayNameUpper() == neww3.get_AwayName().ToUpper())) & (new1.get_HDP() == neww3.get_Half1X2() & neww3.get_Half_1X2HomeOddsString() != 0)))
                {
                    return neww3;
                }
            }
            return new4;
        }