ActivEarth.DAO.BadgeLevelInfoDAO.GetBadgeReward C# (CSharp) Метод

GetBadgeReward() публичный статический Метод

Retrieves the reward for a particular badge.
public static GetBadgeReward ( Statistic stat, int badgeLevel ) : float
stat Statistic Statistic for which the badge is awarded.
badgeLevel int Desired level of the badge.
Результат float
        public static float GetBadgeReward(Statistic stat, int badgeLevel)
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                return (from c in data.BadgeConstantsDataProviders
                                    where c.statistic == (byte)stat && c.level == badgeLevel
                                    select (float)c.reward).FirstOrDefault();
            }
        }