Example #1
0
 protected void Button25_Click(object sender, EventArgs e)
 {
     foreach (Organization org in Organizations.GetAllOrganizations())
     {
         Label2.Text += org.OrganizationName + ";";
     }
 }
    void BindOrganize()
    {
        List <Organization> orgs = Organizations.GetAllOrganizations();
        TreeNode            tn   = null;

        foreach (Organization o in orgs)
        {
            if (o.ParentID == 0)
            {
                tn         = new TreeNode(o.OrganizationName, o.OrganizationID.ToString(), GlobalSettings.RelativeWebRoot + "images/default/company.gif");
                tn.ToolTip = o.OrganizationDesc;
                tn.CollapseAll();
                LoadChild(tn);
                tvOganize.Nodes.Add(tn);
            }
        }
        HttpCookie cache = HHCookie.GetCookie(nodeState + Profile.AccountInfo.UserName);

        if (cache != null)
        {
            CheckNode(tvOganize.Nodes, cache.Value);
            SetValue();
            BindUserDept(int.Parse(cache.Value));
        }
    }
    void BindOrganize()
    {
        List <Organization> orgs = Organizations.GetAllOrganizations();
        TreeNode            node = null;

        foreach (Organization o in orgs)
        {
            if (o.ParentID == 0)
            {
                node = CreateNode(o.OrganizationName, o.OrganizationID.ToString(), "images/default/department.gif");
                BindChildNode(node);
                tvOrganize.Nodes.Add(node);
            }
        }
    }
    void BindOrgs()
    {
        dlDepartment.Items.Clear();
        List <Organization> os = Organizations.GetAllOrganizations();
        ListItem            li = null;

        foreach (Organization o in os)
        {
            if (o.ParentID == 0)
            {
                li = new ListItem(o.OrganizationName, o.OrganizationID.ToString());
                dlDepartment.Items.Add(li);
                BindChildOrgs(o.OrganizationID, 0);
            }
        }
    }