DataSet ds = myCategory.dsSelectOrderBy(); if(myCategory.AddSCategory(int.Parse(txtOrderNum.Text)+1,int.Parse(txtDeepNum.Text)+1,txtSCategory.Text.Trim())=="1")
{
for(int i = int.Parse(txtOrderNum.Text)+1;i<ds.Tables[0].Rows.Count;i++)
{
ds.Tables[0].Rows[i][1] = Convert.ToString(int.Parse(ds.Tables[0].Rows[i][1].ToString())+1);
myCategory.UpdateSCategoryOrderNum(int.Parse(ds.Tables[0].Rows[i][1].ToString()),lbCategory.SelectedIndex);
} Response.Write("<script>alert('添加成功!')</script>");
txtSCategory.Text = "";
tvCategoryBind();
txtBind();
}
else
{
Response.Write("<script>alert('添加失败!')</script>");
}