Esempio n. 1
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();
    }
Esempio n. 2
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();
        }
    }
Esempio n. 3
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();
    }