示例#1
0
    private void bind()
    {
        CategoryModel model = CategoryManager.GetInstance().GetMyCategorys(typeof(CategoryTreeView));

        TreeView treeview = (TreeView)((System.Web.UI.UpdatePanel)snap_Category.FindControl("panelCategory")).FindControl("treeCategory");

        model.Bind(treeview);

        treeview.CollapseAll();
    }
示例#2
0
    private void bind()
    {
        txtCategoryTitle.Text = string.Empty;

        treePreviewMenu.Nodes.Clear();
        lbCategory.Items.Clear();

        modelTree.Bind(treePreviewMenu);

        modelList = CategoryManager.GetInstance().GetMyCategorys(typeof(CategoryListBox));
        modelList.Bind(lbCategory);

        ddlCategory.Items.Clear();
        ddlCategory.Items.Add(new ListItem("---선택---", "-1"));
        for (int i = 0; i < modelList.Count; i++)
        {
            if (modelList[i].CategoryStep == 1)
            {
                ddlCategory.Items.Add(new ListItem(modelList[i].CategoryTitle, modelList[i].CategoryGroup.ToString()));
            }
        }

        lCodeIndex = lbCategory.SelectedIndex;

        cateCode = CategoryManager.GetInstance().GetCategoryCodes(lCodeIndex);
        ddlCategoryL.Items.Clear();
        ddlCategoryL.Items.Add(new ListItem("---대분류---", "-1"));
        for (int i = 0; i < cateCode.Count; i++)
        {
            ddlCategoryL.Items.Add(new ListItem(cateCode[i].CategoryTitle, cateCode[i].CategoryCode.ToString()));
        }

        ddlCategoryM.Items.Clear();
        ddlCategoryM.Items.Add(new ListItem("---중분류---", "-1"));
        for (int i = 0; i < cateCode.CategoryMCode.Count; i++)
        {
            ddlCategoryM.Items.Add(new ListItem(cateCode.CategoryMCode[i].CategoryTitle, cateCode.CategoryMCode[i].CategoryCode.ToString()));
        }
    }