Exemple #1
0
 private void BindData()
 {
     if (Request["zcid"] != null)
     {
         string  zcid = Request["zcid"].ToString();
         U_ZCBU  zc1  = new U_ZCBU();
         DataSet ds   = zc1.GetZCDBInfoByID(zcid);
         zc1.Close();
         if (ds.Tables[0].Rows.Count > 0)
         {
             for (int i = 0; i < arr1.Length; i++)
             {
                 Util.SetControlValue(this.bzyx.Parent.FindControl(arr1[i]), ds.Tables[0].Rows[0][arr1[i]]);
             }
             if (ds.Tables[0].Rows[0]["hssj"] != DBNull.Value)
             {
                 string dt = DateTime.Parse(ds.Tables[0].Rows[0]["hssj"].ToString()).ToString("yyyy-MM-dd");
                 Util.SetControlValue(this.bzyx.Parent.FindControl("hssj"), dt);
             }
         }
         string[] num1 = new string[] { "zwrhsgz", "bzrhsgz", "qthsgz", "bzje", "klazfy", "dyhsgz1", "dyhsgz2" };
         for (int i = 0; i < num1.Length; i++)
         {
             Label l1 = this.zwrhsgz.Parent.FindControl(num1[i]) as Label;
             if (l1 != null)
             {
                 l1.Text = Comm.GetNumberFormat(l1.Text);
             }
         }
         ds.Dispose();
     }
 }
Exemple #2
0
 //绑定律师及事务所的基本情况
 private void BindSSQK()
 {
     if (Request["id"] != null)
     {
         U_ZCBU   zc2  = new U_ZCBU();
         DataSet  ds   = zc2.GetZCDBInfoByID(Request["id"].ToString());
         string[] arr1 = { "lssws", "frdb", "wtls", "lxdh", "dwdz", "dzyj" };
         if (ds.Tables[0].Rows.Count > 0)
         {
             for (int i = 0; i < arr1.Length; i++)
             {
                 if (owner)
                 {
                     Util.SetControlValue(this.frdb.Parent.FindControl(arr1[i]), ds.Tables[0].Rows[0][arr1[i]]);
                     this.frdb.Parent.FindControl(arr1[i] + "_1").Visible = false;
                 }
                 else
                 {
                     Util.SetControlValue(this.frdb.Parent.FindControl(arr1[i] + "_1"), ds.Tables[0].Rows[0][arr1[i]]);
                     this.frdb.Parent.FindControl(arr1[i]).Visible = false;
                 }
             }
             ds.Dispose();
         }
         zc2.Close();
     }
 }
Exemple #3
0
 private void BindSSQK()
 {
     if (Request["zcid"] != null)
     {
         U_ZCBU  zc2 = new U_ZCBU();
         DataSet ds  = zc2.GetZCDBInfoByID(Request["zcid"].ToString());
         if (ds.Tables[0].Rows.Count > 0)
         {
             this.lssws.Text = ds.Tables[0].Rows[0]["lssws"].ToString();
             this.frdb.Text  = ds.Tables[0].Rows[0]["frdb"].ToString();
             this.wtls.Text  = ds.Tables[0].Rows[0]["wtls"].ToString();
             this.lxdh.Text  = ds.Tables[0].Rows[0]["lxdh"].ToString();
             this.dwdz.Text  = ds.Tables[0].Rows[0]["dwdz"].ToString();
             this.dzyj.Text  = ds.Tables[0].Rows[0]["dzyj"].ToString();
             ds.Dispose();
         }
         zc2.Close();
     }
 }
Exemple #4
0
    private void BindData()
    {
        if (Request["id"] != null)
        {
            string  zcid  = Request["id"].ToString();
            U_ZCBU  zc1   = new U_ZCBU();
            DataSet ds    = zc1.GetZCDBInfoByID(zcid);
            string  user1 = zc1.GetZerenByZCID(zcid);
            zc1.Close();
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < arr1.Length; i++)
                {
                    Util.SetControlValue(this.bzyx.Parent.FindControl(arr1[i]), ds.Tables[0].Rows[0][arr1[i]]);
                    Util.SetControlValue(this.bzyx.Parent.FindControl(arr1[i] + "_1"), ds.Tables[0].Rows[0][arr1[i]]);
                }
                if (ds.Tables[0].Rows[0]["hssj"] != DBNull.Value)
                {
                    string dt = DateTime.Parse(ds.Tables[0].Rows[0]["hssj"].ToString()).ToString("yyyy-MM-dd");
                    Util.SetControlValue(this.bzyx.Parent.FindControl("hssj"), dt);
                    Util.SetControlValue(this.bzyx.Parent.FindControl("hssj_1"), dt);
                }
            }
            ds.Dispose();


            //设置按钮的权限
            if (user1 == User.Identity.Name || (user1.Trim() == "" && Comm.IsRole("系统管理员")))
            {
                this.Button1.Visible = true;
                this.Adddyw.Visible  = true;
                this.Addzyw.Visible  = true;

                for (int i = 0; i < arr1.Length; i++)
                {
                    if (this.bzyx.Parent.FindControl(arr1[i] + "_1") != null)
                    {
                        this.bzyx.Parent.FindControl(arr1[i] + "_1").Visible = false;
                    }
                }
            }
            else
            {
                this.Button1.Visible = false;
                this.Adddyw.Visible  = false;
                this.Addzyw.Visible  = false;

                for (int i = 0; i < arr1.Length; i++)
                {
                    if (this.bzyx.Parent.FindControl(arr1[i]) != null)
                    {
                        this.bzyx.Parent.FindControl(arr1[i]).Visible = false;
                    }
                }
            }

            if (Comm.IsRole("系统管理员"))
            {
                this.Button2.Visible = true;
            }
            else
            {
                this.Button2.Visible = false;
            }

            //设置数字金额的显示
            string[] num1 = new string[] { "zwrhsgz", "bzrhsgz", "qthsgz", "bzje", "klazfy", "dyhsgz1", "dyhsgz2" };
            for (int i = 0; i < num1.Length; i++)
            {
                TextBox t1 = this.zwrhsgz.Parent.FindControl(num1[i]) as TextBox;
                Label   l1 = this.zwrhsgz.Parent.FindControl(num1[i] + "_1") as Label;
                if (t1 != null)
                {
                    t1.Text = Comm.GetNumberFormat(t1.Text);
                }
                if (l1 != null)
                {
                    l1.Text = Comm.GetNumberFormat(l1.Text);
                }
            }
        }
    }