Exemplo n.º 1
0
        /// <summary>
        /// ī�װ�� �ڵ带 �����´�
        /// </summary>
        /// <param name="lcode">��з� �ڵ� ������� -1</param>
        /// <returns></returns>
        public static CategoryCodeModel GetCategoryCodes(int lCode)
        {
            SqlParameter[] param	= { CreateInParam("@LCode", SqlDbType.Int,4, lCode) };

            SqlCommand cmd			= GetSpCommand("UBI_GetCategoryCodes", param);

            SqlDataReader reader	= cmd.ExecuteReader(CommandBehavior.CloseConnection);

            CategoryCodeModel code	= new CategoryCodeModel();

            while (reader.Read())
            {
                code.Add( new CategoryCodeModel(
                    (int)reader["CategoryLCode"], reader["CategoryLTitle"].ToString()));
            }

            if (reader.NextResult())
            {
                code.CreateCategoryMCode();
                while (reader.Read())
                {
                    code.CategoryMCode.Add(new CategoryCodeModel(
                        (int)reader["CategoryMCode"], reader["CategoryMTitle"].ToString()));
                }
            }

            ReleaseCommand(cmd);

            return code;
        }
Exemplo n.º 2
0
 public void Add(CategoryCodeModel code)
 {
     items.Add(code);
 }
Exemplo n.º 3
0
 public CategoryCodeModel CreateCategoryMCode()
 {
     _categoryMCode = new CategoryCodeModel();
     return(_categoryMCode);
 }
Exemplo n.º 4
0
 public CategoryCodeModel CreateCategoryMCode()
 {
     _categoryMCode = new CategoryCodeModel();
     return _categoryMCode;
 }
Exemplo n.º 5
0
 public void Add(CategoryCodeModel code )
 {
     items.Add( code );
 }
Exemplo n.º 6
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()));
    }