Exemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int BLID = Convert.ToInt32(Request.QueryString["BLID"]);

            if (BLCategoryDAL.update(this.TextBox1.Text, BLID) > 0)
            {
                Alert("修改成功");
                Response.Redirect("goodLType.aspx");
            }
            else
            {
                Alert("修改失败");
            }
        }
Exemplo n.º 2
0
        protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
        {
            ImageButton btu = sender as ImageButton;
            int         BID = Convert.ToInt32(btu.CommandArgument);

            if (BLCategoryDAL.delete(BID) > 0)
            {
                //刷新数据
                ShowDate();
            }
            else
            {
                Alert("删除失败");
            }
        }
Exemplo n.º 3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string BLName = this.TextBox1.Text;

            //if (BLCategoryDAL.selByname(BLName)==0)
            //{
            if (BLCategoryDAL.addBLCategory(BLName) > 0)
            {
                Alert("添加成功");
            }
            else
            {
                Alert("添加失败");
            }

            //}
            //else
            //{
            //	Alert("已存在此类别");
            //}
        }
Exemplo n.º 4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (this.TextBox1.Text != "")
            {
                //if (BLCategoryDAL.selByname(TextBox1.Text) == 0)
                //{
                if (BLCategoryDAL.addBLCategory(this.TextBox1.Text) > 0)
                {
                    Alert("添加成功");
                    this.TextBox1.Text = "";
                    ShowDate();
                }
                else
                {
                    Alert("添加失败");
                }
                //}
                //else
                //{

                //	Alert("已存在大类别");
                //}
            }
        }
Exemplo n.º 5
0
  /// <summary>
 /// 根据id修改大类名称
 /// </summary>
 /// <param name="BLName"></param>
 /// <param name="BLID"></param>
 /// <returns></returns>
 public static int update(string BLName, int BLID)
 {
     return BLCategoryDAL.update(BLName,BLID);
 }
Exemplo n.º 6
0
  /// <summary>
 /// 根据大类ID删除大类
 /// </summary>
 /// <param name="BID"></param>
 /// <returns></returns>
 public static int delete(int BID)
 {
     return BLCategoryDAL.delete(BID);
 }
Exemplo n.º 7
0
  /// <summary>
 /// 添加大类
 /// </summary>
 /// <returns></returns>
 public static int addBLCategory(string BLName)
 {
     return BLCategoryDAL.addBLCategory(BLName);
 }
Exemplo n.º 8
0
 public static SqlDataReader SelecBLIDtBook(int count, int page, int BLID)
 {
     return(BLCategoryDAL.SelecBLIDtBook(count, page, BLID));
 }
Exemplo n.º 9
0
 public static List <BLCategory> SelectAll()
 {
     return(BLCategoryDAL.SelectAll());
 }