ActivEarth.DAO.StatisticInfoDAO.GetStatisticFormatString C# (CSharp) Метод

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

Retrieves the format string for a particular statistic.
public static GetStatisticFormatString ( Statistic stat ) : string
stat Statistic Statistic to query.
Результат string
        public static string GetStatisticFormatString(Statistic stat)
        {
            using (SqlConnection connection = ConnectionManager.GetConnection())
            {
                var data = new ActivEarthDataProvidersDataContext(connection);
                string toReturn = (from c in data.StatisticConstantsDataProviders
                                    where c.statistic_id == (byte)stat
                                    select c.format_string).FirstOrDefault();

                return (toReturn != null ? toReturn.Trim() : String.Empty);
            }
        }