internal static List<Category> GetCategorys()
{
List<Category> colCategorys = null;
Category category = null;
using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
{
SqlCommand sqlCommand = new SqlCommand(SN_CATEGORY_GET_ALL, sqlConnection);
sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
sqlCommand.Connection.Open();
using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection))
{
colCategorys = new List<Category>();
while (sqlDataReader.Read())
{
category = GetCategory(colCategorys, sqlDataReader);
FillFromReader(category, sqlDataReader);
}
sqlDataReader.Close();
sqlCommand.Connection.Close();
}
}
return colCategorys;
}