AJH.CMS.Core.Data.CMSControlDataMapper.GetCMSControls C# (CSharp) Method

GetCMSControls() static private method

static private GetCMSControls ( ) : List
return List
        internal static List<CMSControl> GetCMSControls()
        {
            List<CMSControl> colCMSControls = null;
            CMSControl cmsControl = null;

            using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
            {
                SqlCommand sqlCommand = new SqlCommand(SN_CMSCONTROL_GET_ALL, sqlConnection);
                sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;

                sqlCommand.Connection.Open();
                using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection))
                {
                    colCMSControls = new List<CMSControl>();
                    while (sqlDataReader.Read())
                    {
                        cmsControl = GetCMSControl(colCMSControls, sqlDataReader);
                        FillFromReader(cmsControl, sqlDataReader);
                    }

                    sqlDataReader.Close();
                    sqlCommand.Connection.Close();
                }
            }
            return colCMSControls;
        }

Same methods

CMSControlDataMapper::GetCMSControls ( int ModuleID ) : List