protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { UserID = barBll.GetUser().UserID; MyBind(); } }
protected void DelMsg_Btn_Click(object sender, EventArgs e) { if (Pid > 0) { M_UserInfo mu = barBll.GetUser(); barMod = barBll.SelReturnModel(Pid); int cateId = barMod.CateID; string result = barBll.UpdateStatus(barBll.SelReturnModel(Pid).CateID, Pid.ToString(), -1) ? "ok" : "failed"; if (result == "ok") { function.Script(this, "<script>alert('删除成功!')</script>"); Response.Redirect("/PClass?uid=" + mu.UserID); } else { function.Script(this, "<script>alert('删除失败!')</script>"); Response.Redirect("/PItem?id=" + Pid); } } }