public Version GetCurrentInstallationVersion()
{
string sql = "subtext_VersionGetCurrent";
try
{
using (IDataReader reader = SqlHelper.ExecuteReader(this.connectionString, CommandType.StoredProcedure, sql))
{
if (reader.Read())
{
Version version = new Version((int)reader["Major"], (int)reader["Minor"], (int)reader["Build"]);
reader.Close();
return version;
}
reader.Close();
}
}
catch (SqlException exception)
{
if (exception.Number != (int)SqlErrorMessage.CouldNotFindStoredProcedure)
throw;
}
return null;
}