public List <GeneralTools.TreeView.TreeNode> treeGroups_OnDataBind(string parentID, string search) { DataTable dtGroups = Facade.InboxGroup.GetUserInboxGroups(UserGuid, Helper.GetGuid(parentID), search); var nodes = new List <GeneralTools.TreeView.TreeNode>(); foreach (DataRow row in dtGroups.Rows) { var node = new GeneralTools.TreeView.TreeNode(); node.id = string.Format("'{0}'", row["Guid"]); node.state = "closed"; node.text = row["Title"].ToString(); nodes.Add(node); } return(nodes); }
public List <GeneralTools.TreeView.TreeNode> treeGroups_OnDataBind(string parentID, string search) { DataTable dtGroups = Facade.PhoneBook.GetPhoneBookOfUser(UserGuid, Helper.GetGuid(parentID), search); var nodes = new List <GeneralTools.TreeView.TreeNode>(); foreach (DataRow row in dtGroups.Rows) { var node = new GeneralTools.TreeView.TreeNode(); node.id = string.Format("'{0}'", row["Guid"]); node.state = "closed"; node.text = row["Name"].ToString(); node.attributes = new { count = row["CountPhoneNumbers"].ToString(), type = Helper.GetInt(row["Type"], 1), id = row["ID"], serviceId = row["ServiceId"] }; nodes.Add(node); } return(nodes); }