Ejemplo n.º 1
0
//		Menu clipContextMenu	= new Menu();

        /// <summary>
        /// Ensures that the catalogs are loaded.
        /// </summary>
        private void EnsureCatalogs()
        {
            if (catalogs == null)
            {
                DbContentCatalogManager m = new DbContentCatalogManager();
                catalogs = m.GetCollection(string.Empty, string.Empty, null);
                catalogs.Sort(ContentCompareKey.MenuOrder);
            }
        }
Ejemplo n.º 2
0
        private void bind()
        {
            #region Bind General Child Data

            DbContentCatalogManager    parentCatalogManager    = new DbContentCatalogManager();
            DbContentCatalogCollection parentCatalogCollection = parentCatalogManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DbContentCatalog parentCatalog in parentCatalogCollection)
            {
                ListItem i = new ListItem(parentCatalog.ToString(), parentCatalog.ID.ToString());
                msParentCatalog.Items.Add(i);
            }

            DbContentRatingManager    ratingManager    = new DbContentRatingManager();
            DbContentRatingCollection ratingCollection = ratingManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DbContentRating rating in ratingCollection)
            {
                ComboBoxItem i = new ComboBoxItem();
                i.Text  = rating.Name;
                i.Value = rating.ID.ToString();
                ratingComboBox.Items.Add(i);
            }

            DbContentStatusManager    statusManager    = new DbContentStatusManager();
            DbContentStatusCollection statusCollection = statusManager.GetCollection(string.Empty, string.Empty);
            foreach (DbContentStatus status in statusCollection)
            {
                ListItem i = new ListItem(status.ToString(), status.ID.ToString());
                msStatus.Items.Add(i);
            }

            DbContentClipManager    clipManager = new DbContentClipManager();
            DbContentClipCollection clips       = clipManager.GetCollection(string.Empty, "Title", null);
            foreach (DbContentClip clip in clips)
            {
                referenceComboBox.Items.Add(
                    new ComboBoxItem(
                        Regex.Replace(clip.Title, "<[^>]*>", "")));
            }

            #endregion
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Render this control to the output parameter specified.
        /// </summary>
        /// <param name="output"> The HTML writer to write out to </param>
        protected override void RenderContent(HtmlTextWriter output)
        {
            DbContentCatalogManager    m = new DbContentCatalogManager();
            DbContentCatalogCollection dbContentCatalogCollection = m.GetCollection(string.Empty, string.Empty, null);

            // Render Header Row
            this.headerLockEnabled = true;
            RenderRow(this.HeaderRowCssClass, );

            bool   rowflag = false;
            string rowCssClass;

            //
            // Render Records
            //
            foreach (DbContentCatalog dbContentCatalog in dbContentCatalogCollection)
            {
                if (rowflag)
                {
                    rowCssClass = defaultRowCssClass;
                }
                else
                {
                    rowCssClass = alternateRowCssClass;
                }
                rowflag = !rowflag;
                output.WriteBeginTag("tr");
                output.WriteAttribute("i", dbContentCatalog.ID.ToString());
                output.WriteLine(HtmlTextWriter.TagRightChar);
                output.Indent++;

                output.Indent--;
                output.WriteEndTag("tr");
                output.WriteLine();
            }
        }
Ejemplo n.º 4
0
        private void bindDropDownLists()
        {
            #region Bind General Child Data

            msStatus.Items.Add(new ListItem("Null", "Null"));
            DbContentStatusManager    statusManager    = new DbContentStatusManager();
            DbContentStatusCollection statusCollection = statusManager.GetCollection(string.Empty, string.Empty);
            foreach (DbContentStatus status in statusCollection)
            {
                ListItem i = new ListItem(status.ToString(), status.ID.ToString());
                msStatus.Items.Add(i);
            }

            #endregion

            #region Bind Publishing Child Data

            msParentCatalog.Items.Add(new ListItem("Null", "Null"));
            DbContentCatalogManager    parentCatalogManager    = new DbContentCatalogManager();
            DbContentCatalogCollection parentCatalogCollection = parentCatalogManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DbContentCatalog parentCatalog in parentCatalogCollection)
            {
                ListItem i = new ListItem(parentCatalog.ToString(), parentCatalog.ID.ToString());
                msParentCatalog.Items.Add(i);
            }

            msRating.Items.Add(new ListItem("Null", "Null"));
            DbContentRatingManager    ratingManager    = new DbContentRatingManager();
            DbContentRatingCollection ratingCollection = ratingManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DbContentRating rating in ratingCollection)
            {
                ListItem i = new ListItem(rating.ToString(), rating.ID.ToString());
                msRating.Items.Add(i);
            }

            msReferences.Items.Add(new ListItem("Null", "Null"));
            DbContentClipManager    referencesManager    = new DbContentClipManager();
            DbContentClipCollection referencesCollection = referencesManager.GetCollection(string.Empty, string.Empty, null);
            foreach (DbContentClip references in referencesCollection)
            {
                ListItem i = new ListItem(references.ToString(), references.ID.ToString());
                msReferences.Items.Add(i);
            }

            #endregion

            #region Bind Contributors Child Data

            msAuthors.Items.Add(new ListItem("Null", "Null"));
            GreyFoxUserManager    authorsManager    = new GreyFoxUserManager();
            GreyFoxUserCollection authorsCollection = authorsManager.GetCollection(string.Empty, string.Empty, null);
            foreach (GreyFoxUser authors in authorsCollection)
            {
                ListItem i = new ListItem(authors.ToString(), authors.ID.ToString());
                msAuthors.Items.Add(i);
            }

            msEditors.Items.Add(new ListItem("Null", "Null"));
            GreyFoxUserManager    editorsManager    = new GreyFoxUserManager();
            GreyFoxUserCollection editorsCollection = editorsManager.GetCollection(string.Empty, string.Empty, null);
            foreach (GreyFoxUser editors in editorsCollection)
            {
                ListItem i = new ListItem(editors.ToString(), editors.ID.ToString());
                msEditors.Items.Add(i);
            }

            #endregion
        }