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

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

Retrieves the image path for a particular badge.
public static GetBadgeImagePath ( Statistic stat, int badgeLevel ) : string
stat Statistic Statistic for which the badge is awarded.
badgeLevel int Desired level of the badge.
Результат string
        public static string GetBadgeImagePath(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 c.image_path).FirstOrDefault();
            }
        }