Ejemplo n.º 1
0
    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());
            }
        }
    }
Ejemplo n.º 2
0
    //绑定【资产审批情况】明细
    private void BindSP(U_ZCBSPBU sp1)
    {
        if (this.zcczid.Text != "")
        {
            bool flag = false;
            if (sp1 == null)
            {
                sp1  = new U_ZCBSPBU();
                flag = true;
            }

            for (int i = 11; i <= 15; i++)
            {
                Repeater repeater1 = this.Repeater11.Parent.FindControl("Repeater" + i) as Repeater;
                if (repeater1 != null)
                {
                    DataSet ds1 = sp1.GetZcSPList(this.zcczid.Text, i + "");
                    repeater1.DataSource = ds1;
                    repeater1.DataBind();

                    if (ds1.Tables[0].Rows.Count == 0)
                    {
                        repeater1.Visible = false;
                    }
                }
            }
            if (flag)
            {
                sp1.Close();
            }
        }
    }
Ejemplo n.º 3
0
    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);
                }
            }
        }
    }
Ejemplo n.º 4
0
    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, "很遗憾,复制失败!");
        }
    }
Ejemplo n.º 5
0
    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());
        }
    }
Ejemplo n.º 6
0
 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, "很遗憾,复制失败!");
             }
         }
     }
 }