Exemple #1
0
    //绑定当前资产-处置申报情况(包括处置方式)
    private void BindData()
    {
        if (Request["id"] != null)
        {
            string id  = Request["id"];
            U_ZCBU zc1 = new U_ZCBU();

            //////////////////////////////////////////
            Hashtable ht = zc1.GetCurrentZcCZbyID(id);
            if (ht.Count > 0)
            {
                this.danwei.Text = ht["danwei"].ToString();
                if (ht["depart"] != null)
                {
                    this.depart.Text = ht["depart"].ToString();
                }
                if (ht["zeren"] != null)
                {
                    this.zeren.Text = ht["zeren"].ToString();
                }
                if (ht["zcstatus"] != null)
                {
                    this.status.Text = ht["zcstatus"].ToString();
                }
                if (ht["statustext"] != null)
                {
                    this.statusText.Text = ht["statustext"].ToString();
                }
                if (this.statusText.Text == "")
                {
                    this.statusText.Text = "阅卷";
                }
                if (ht["xmsbh"] != null)
                {
                    this.xmsbh.Text = ht["xmsbh"].ToString();
                }

                //根据权限显示信息
                int status1 = 0;
                if (this.status.Text != "")
                {
                    status1 = Int32.Parse(this.status.Text);
                }

                string[] arr1 = new string[] { "zclx", "zcse", "xmbj", "fsxzly", "djyj", "zcczid" };
                for (int i = 0; i < arr1.Length; i++)
                {
                    if (ht[arr1[i]] != null)
                    {
                        Util.SetControlValue(this.zclx.Parent.FindControl(arr1[i]), ht[arr1[i]].ToString());
                        Util.SetControlValue(this.zclx.Parent.FindControl(arr1[i] + "_1"), Util.ChangeToShow(ht[arr1[i]].ToString()));
                    }
                    if (this.owner && status1 == (int)SP.开始审批)
                    {
                        this.zclx.Parent.FindControl(arr1[i] + "_1").Visible = false;
                    }
                    else
                    {
                        this.zclx.Parent.FindControl(arr1[i]).Visible = false;
                    }
                    if (PubComm.IsRole("系统管理员"))
                    {
                        this.zclx.Parent.FindControl(arr1[i]).Visible        = true;
                        this.zclx.Parent.FindControl(arr1[i] + "_1").Visible = false;
                    }
                }
                ////////////////////////////////////////////

                this.zclx.Parent.FindControl("zcczid").Visible = true;
                this.BindZCCZDetail(zc1);
            }

            zc1.Close();
            this.SetButton();   //设置按钮的权限
        }
    }