AJH.CMS.Core.Data.XSLTemplateDataMapper.GetXSLTemplates C# (CSharp) Method

GetXSLTemplates() static private method

static private GetXSLTemplates ( int PortalID, int LanguageID ) : List
PortalID int
LanguageID int
return List
        internal static List<XSLTemplate> GetXSLTemplates(int PortalID, int LanguageID)
        {
            List<XSLTemplate> colXSLTemplates = null;
            XSLTemplate xslTemplate = null;

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

                SqlParameter sqlParameter = null;

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

                sqlParameter = new SqlParameter(PN_XSLTEMPLATE_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))
                {
                    colXSLTemplates = new List<XSLTemplate>();
                    while (sqlDataReader.Read())
                    {
                        xslTemplate = GetXSLTemplate(colXSLTemplates, sqlDataReader);
                        FillFromReader(xslTemplate, sqlDataReader);
                    }

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

Same methods

XSLTemplateDataMapper::GetXSLTemplates ( ) : List
XSLTemplateDataMapper::GetXSLTemplates ( int ModuleID, int PortalID, int LanguageID ) : List