using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class N38_CatalogMessage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    

    protected void ibtnok_Click(object sender, ImageClickEventArgs e)
    {
        if (Page.IsValid)
        {
            N38_Catalog myCL = new N38_Catalog();
            bool add = myCL.AddCatalog(tbcatalog.Text.Trim());
            if (add)
            {
                Response.Write("<script>alert('分类添加成功')</script>");
                tbcatalog.Text = "";
            }
            else
            {
                tbcatalog.Text = "";
                Response.Write("<script>alert('分类已存在，添加失败')</script>");
            }
        }
    }
}
