private void LoadVersionNodes(RadTreeNode node, int selectedVersionID) { if (node == null) { return; } node.Nodes.Clear(); using (ProductVersions versions = new ProductVersions(UserSession.LoginUser)) { versions.LoadByProductID(GetProductID(node)); if (!versions.IsEmpty) { foreach (ProductVersion version in versions) { RadTreeNode vnode = new RadTreeNode(); vnode.Text = version.VersionNumber; vnode.Value = version.ProductVersionID.ToString(); vnode.ExpandMode = TreeNodeExpandMode.WebService; node.Nodes.Add(vnode); if (selectedVersionID == version.ProductVersionID) { vnode.Selected = true; SetNode(vnode); } } } } }
private void LoadVersions(int productID) { cmbVersions.Items.Clear(); cmbVersions.Items.Add(new RadComboBoxItem("Unassigned", "-1")); ProductVersions productVersions = new ProductVersions(UserSession.LoginUser); productVersions.LoadByProductID(productID); foreach (ProductVersion version in productVersions) { cmbVersions.Items.Add(new RadComboBoxItem(version.VersionNumber, version.ProductVersionID.ToString())); } cmbVersions.SelectedIndex = 0; }
public IEnumerable GetVersionNodes(RadTreeNodeData node, IDictionary context) { ProductVersions versions = new ProductVersions(UserSession.LoginUser); versions.LoadByProductID(int.Parse(node.Value)); List <RadTreeNodeData> list = new List <RadTreeNodeData>(); foreach (ProductVersion version in versions) { RadTreeNodeData newNode = new RadTreeNodeData(); newNode.Text = version.VersionNumber; newNode.Value = version.ProductVersionID.ToString(); list.Add(newNode); } return(list); }