protected void btnNo_Click(object sender, EventArgs e) { try { ExamineManager.ModifyApplicationById("会议申请", id); Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('会议申请终结成功');window.location='../PedingMatter/Matter.aspx'</script>"); } catch (Exception) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('会议申请终结失败')</script>"); } }
/// <summary> /// 点击按钮激发事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void gvPending_RowCommand(object sender, GridViewCommandEventArgs e) { int id = Convert.ToInt32(e.CommandArgument); LinkButton lblState = e.CommandSource as LinkButton; Label lblType = lblState.Parent.Parent.FindControl("lblType") as Label; //办理 if (e.CommandName == "State") { if (lblType.Text == "会议申请") { Response.Redirect("~/MeetingManager/MeetingExamine.aspx?id=" + id.ToString()); } else if (lblType.Text == "用车申请") { Response.Redirect("~/CarManager/ByapplyCaparticular.aspx?op=2&id=" + id.ToString()); } else if (lblType.Text == "资源借用") { Response.Redirect("~/ResourceManager/ApplyBorrowInfo.aspx?id=" + id.ToString()); } else if (lblType.Text == "资源采购") { Response.Redirect("~/ResourceManager/ApplyStockInfo.aspx?id=" + id.ToString()); } else if (lblType.Text == "任务申请") { Response.Redirect("~/TaskManager/UpdateAssignTask.aspx?Id=" + id.ToString()); } } else //终结 { try { ExamineManager.ModifyApplicationById(lblType.Text, id); Page.ClientScript.RegisterStartupScript(this.GetType(), "", string.Format("<script>alert('{0}终结成功')</script>", lblType.Text)); Bind(); } catch (Exception) { Page.ClientScript.RegisterStartupScript(this.GetType(), "", string.Format("<script>alert('{0}终结失败')</script>", lblType.Text)); } } }