Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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);
            }
        }