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);
}
}