Exemple #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());
            }
        }
    }
Exemple #2
0
    /// <summary>
    /// 办公室编号
    /// </summary>
    /// <param name="id"></param>
    private void SehenPiForBanGongShiZhuRen(String id, String dotime1)
    {
        if (this.xmsbh.Text == String.Empty)
        {
            Util.alert(this.Page, "错误:请输入项目申报号!");
        }
        else
        {
            Hashtable ht = new Hashtable();
            ht["remark"] = this.remark.Text.Trim();
            ht["zeren"]  = User.Identity.Name;
            if (String.IsNullOrEmpty(dotime1))
            {
                ht["time1"] = DateTime.Now.ToString();
            }
            else
            {
                ht["time1"] = dotime1;
            }
            ht["ps"]    = "同意";
            ht["xmsbh"] = this.xmsbh.Text;                  //项目申报号
            ht["czid"]  = ViewState["czid"].ToString();     //项目的ID

            U_ZCSPBU sp1   = new U_ZCSPBU();
            String   czid  = ViewState["czid"].ToString();
            string   info1 = sp1.PiYueZcForSHWeiYuan(id, ht);
            sp1.Close();
            PubComm.ShowInfo(info1, Application["root"] + "/ZcMng3/EditSbb.aspx?id=" + czid + "&menuIndex=5");
        }
    }
Exemple #3
0
    /// <summary>
    /// 提交部门审批
    /// </summary>
    /// <param name="id"></param>
    private void SehenPiForBumen(String id, String dotime1)
    {
        if (this.piyue1.SelectedValue == String.Empty)
        {
            Util.alert(this.Page, "错误:请选择一个审批意见!");
        }
        else
        {
            Hashtable ht = new Hashtable();
            ht["remark"] = this.remark.Text.Trim();
            ht["zeren"]  = User.Identity.Name;
            if (String.IsNullOrEmpty(dotime1))
            {
                ht["time1"] = DateTime.Now.ToString();
            }
            else
            {
                ht["time1"] = dotime1;
            }
            ht["ps"] = this.piyue1.SelectedValue;

            U_ZCSPBU sp1   = new U_ZCSPBU();
            String   czid  = "";
            string   info1 = sp1.PiYueZcForOffice(id, ht, out czid);
            sp1.Close();
            PubComm.ShowInfo(info1, Application["root"] + "/ZcMng3/EditSbb.aspx?id=" + czid + "&menuIndex=5");
        }
    }
Exemple #4
0
    //绑定【资产审批情况】明细
    private void BindSP(U_ZCSPBU sp1)
    {
        if (this.id.Text != "")
        {
            bool flag = false;
            if (sp1 == null)
            {
                sp1  = new U_ZCSPBU();
                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.id.Text, i + "");
                    repeater1.DataSource = ds1;
                    repeater1.DataBind();

                    if (ds1.Tables[0].Rows.Count == 0)
                    {
                        repeater1.Visible = false;
                    }
                }
            }
            if (flag)
            {
                sp1.Close();
            }
        }
    }
Exemple #5
0
    //绑定以往的资产审批表
    private void BindHistoryZcSp()
    {
        U_ZCSPBU sp1 = new U_ZCSPBU();

        this.Repeater0.DataSource = sp1.GetHistoryZcSp(Request.QueryString["id"]);
        this.Repeater0.DataBind();
        sp1.Close();
    }
Exemple #6
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_ZCSPBU sp1 = new U_ZCSPBU();
                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_ZCSPBU sp2       = new U_ZCSPBU();
                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 = PubComm.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=0", false);
                }
            }
        }
    }
Exemple #7
0
    //处理统计事件
    void SelectTime1_StaticEvent(object sender, EventArgs e)
    {
        DateTime dt1 = default(DateTime);
        DateTime dt2 = default(DateTime);

        if (this.SelectTime1.BeginTime != "")
        {
            dt1 = DateTime.Parse(this.SelectTime1.BeginTime);
        }

        if (this.SelectTime1.EndTime != "")
        {
            dt2 = DateTime.Parse(this.SelectTime1.EndTime);
        }

        U_ZCSPBU sp1 = new U_ZCSPBU();
        DataSet  ds  = sp1.GetZcSpStatic(dt1, dt2);

        sp1.Close();

        string tableTitle = "";

        switch (this.SelectTime1.StaticType)
        {
        case SearchStaticType.年统计:
            tableTitle = this.SelectTime1.StaticYear + "年度方案审批统计表";
            break;

        case SearchStaticType.月统计:
            tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticMonth + "月方案审批统计表";
            break;

        case SearchStaticType.季度统计:
            tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticJidu + "季度方案审批统计表";
            break;

        default:
            string begtime = this.SelectTime1.BeginTime;
            if (begtime == "")
            {
                begtime = "过去";
            }

            string endtime = this.SelectTime1.EndTime;
            if (endtime == "")
            {
                endtime = "现在";
            }
            tableTitle = begtime + "~" + endtime + "方案审批统计表";
            break;
        }
        this.SetTableData(tableTitle, ds);
    }
Exemple #8
0
    //绑定资产审批的基本数据
    private void BindData1(U_ZCBU zc1, string czid)
    {
        //设置基本数据
        string[] arr1 = new string[] { "xmsbh", "danwei", "xmbj", "zclx",
                                       "zcse", "zqze", "bj", "lx", "fsxzly",
                                       "djyj", "cbdepart", "cbzeren", "num2" };
        DataSet ds2 = zc1.GetShenBaoInfo(czid);

        if (ds2.Tables[0].Rows.Count > 0)
        {
            string zcid = ds2.Tables[0].Rows[0]["zcid"].ToString();
            for (int i = 0; i < arr1.Length; i++)
            {
                Util.SetControlValue(this.xmbj.Parent.FindControl(arr1[i]), ds2.Tables[0].Rows[0][arr1[i]]);
            }
        }
        this.bj.Text   = Comm.GetNumberFormat(this.bj.Text);
        this.lx.Text   = Comm.GetNumberFormat(this.lx.Text);
        this.zqze.Text = Comm.GetNumberFormat(this.zqze.Text);
        ds2.Dispose();



        //得到部门审批人和审批意见
        //U_UserNameBU user1 = new U_UserNameBU();
        //string leader = user1.GetDirLeader();
        //user1.Close();

        U_ZCSPBU zcsp1 = new U_ZCSPBU();
        DataSet  ds3   = zcsp1.GetZcSPRemark(Request["czczid"].ToString(), SP.部门审批);

        if (ds3.Tables[0].Rows.Count > 0)
        {
            if (ds3.Tables[0].Rows[0]["remark"] != DBNull.Value)
            {
                this.bmremark.Text = ds3.Tables[0].Rows[0]["remark"].ToString();
                this.zeren1.Text   = ds3.Tables[0].Rows[0]["zeren"].ToString();
            }
            if (ds3.Tables[0].Rows[0]["time1"] != DBNull.Value)
            {
                DateTime dt1 = (DateTime)ds3.Tables[0].Rows[0]["time1"];
                this.time1.Text = dt1.ToString("yyyy年MM月dd日");
            }

            DateTime dt2 = (DateTime)ds3.Tables[0].Rows[0]["time0"];
            this.time.Text = dt2.ToString("yyyy年MM月dd日");
        }
        ds3.Dispose();
        zcsp1.Close();
    }
Exemple #9
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void BindData()
    {
        bool havedata = false;

        if (this.CzID != null && this.CzID != String.Empty)
        {
            U_ZCSPBU sp1 = new U_ZCSPBU();
            for (int i = 11; i <= 17; i++)
            {
                Repeater repeater1 = this.Repeater11.Parent.FindControl("Repeater" + i) as Repeater;
                if (repeater1 != null)
                {
                    DataSet ds1 = sp1.GetZcSPList(this.CzID, i + "");
                    if (havedata == false && ds1.Tables[0].Rows.Count > 0)
                    {
                        havedata = true;
                    }
                    if (i == 12)
                    {
                        foreach (DataRow dr in ds1.Tables[0].Rows)
                        {
                            if (dr["time1"].ToString().Trim() == String.Empty)
                            {
                                dr["ps"] = "未编号";
                            }
                            else
                            {
                                dr["ps"] = this.Xmsbh;
                            }
                        }
                    }

                    repeater1.DataSource = ds1;
                    repeater1.DataBind();

                    if (ds1.Tables[0].Rows.Count == 0)
                    {
                        repeater1.Visible = false;
                    }
                }
            }
            sp1.Close();

            if (havedata)
            {
                this.NoRowData.Visible = false;
            }
        }
    }
Exemple #10
0
    //送部门审批
    protected void butSendToDepartLeader_Click(object sender, EventArgs e)
    {
        U_ZCSPBU sp1  = new U_ZCSPBU();
        string   err1 = sp1.PiYueZcForDepart(this.zcczid.Text);

        sp1.Close();
        if (err1 != null)
        {
            Util.alert(this.Page, err1);
        }
        else
        {
            PubComm.ShowInfo("已成功转交部门审批!", Application["root"] + "/ZcMng2/ZcDetail3.aspx?id=" + Request["id"].ToString());
        }
    }
Exemple #11
0
    //提交资产审批处理
    protected void Button2_Click(object sender, EventArgs e)
    {
        U_ZCSPBU sp1  = new U_ZCSPBU();
        string   err1 = sp1.PiYueZcForDepart(Request["id"]);

        sp1.Close();
        if (err1 != null)
        {
            Util.alert(this.Page, err1);
        }
        else
        {
            PubComm.ShowInfo("已成功转交部门审批!", Application["root"] + "/ZcMng3/EditSbb.aspx?id=" + Request["id"].ToString() + "&menuIndex=5");
        }
    }
Exemple #12
0
    //绑定【资产审批情况】明细
    private void BindSP(U_ZCSPBU sp1)
    {
        if (this.zcczid.Text != "")
        {
            bool flag = false;
            if (sp1 == null)
            {
                sp1  = new U_ZCSPBU();
                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 + "");
                    if (i == 12)
                    {
                        foreach (DataRow dr in ds1.Tables[0].Rows)
                        {
                            if (dr["time1"].ToString().Trim() == String.Empty)
                            {
                                dr["ps"] = "未编号";
                            }
                            else
                            {
                                dr["ps"] = "已编号";
                            }
                        }
                    }

                    repeater1.DataSource = ds1;
                    repeater1.DataBind();

                    if (ds1.Tables[0].Rows.Count == 0)
                    {
                        repeater1.Visible = false;
                    }
                }
            }
            if (flag)
            {
                sp1.Close();
            }
        }
    }
Exemple #13
0
    private void Bind()
    {
        if (Request["czid"] != null && Request["pc"] != null)
        {
            string   czid = Request["czid"].ToString();
            string   pc   = Request["pc"].ToString();
            U_ZCSPBU sp1  = new U_ZCSPBU();
            DataSet  ds1  = sp1.GetZcSPListByPC(czid, pc);
            this.Repeater1.DataSource = ds1;
            this.Repeater1.DataBind();
            sp1.Close();

            U_ZCBU  zc1 = new U_ZCBU();
            DataSet ds2 = zc1.GetShenBaoInfo(Request["czid"]);
            zc1.Close();


            this.lab1.Text = ds2.Tables[0].Rows[0]["xmsbh"].ToString();
            this.lab2.Text = ds2.Tables[0].Rows[0]["num2"].ToString();
            this.lab3.Text = ds2.Tables[0].Rows[0]["danwei"].ToString();
        }
    }
Exemple #14
0
 private void Bind()
 {
     if (Request["id"] != null)
     {
         string   id   = Request["id"].ToString();
         U_ZCBU   zc1  = new U_ZCBU();
         DataSet  ds   = zc1.GetZcsbbInfoByID(id);
         string[] arr1 = new string[] { "id", "zclx", "zcse", "xmbj", "fsxzly", "djyj" };
         for (int i = 0; i < arr1.Length; i++)
         {
             if (ds.Tables[0].Rows.Count > 0)
             {
                 Util.SetControlValue(this.zclx.Parent.FindControl(arr1[i]), ds.Tables[0].Rows[0][arr1[i]].ToString());
             }
         }
         this.BindZCCZDetail(zc1);
         U_ZCSPBU sp1 = new U_ZCSPBU();
         sp1.SetPC(this.pc1, id);
         sp1.Close();
         zc1.Close();
     }
 }
Exemple #15
0
    /// <summary>
    /// 决策委员会成员审核
    /// </summary>
    /// <param name="id"></param>
    private void SehenPiForJueCeWeiYuanHui(String id, String dotime1)
    {
        if (this.piyue1.SelectedValue == String.Empty)
        {
            Util.alert(this.Page, "错误:请选择一个审批意见!");
        }
        else
        {
            Hashtable ht = new Hashtable();
            ht["remark"] = this.remark.Text.Trim();
            ht["zeren"]  = User.Identity.Name;
            if (String.IsNullOrEmpty(dotime1))
            {
                ht["time1"] = DateTime.Now.ToString();
            }
            else
            {
                ht["time1"] = dotime1;
            }
            ht["ps"] = this.piyue1.SelectedValue;

            String domen1 = this.CheckShenHeWeiYuanZhuXi(id);
            if (domen1 == String.Empty)
            {
                U_ZCSPBU sp1   = new U_ZCSPBU();
                String   czid  = ViewState["czid"].ToString();;
                string   info1 = sp1.PiYueZcForSH2(id, ht);
                sp1.Close();
                PubComm.ShowInfo(info1, Application["root"] + "/ZcMng3/EditSbb.aspx?id=" + czid + "&menuIndex=5");
            }
            else
            {
                Util.alert(this.Page, "错误:请等待其他成员【" + domen1 + "】的审批处理后,您才能处理!");
            }
        }
    }
Exemple #16
0
    //绑定资产审批的基本数据
    private void BindData1(U_ZCBU zc1, string czid)
    {
        //设置基本数据
        string[] arr1 = new string[] { "xmsbh", "danwei", "xmbj", "zclx",
                                       "zcse", "zqze", "bj", "lx", "fsxzly",
                                       "djyj", "cbdepart", "cbzeren", "num2" };
        DataSet ds2 = zc1.GetShenBaoInfo(czid);

        if (ds2.Tables[0].Rows.Count > 0)
        {
            string zcid = ds2.Tables[0].Rows[0]["zcid"].ToString();
            for (int i = 0; i < arr1.Length; i++)
            {
                HiddenField hid1 = this.xmbj.Parent.FindControl(arr1[i]) as HiddenField;
                if (hid1 != null)
                {
                    hid1.Value = ds2.Tables[0].Rows[0][arr1[i]].ToString();
                }
            }
        }

        //调整资产数额的显示
        if (this.zcse.Value.Trim() != String.Empty)
        {
            if (Comm.isNumeric(this.zcse.Value))
            {
                double t1 = double.Parse(this.zcse.Value) / 10000;
                this.zcse.Value = String.Format("{0:N2}", t1) + " 万元";
            }
        }

        //调整债权显示的总额
        double bj      = double.Parse(ds2.Tables[0].Rows[0]["bj"].ToString()) / 10000;
        double lx      = double.Parse(ds2.Tables[0].Rows[0]["lx"].ToString()) / 10000;
        double zqze    = double.Parse(ds2.Tables[0].Rows[0]["zqze"].ToString()) / 10000;
        String format1 = "{0:N2}万元。其中:本金   {1:N2}  万元;利息  {2:N2} 万元";

        this.zqze.Value = String.Format(format1, zqze, bj, lx);
        ds2.Dispose();

        //得到部门处理意见
        U_ZCSPBU zcsp1 = new U_ZCSPBU();
        DataSet  ds3   = zcsp1.GetZcSPRemark(Request["czczid"].ToString(), SP.部门审批);

        if (ds3.Tables[0].Rows.Count > 0)
        {
            this.bmremark.Value = String.Format("{0}\n\t\t\t\t{1}", ds3.Tables[0].Rows[0]["ps"], ds3.Tables[0].Rows[0]["zeren"]);
            //this.zeren1.Value = ds3.Tables[0].Rows[0]["zeren"].ToString();
            this.zeren1.Value = User.Identity.Name;     //当前用户

            if (ds3.Tables[0].Rows[0]["time1"] != DBNull.Value)
            {
                DateTime dt1 = (DateTime)ds3.Tables[0].Rows[0]["time1"];
                this.time1.Value = dt1.ToString("yyyy 年 MM 月 dd 日");
            }

            DateTime dt2 = (DateTime)ds3.Tables[0].Rows[0]["time0"];
            this.time2.Value = dt2.ToString("yyyy 年 MM 月 dd 日");
        }
        ds3.Dispose();


        //得到不同意见审批人
        String[] spyj = new string[] { "13", "15" };
        foreach (String m in spyj)
        {
            DataSet ds11 = zcsp1.GetZcSPList(Request["czczid"].ToString(), m);
            foreach (DataRow dr in ds11.Tables[0].Rows)
            {
                if (m == "13")
                {
                    if (dr["ps"].ToString().Trim() == "同意")
                    {
                        if (this.yj1.Value == "")
                        {
                            this.yj1.Value = dr["zeren"].ToString();
                        }
                        else
                        {
                            this.yj1.Value = this.yj1.Value + ";" + dr["zeren"].ToString();
                        }
                    }

                    if (dr["ps"].ToString().Trim() == "不同意")
                    {
                        if (this.yj2.Value == "")
                        {
                            this.yj2.Value = dr["zeren"].ToString();
                        }
                        else
                        {
                            this.yj2.Value = this.yj2.Value + ";" + dr["zeren"].ToString();
                        }
                    }
                }
                else
                {
                    if (dr["ps"].ToString().Trim() == "同意")
                    {
                        if (this.yj3.Value == "")
                        {
                            this.yj3.Value = dr["zeren"].ToString();
                        }
                        else
                        {
                            this.yj3.Value = this.yj3.Value + ";" + dr["zeren"].ToString();
                        }
                    }
                    if (dr["ps"].ToString().Trim() == "不同意")
                    {
                        if (this.yj4.Value == "")
                        {
                            this.yj4.Value = dr["zeren"].ToString();
                        }
                        else
                        {
                            this.yj4.Value = this.yj4.Value + ";" + dr["zeren"].ToString();
                        }
                    }
                }
            }
        }
        zcsp1.Close();
    }