예제 #1
0
 /// <summary>
 /// ī�װ�� ������ �����Ѵ�.
 /// </summary>
 /// <param name="title">Ÿ��Ʋ</param>
 /// <param name="node">���</param>
 /// <param name="lCode">��з�</param>
 /// <param name="mCode">�ߺз�</param>
 /// <param name="parent">ī�װ�� �θ�</param>
 public void UpdateCategoryNodeValue(string title, CategoryNodeValue node, int lCode, int mCode, int newGroup)
 {
     CategoryAccess.UpdateCategoryNodeValue(title, node, lCode, mCode, newGroup);
 }
예제 #2
0
 /// <summary>
 /// ī�װ�� ��� ��ġ�� �����Ѵ�.
 /// </summary>
 /// <param name="node"></param>
 public bool UpdateMoveCategoryChildNode(CategoryNodeValue node, string mode)
 {
     return CategoryAccess.UpdateMoveCategoryChildNode(node, mode);
 }
예제 #3
0
 /// <summary>
 /// ���ο� ī�װ���� �߰��Ѵ�.
 /// </summary>
 /// <param name="title">�߰��� ī�װ�� Ÿ��Ʋ</param>
 /// <param name="node">���</param>
 /// <param name="mode">1:��Ʈ 2:�ڽ� ī�װ��</param>
 public void InsertNewCategory(string title, CategoryNodeValue node, int mode)
 {
     CategoryAccess.InsertNewCategory( title, node, mode );
 }
예제 #4
0
 /// <summary>
 /// ī�װ���� �����Ѵ�.
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 public bool RemoveCategoryNode(CategoryNodeValue node)
 {
     return CategoryAccess.RemoveCategoryNode( node );
 }
예제 #5
0
        /// <summary>
        /// ī�װ�� ������ �����Ѵ�.
        /// </summary>
        /// <param name="title">Ÿ��Ʋ</param>
        /// <param name="node">���</param>
        /// <param name="lCode">��з�</param>
        /// <param name="mCode">�ߺз�</param>
        /// <param name="parent">ī�װ�� �θ�</param>
        public static void UpdateCategoryNodeValue(string title, CategoryNodeValue node, int lCode, int mCode, int newGroup)
        {
            SqlParameter[] param = {
                CreateInParam("@ID", SqlDbType.Int, 4, node.CategoryID),
                CreateInParam("@Title", SqlDbType.VarChar,50, title),
                CreateInParam("@LCode", SqlDbType.Int, 4, lCode),
                CreateInParam("@MCode", SqlDbType.Int, 4, mCode),
                CreateInParam("@NewGroup", SqlDbType.Int, 4, newGroup)
            };

            SqlCommand cmd		= GetSpCommand("UBI_UpdateCategoryNodeValue", param, IsolationLevel.ReadUncommitted);

            try
            {
                cmd.ExecuteNonQuery();
            }
            catch
            {
                ReleaseCommandWithRollback(cmd);
            }

            ReleaseCommandWithCommit(cmd);
        }
예제 #6
0
        /// <summary>
        /// ī�װ�� ������ �̵��Ѵ�.
        /// </summary>
        /// <param name="node">Node</param>
        /// <param name="mode">��� up, down</param>
        /// <returns></returns>
        public static bool UpdateMoveCategoryNode(CategoryNodeValue node, string mode)
        {
            SqlParameter[] param = {
                    CreateInParam("@ID",	SqlDbType.Int,4,node.CategoryID),
                    CreateInParam("@Group",	SqlDbType.Int,4,node.CategoryGroup),
                    CreateInParam("@Step",	SqlDbType.Int,4,node.CategoryStep),
                    CreateInParam("@Order",	SqlDbType.Int,4,node.CategoryOrder),
                    CreateInParam("@Mode",	SqlDbType.VarChar,10,mode),
                    CreateReturnValue(),
            };
            SqlCommand cmd		= GetSpCommand("UBI_UpdateMoveCategoryNode", param, IsolationLevel.Serializable);

            try
            {
                cmd.ExecuteNonQuery();

                int result = (int)cmd.Parameters["@ReturnValue"].Value;
                ReleaseCommandWithCommit(cmd);

                return (result == 1) ? true : false;
            }
            catch
            {
                ReleaseCommandWithRollback( cmd );

                return false;
            }
        }
예제 #7
0
        /// <summary>
        /// ī�װ���� �����Ѵ�.
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        public static bool RemoveCategoryNode(CategoryNodeValue node)
        {
            SqlParameter[] param =
                {
                    CreateInParam("@ID", SqlDbType.Int, 4, node.CategoryID),
                    CreateInParam("@Step", SqlDbType.Int, 4, node.CategoryStep),
                    CreateInParam("@Group", SqlDbType.Int, 4, node.CategoryGroup)
                };

            SqlCommand cmd = GetSpCommand("UBI_RemoveCategoryNode", param, IsolationLevel.Serializable);

            try
            {
                cmd.ExecuteNonQuery();
                ReleaseCommandWithCommit(cmd);
                return true;
            }
            catch
            {
                ReleaseCommandWithRollback(cmd);
                return false;
            }
        }
예제 #8
0
        /// <summary>
        /// ���ο� ī�װ���� �߰��Ѵ�.
        /// </summary>
        /// <param name="title">�߰��� ī�װ�� Ÿ��Ʋ</param>
        /// <param name="node">���</param>
        /// <param name="mode">1:��Ʈ 2:�ڽ� ī�װ��</param>
        public static void InsertNewCategory(string title, CategoryNodeValue node, int mode)
        {
            SqlParameter[] param =
                {
                    CreateInParam("@Title", SqlDbType.VarChar,50,title ),
                    CreateInParam("@LCode", SqlDbType.Int, 4 , node.CategoryLCode),
                    CreateInParam("@MCode", SqlDbType.Int, 4 , -1),
                    CreateInParam("@Group", SqlDbType.Int, 4, node.CategoryGroup ),
                    CreateInParam("@Step",  SqlDbType.Int, 4, node.CategoryStep),
                    CreateInParam("@Order", SqlDbType.Int, 4, node.CategoryOrder),
                    CreateInParam("@Mode",  SqlDbType.Int, 4, mode)
                };

            SqlCommand cmd		= GetSpCommand("UBI_InsertNewCategory", param, IsolationLevel.ReadUncommitted );

            try
            {
                cmd.ExecuteNonQuery();
                ReleaseCommandWithCommit(cmd);
            }
            catch
            {
                ReleaseCommandWithRollback(cmd);
            }
        }
예제 #9
0
        /// <summary>
        /// ī�װ���� ��ƼŬ ����Ʈ�� �����´�
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
        public static ArticleBindModel GetArticleList(CategoryNodeValue node)
        {
            SqlParameter[] param = {
                CreateInParam("@CategoryID",		SqlDbType.Int,4,		node.CategoryID),
                CreateInParam("@CategoryStep",		SqlDbType.Int,4,		node.CategoryStep)
            };

            SqlCommand cmd				= GetSpCommand("UBA_GetArticleListByCategoryID", param);
            SqlDataReader reader		= cmd.ExecuteReader( CommandBehavior.CloseConnection );
            ArticleBindModel bindModel	= new ArticleBindModel();
            try
            {
                while (reader.Read())
                {
                    ArticleModel model = new ArticleModel();

                    FillArticle(reader, model);

                    bindModel.Add(model);
                    model = null;
                }

                return bindModel;
            }
            catch ( Exception ex )
            {
                throw new UmcDataException("UBA_GetArticleListByCategoryID ���ν��� ȣ���� ����", ex);
            }
            finally
            {
                reader.Close();
                ReleaseCommand(cmd);
            }
        }
예제 #10
0
 /// <summary>
 /// ī�װ���� ��ƼŬ ����Ʈ�� �����´�
 /// </summary>
 /// <param name="node"></param>
 /// <returns></returns>
 public ArticleBindModel GetArticleList(CategoryNodeValue node)
 {
     return ArticleAccess.GetArticleList( node );
 }
예제 #11
0
    // 새 카테고리 추가
    protected void btnNewCategory_Click(object sender, ImageClickEventArgs e)
    {
        CategoryNodeValue nodeValue	= new CategoryNodeValue(-1, -1, -1, -1, -1);

        CategoryManager.GetInstance().InsertNewCategory( "Umc Category", nodeValue,1 );

        init();
        bind();
    }