protected void bt_Approve_Click(object sender, EventArgs e) { bt_OK_Click(null, null); PN_NoticeBLL noticebll = new PN_NoticeBLL((int)ViewState["ID"]); noticebll.Approve(1, (int)Session["UserID"]); MessageBox.ShowAndRedirect(this, "审核成功", "index.aspx?Catalog=" + ViewState["Catalog"].ToString()); }
protected void ud_Notice_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { int id = int.Parse(ud_Notice.DataKeys[e.NewSelectedIndex]["ID"].ToString()); PN_NoticeBLL _bll = new PN_NoticeBLL(id); if (_bll.Model.ApproveFlag == 1) { if (_bll.Model.InsertStaff != (int)Session["UserID"] && !Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 2104, "UnApproveNotice")) { MessageBox.Show(Page, "对不起,你没有撤销已审核的公告的权限"); return; } _bll.Approve(2, (int)Session["UserID"]); } BindGrid(); }
protected void ud_Notice_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { int id = int.Parse(ud_Notice.DataKeys[e.NewSelectedIndex]["ID"].ToString()); PN_NoticeBLL _bll = new PN_NoticeBLL(id); if (_bll.Model.ApproveFlag == 1) { if (_bll.Model.InsertStaff != (int)Session["UserID"] && !Right_Assign_BLL.GetAccessRight(Session["UserName"].ToString(), 2104, "UnApproveNotice")) { MessageBox.Show(Page, "对不起,你没有撤销已审核的公告的权限"); return; } _bll.Approve(2, (int)Session["UserID"]); } BindGrid(); }