AJH.CMS.Core.Data.PublishDataMapper.GetPublishs C# (CSharp) Method

GetPublishs() static private method

static private GetPublishs ( int ModuleID, int PortalID, int LanguageID ) : List
ModuleID int By default: -1
PortalID int
LanguageID int By default: -1
return List
        internal static List<Publish> GetPublishs(int ModuleID, int PortalID, int LanguageID)
        {
            List<Publish> colPublishs = null;
            Publish publish = null;

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

                SqlParameter sqlParameter = null;

                sqlParameter = new SqlParameter(PN_PUBLISH_MODULE_ID, System.Data.SqlDbType.Int);
                sqlParameter.Direction = System.Data.ParameterDirection.Input;
                sqlParameter.Value = ModuleID;
                sqlCommand.Parameters.Add(sqlParameter);

                sqlParameter = new SqlParameter(PN_PUBLISH_PORTAL_ID, System.Data.SqlDbType.Int);
                sqlParameter.Direction = System.Data.ParameterDirection.Input;
                sqlParameter.Value = PortalID;
                sqlCommand.Parameters.Add(sqlParameter);

                sqlParameter = new SqlParameter(PN_PUBLISH_LANGUAGE_ID, System.Data.SqlDbType.Int);
                sqlParameter.Direction = System.Data.ParameterDirection.Input;
                sqlParameter.Value = LanguageID;
                sqlCommand.Parameters.Add(sqlParameter);

                sqlCommand.Connection.Open();
                using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection))
                {
                    colPublishs = new List<Publish>();
                    while (sqlDataReader.Read())
                    {
                        publish = GetPublish(colPublishs, sqlDataReader);
                        FillFromReader(publish, sqlDataReader);
                    }

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

Same methods

PublishDataMapper::GetPublishs ( ) : List