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 WTOSYSadmin_PackagelbAdd : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["WtoRightName"] == null)
        {
            Response.Redirect("~/SYSADMIN/main/error.aspx?err=非法登陆!或系统超时，请刷新后重新登录");
        }
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        this.txtid.Text = "";
        this.txtname.Text = "";
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        if (Doadmin.Exec("insert into PackageCategory (id,BigCategory,Sort) values (" + this.txtid.Text + ",'" + this.txtname.Text + "',"+TextBox1.Text+")"))
        {
            Response.Write("<script>alert('添加成功');window.location.href='Packagemag.aspx'</script>");
        }
        else
        {
            Response.Write("<script>alert('添加失败');window.location.href='PackagelbAdd.aspx'</script>");
        }
    }
}
