protected void Button1_Click(object sender, EventArgs e) { int BLID = Convert.ToInt32(this.DropDownList1.SelectedValue); string BSName = this.TextBox1.Text; //if (BSCategoryDAL.selBystype(BLID, BSName) == 0) //{ //} //else //{ // Alert("此类别已存在"); //} if (BSName == "") { Alert("请输入小类别名"); } else { if (BSCategoryDAL.addBLCategory(BLID, BSName) > 0) { Alert("添加小类成功"); Response.Redirect("goodSType.aspx"); } else { Alert("添加小类失败"); } } }
/// <summary> /// 添加小类 /// </summary> /// <param name="BLID"></param> /// <param name="BLName"></param> /// <returns></returns> public static int addBLCategory(int BLID, string BLName) { return(BSCategoryDAL.addBLCategory(BLID, BLName)); }