/// <summary> /// Adds the link. /// </summary> /// <param name="href">The href.</param> /// <param name="target">The target.</param> /// <param name="tooltip">The tooltip.</param> /// <param name="text">The text.</param> public void AddLink(string href, string target, string tooltip, string text) { ContentItem l = new ContentItem(); l.Title = text; l.GroupItemID = this.ModuleID; l.Categories.Add(new Category(this.Category)); l.ItemSettings.Update("Href", href); l.ItemSettings.Update("Target", target); l.ItemSettings.Update("Tooltip", tooltip); base.ContentItems.Add(l); }
/// <summary> /// Fills the by category. /// </summary> protected void FillByCategory() { ItemData id = DAL.Items; id.Connection = new DatabaseHelper().Connection; DataTable dtLinks = id.GetItemsByCategoryTypeGroup(_category, this.ItemType, this.ModuleID); if (dtLinks != null && dtLinks.Rows.Count > 0) { foreach (DataRow row in dtLinks.Rows) { ContentItem link = new ContentItem(Convert.ToInt64(row["ItemId"])); base.ContentItems.Add(link); } } }
public void AddLink(ContentItem link) { link.GroupItemID = this.ModuleID; link.Categories.Add(new Category(this.Category)); base.ContentItems.Add(link); }