private void LoadAllCompanies() { twCompany.Nodes.Clear(); List <CompanyClass> _company = CompanyClass.GetAllCompany(); foreach (CompanyClass company in _company) { TreeNode tn = new TreeNode(company.CompanyName + " (" + company.CompanyCount + ") "); tn.Tag = company; twCompany.Nodes.Add(tn); } }
private void twWishItems_AfterSelect(object sender, TreeViewEventArgs e) { twTrivet.Nodes.Clear(); List <CompanyClass> _users = CompanyClass.GetAllCompany(); foreach (CompanyClass user in _users) { TreeNode tn = new TreeNode(user.CompanyName); tn.Tag = user; twTrivet.Nodes.Add(tn); } }