/// <summary> /// DNNTxtBannerGroup_PopulateOnDemand runs when something is entered on the /// BannerGroup field /// </summary> /// <history> /// [vmasanas] 9/29/2006 Implement a callback to display current groups /// to user so the BannerGroup can be easily selected /// </history> protected void DNNTxtBannerGroup_PopulateOnDemand(object source, DNNTextSuggestEventArgs e) { BannerController objBanners = new BannerController(); DataTable dt = objBanners.GetBannerGroups(PortalId); dt.CaseSensitive = false; DataRow[] dr = dt.Select("GroupName like '" + e.Text + "%'"); foreach (DataRow d in dr) { DNNNode objNode = new DNNNode(d["GroupName"].ToString()); objNode.ID = e.Nodes.Count.ToString(); e.Nodes.Add(objNode); } }
/// ----------------------------------------------------------------------------- /// <summary> /// DNNTxtBannerGroup_PopulateOnDemand runs when something is entered on the /// BannerGroup field /// </summary> /// <remarks> /// </remarks> /// <history> /// [vmasanas] 9/29/2006 Implement a callback to display current groups /// to user so the BannerGroup can be easily selected /// </history> /// ----------------------------------------------------------------------------- protected void PopulateBannersOnDemand(object source, DNNTextSuggestEventArgs e) { var objBanners = new BannerController(); var dt = objBanners.GetBannerGroups(PortalId); dt.CaseSensitive = false; var dr = dt.Select("GroupName like '" + e.Text + "%'"); foreach (var d in dr) { var objNode = new DNNNode(d["GroupName"].ToString()) { ID = e.Nodes.Count.ToString() }; e.Nodes.Add(objNode); } }