private void BindTreeChildNodes(TreeNode node) { DataTable dt = PurchaseRequireBus.GetProductType(Convert.ToInt32(node.Value)); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow Row in dt.Rows) { TreeNode nodes = new TreeNode(); nodes.Text = Row["TypeName"].ToString(); nodes.Value = Row["ID"].ToString(); nodes.NavigateUrl = string.Format("javascript:SelectedTypeChanged1('{0}','{1}');", nodes.Text, nodes.Value); node.ChildNodes.Add(nodes); BindTreeChildNodes(nodes); } } }
private void BindTreeChildNodes(TreeNode node) { DataTable dt = PurchaseRequireBus.GetProductType(Convert.ToInt32(node.Value)); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow Row in dt.Rows) { TreeNode nodes = new TreeNode(); nodes.Text = Row["TypeName"].ToString(); nodes.Value = Row["ID"].ToString(); node.ChildNodes.Add(nodes); BindTreeChildNodes(nodes); } } }