internal static List<Form> GetForms()
{
List<Form> colForms = null;
Form form = null;
using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
{
SqlCommand sqlCommand = new SqlCommand(SN_FORM_GET_ALL, sqlConnection);
sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
sqlCommand.Connection.Open();
using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection))
{
colForms = new List<Form>();
while (sqlDataReader.Read())
{
form = GetForm(colForms, sqlDataReader);
FillFromReader(form, sqlDataReader);
}
sqlDataReader.Close();
sqlCommand.Connection.Close();
}
}
return colForms;
}