Beispiel #1
0
        protected override void OnLoad(EventArgs e)
        {
            DojoMemberTypeTemplateManager    m;
            DojoMemberTypeTemplateCollection templates;

            ComponentArt.Web.UI.TreeViewNode node;

            base.OnLoad(e);
            EnsureChildControls();

            if (tree.Nodes.Count == 0)
            {
                node          = new ComponentArt.Web.UI.TreeViewNode();
                node.Text     = "Member Type Templates";
                node.ImageUrl = "./images/tree/root.gif";
                node.Expanded = true;
                tree.Nodes.Add(node);

                m         = new DojoMemberTypeTemplateManager();
                templates = m.GetCollection(string.Empty, "Name, CreateDate", null);

                TreeMaker.Make(templates, TreeMaker.MakeMode.Collapse);

                foreach (DojoMemberTypeTemplate template in templates)
                {
                    if (template.parent == null)
                    {
                        addTemplate(node, template);
                    }
                }
            }
        }
        private void bind()
        {
            DojoMemberManager    dojoMemberManager    = new DojoMemberManager();
            DojoMemberCollection dojoMemberCollection = dojoMemberManager.GetCollection(string.Empty, string.Empty);

            foreach (DojoMember itemObject in dojoMemberCollection)
            {
                ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem();
                item.Text  = itemObject.ToString();
                item.Value = itemObject.ID.ToString();
                comboMember.Items.Add(item);
            }


            DojoOrganizationManager    dojoOrganizationManager    = new DojoOrganizationManager();
            DojoOrganizationCollection dojoOrganizationCollection = dojoOrganizationManager.GetCollection(string.Empty, string.Empty);

            foreach (DojoOrganization itemObject in dojoOrganizationCollection)
            {
                ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem();
                item.Text  = itemObject.ToString();
                item.Value = itemObject.ID.ToString();
                comboOrganization.Items.Add(item);
            }


            DojoMembershipManager    dojoMembershipManager    = new DojoMembershipManager();
            DojoMembershipCollection dojoMembershipCollection = dojoMembershipManager.GetCollection(string.Empty, string.Empty);

            ddParent.Items.Add(new ListItem("             ", "null"));
            foreach (DojoMembership itemObject in dojoMembershipCollection)
            {
                ddParent.Items.Add(new ListItem(itemObject.ToString(), itemObject.ID.ToString()));
            }


            DojoMemberTypeTemplateManager    dojoMemberTypeTemplateManager    = new DojoMemberTypeTemplateManager();
            DojoMemberTypeTemplateCollection dojoMemberTypeTemplateCollection = dojoMemberTypeTemplateManager.GetCollection(string.Empty, string.Empty);

            foreach (DojoMemberTypeTemplate itemObject in dojoMemberTypeTemplateCollection)
            {
                ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem();
                item.Text  = itemObject.ToString();
                item.Value = itemObject.ID.ToString();
                comboMemberTypeTemplate.Items.Add(item);
            }


            DojoMembershipTemplateManager    dojoMembershipTemplateManager    = new DojoMembershipTemplateManager();
            DojoMembershipTemplateCollection dojoMembershipTemplateCollection = dojoMembershipTemplateManager.GetCollection(string.Empty, string.Empty);

            foreach (DojoMembershipTemplate itemObject in dojoMembershipTemplateCollection)
            {
                ComponentArt.Web.UI.ComboBoxItem item = new ComponentArt.Web.UI.ComboBoxItem();
                item.Text  = itemObject.ToString();
                item.Value = itemObject.ID.ToString();
                comboMembershipTemplate.Items.Add(item);
            }



            RHInvoiceLineManager    rHInvoiceLineManager    = new RHInvoiceLineManager();
            RHInvoiceLineCollection rHInvoiceLineCollection = rHInvoiceLineManager.GetCollection(string.Empty, string.Empty);

            ddInvoiceLine.Items.Add(new ListItem("             ", "null"));
            foreach (RHInvoiceLine itemObject in rHInvoiceLineCollection)
            {
                ddInvoiceLine.Items.Add(new ListItem(itemObject.ToString(), itemObject.ID.ToString()));
            }
        }