protected void qued_Click(object sender, EventArgs e) { if (z_id.Text != "未选择") { if (TextBox1.Text != "") { Model.procate mym = new Model.procate(); mym.cateid = Convert.ToInt32(z_id.Text); mym.catename = TextBox1.Text; mym.fathercateid = Convert.ToInt32(Drop_f.SelectedValue); BLL.procate myb = new BLL.procate(); int result = myb.update(mym); if (result > 0) { msg("更改成功!"); TextBox1.Text = ""; z_id.Text = "未选择"; bing(); } } else { msg("类明不能为空"); } } else { msg("未选择"); } }
protected void tijiao_Click(object sender, EventArgs e) { if (procatename.Text != null) { Model.procate mym = new Model.procate(); mym.catename = procatename.Text; mym.fathercateid = Convert.ToInt32(fathername.SelectedValue); BLL.procate myb = new BLL.procate(); int result = myb.insert(mym); if (result > 0) { msg("添加成功!!"); procatename.Text = ""; } else { msg("添加失败!!"); } } }
protected void qued_Click(object sender, EventArgs e) { if (z_id.Text != "未选择") { if (TextBox1.Text !="") { Model.procate mym = new Model.procate(); mym.cateid = Convert.ToInt32(z_id.Text); mym.catename = TextBox1.Text; mym.fathercateid = Convert.ToInt32(Drop_f.SelectedValue); BLL.procate myb = new BLL.procate(); int result = myb.update(mym); if (result > 0) { msg("更改成功!"); TextBox1.Text = ""; z_id.Text = "未选择"; bing(); } } else { msg("类明不能为空"); } } else { msg("未选择"); } }