AJH.CMS.Core.Data.GalleryDataMapper.GetGallerys C# (CSharp) Method

GetGallerys() static private method

static private GetGallerys ( ) : List
return List
        internal static List<Gallery> GetGallerys()
        {
            List<Gallery> colGallerys = null;
            Gallery gallery = null;

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

                SqlParameter sqlParameter = null;
                sqlParameter = new SqlParameter(PublishDataMapper.PN_PUBLISH_MODULE_ID, System.Data.SqlDbType.Int);
                sqlParameter.Direction = System.Data.ParameterDirection.Input;
                sqlParameter.Value = (int)AJH.CMS.Core.Enums.CMSEnums.Modules.Gallery;
                sqlCommand.Parameters.Add(sqlParameter);

                sqlCommand.Connection.Open();
                using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection))
                {
                    colGallerys = new List<Gallery>();
                    while (sqlDataReader.Read())
                    {
                        gallery = GetGallery(colGallerys, sqlDataReader);
                        FillFromReader(gallery, sqlDataReader);
                    }

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

Same methods

GalleryDataMapper::GetGallerys ( int CategoryID, CMSEnums GalleryType ) : List
GalleryDataMapper::GetGallerys ( int PortalID, int LanguageID, CMSEnums GalleryType ) : List