protected void Button1_Click(object sender, EventArgs e) { if (Page.IsValid) { Hashtable ht = new Hashtable(); ht["remark"] = this.remark.Text.Trim(); ht["zeren"] = User.Identity.Name; ht["time1"] = DateTime.Now.ToString(); ht["ps"] = this.piyue.SelectedValue; if (Request["bkind"].ToString() == "0") { U_ZCSPBU sp1 = new U_ZCSPBU(); string info1 = sp1.PiYueZcForSH1(ViewState["id"].ToString(), ht); sp1.Close(); PubComm.ShowInfo(info1, Application["root"] + "/ZcMng2/ZcDetail3.aspx?id=" + ViewState["zcid"].ToString()); } else { U_ZCBSPBU sp2 = new U_ZCBSPBU(); string info2 = sp2.PiYueZcForSH1(ViewState["id"].ToString(), ht, ViewState["zcid"].ToString()); sp2.Close(); PubComm.ShowInfo(info2, Application["root"] + "/ZcMng2/ZcBaoDetail3.aspx?id=" + ViewState["zcid"].ToString()); } } }
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.Item.FindControl("seldoc") != null) { string id = (e.Item.FindControl("seldoc") as Label).Text.Trim(); if (e.CommandName == "delete") { U_ZCBSPBU sp1 = new U_ZCBSPBU(); sp1.DelSp(id); this.BindSP(sp1); sp1.Close(); } else { Context.Items["zcid"] = Request.QueryString["id"]; Context.Items["id"] = id; Context.Items["kind"] = (e.Item.FindControl("kind") as Label).Text.Trim(); Context.Items["czid"] = this.zcczid.Text; //检测【审核委员会主席】和【决策委员会主席】能否审批 U_ZCBSPBU sp2 = new U_ZCBSPBU(); int nospcount = sp2.GetNoEndSPCount(Request.QueryString["id"]); sp2.Close(); bool check1 = false; string rolename = ""; if (this.status.Text == (int)SP.审核委员会审批 + "") { rolename = "审核委员会主席"; } if (this.status.Text == (int)SP.决策委员会审批 + "") { rolename = "决策委员会主席"; } if (rolename != "") { check1 = Comm.IsRole(rolename); } if (check1 && nospcount > 1) { Util.alert(this.Page, "抱歉,您是【" + rolename + "】,请等其他委员审批结束后,才能审批"); } else { if (check1) { Context.Items["zhuxi"] = "1"; } Server.Transfer("PiYue" + (e.Item.FindControl("kind") as Label).Text.Trim() + ".aspx?bkind=1", false); } } } }
protected void Button1_Click(object sender, EventArgs e) { U_ZCBSPBU sp1 = new U_ZCBSPBU(); bool first = sp1.CopyZcBCzsbbtoZc(this.BID.Text, this.zcczid.Text); sp1.Close(); if (first) { Util.alert(this.Page, "恭喜您,复制成功!"); } else { Util.alert(this.Page, "很遗憾,复制失败!"); } }
protected void butSendToDepartLeader_Click(object sender, EventArgs e) { U_ZCBSPBU sp1 = new U_ZCBSPBU(); string err1 = sp1.PiYueZcBForDepart(this.zcczid.Text); sp1.Close(); if (err1 != null) { Util.alert(this.Page, err1); } else { Comm.ShowInfo("已成功转交部门审批!", Application["root"] + "/ZcMng2/ZcBaoDetail3.aspx?id=" + Request["id"].ToString()); } }
protected void Repeater6_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.Item.FindControl("zccz") != null) { string id = ((Label)e.Item.FindControl("zccz")).Text; //删除资产处置方式 if (e.CommandName == "delete") { U_ZCBU zc3 = new U_ZCBU(); zc3.DelZCBFS(id); this.BindZCCZDetail(zc3); zc3.Close(); } else if (e.CommandName == "update") { Context.Items["id"] = id; if (Request["id"] != null) { Context.Items["zcid"] = Request["id"].ToString(); } Context.Items["czid"] = this.zcczid.Text; Server.Transfer("EditZcCzfs1.aspx", false); } else { U_ZCBSPBU sp1 = new U_ZCBSPBU(); bool first = sp1.CopyZcBCzczfstoZc(this.BID.Text, id); sp1.Close(); if (first) { Util.alert(this.Page, "恭喜您,复制成功!"); } else { Util.alert(this.Page, "很遗憾,复制失败!"); } } } }