当前位置: 首页>>代码示例>>C#>>正文


C# Telerik.GetAllNodes方法代码示例

本文整理汇总了C#中Telerik.GetAllNodes方法的典型用法代码示例。如果您正苦于以下问题:C# Telerik.GetAllNodes方法的具体用法?C# Telerik.GetAllNodes怎么用?C# Telerik.GetAllNodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Telerik的用法示例。


在下文中一共展示了Telerik.GetAllNodes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OneCategorySelected

    protected bool OneCategorySelected(ref Telerik.Web.UI.RadTreeView treeView)
    {
        List<Telerik.Web.UI.RadTreeNode> list = (List<Telerik.Web.UI.RadTreeNode>)treeView.GetAllNodes();

        foreach (Telerik.Web.UI.RadTreeNode node in list)
        {
            if (node.Checked)
                return true;
        }

        return false;
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:12,代码来源:EnterVenue.aspx.cs

示例2: GetCheckedCategories

    protected void GetCheckedCategories(ref Telerik.Web.UI.RadTreeView CategoryTree, string ID)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        List<Telerik.Web.UI.RadTreeNode> list = (List<Telerik.Web.UI.RadTreeNode>)CategoryTree.GetAllNodes();

        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
        string tagsize = "22";

        foreach (Telerik.Web.UI.RadTreeNode node in list)
        {
            if (node.Checked)
            {
                if (node.ParentNode != null)
                {
                    tagsize = "16";
                }
                else
                {
                    tagsize = "22";
                }

                dat.Execute("INSERT INTO Ad_Category_Mapping (CategoryID, AdID, tagSize) VALUES("
                            + node.Value + ", " + ID + ", "+tagsize+")");
            }

            //foreach (Telerik.Web.UI.RadTreeNode node1 in node.Nodes)
            //{
            //    if (node1.Checked)
            //    {

            //        dat.Execute("INSERT INTO Ad_Category_Mapping (CategoryID, AdID, tagSize) VALUES("
            //                    + node1.Value + ", " + ID + ", 16)");
            //    }
            //}
        }
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:36,代码来源:PostAnAd.aspx.cs

示例3: GetCategoriesFromTree

    protected void GetCategoriesFromTree(ref Telerik.Web.UI.RadTreeView CategoryTree, bool isAd, ref bool resetAds)
    {
        HttpCookie cookie = Request.Cookies["BrowserDate"];
        string categories = "";
        Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));

        List<Telerik.Web.UI.RadTreeNode> list = (List<Telerik.Web.UI.RadTreeNode>)CategoryTree.GetAllNodes();

        foreach (Telerik.Web.UI.RadTreeNode node in list)
        {
            DataView dv = dat.GetDataDV("SELECT * FROM UserCategories WHERE CategoryID=" + node.Value +
                " AND UserID=" + Session["User"].ToString());
            if (node.Checked)
            {
                if (isAd)
                {
                    dat.Execute("INSERT INTO UserCategories (CategoryID, UserID) VALUES("
                                + node.Value + "," + Session["User"].ToString() + ")");

                    if (dv.Count == 0)
                        resetAds = true;
                }
                else
                {
                    dat.Execute("INSERT INTO UserEventCategories (CategoryID, UserID) VALUES("
                                + node.Value + "," + Session["User"].ToString() + ")");

                }
            }
            else
            {
                if (isAd)
                {
                    if (dv.Count != 0)
                        resetAds = true;
                }
            }
        }
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:39,代码来源:User.aspx.cs

示例4: SaveSearchCategories

 protected void SaveSearchCategories(string ID, ref Telerik.Web.UI.RadTreeView CategoryTree)
 {
     HttpCookie cookie = Request.Cookies["BrowserDate"];
     List<Telerik.Web.UI.RadTreeNode> list = (List<Telerik.Web.UI.RadTreeNode>)CategoryTree.GetAllNodes();
     Data dat = new Data(DateTime.Parse(cookie.Value.ToString().Replace("%20", " ").Replace("%3A", ":")));
     foreach(Telerik.Web.UI.RadTreeNode node in list)
     {
         if (node.Checked)
         {
             //SELECT [ID],[SearchID],[CategoryID] from [HippoHappenings].[dbo].[SavedAdSearches_Categories]
             dat.Execute("INSERT INTO SavedAdSearches_Categories (SearchID, CategoryID) VALUES("+ID+", "+node.Value+")");
         }
     }
 }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:14,代码来源:AdSearch_OLD.aspx.cs

示例5: returnCategoryIDString

    public void returnCategoryIDString(Telerik.Web.UI.RadTreeView CategoryTree, ref string categories)
    {
        List<Telerik.Web.UI.RadTreeNode> list = (List<Telerik.Web.UI.RadTreeNode>)CategoryTree.GetAllNodes();

        foreach (Telerik.Web.UI.RadTreeNode node in list)
        {
            if (node.Checked)
            {
                categories += node.Value + ";";

                if (node.ParentNode != null)
                {
                    categories += node.ParentNode.Value + ";";

                    if (node.ParentNode.ParentNode != null)
                        categories += node.ParentNode.ParentNode.Value + ";";
                }
            }
        }
    }
开发者ID:aleksczajka,项目名称:Hippo-Code---OLD,代码行数:20,代码来源:Data.cs


注:本文中的Telerik.GetAllNodes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。