本文整理汇总了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;
}
示例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)");
// }
//}
}
}
示例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;
}
}
}
}
示例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+")");
}
}
}
示例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 + ";";
}
}
}
}