Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //this.leader.Attributes["ReadOnly"] = "";
            if (Request["id"] != null)
            {
                U_DepartBU depart1 = new U_DepartBU();
                depart1.SetDepartList(this.depart, null);
                U_UserNameBU user1 = new U_UserNameBU();
                Hashtable    ht    = user1.GetDetailByID(Request["id"]);
                user1.Close();
                if (ht != null && ht.Count > 0)
                {
                    for (int i = 0; i < arr1.Length; i++)
                    {
                        if (ht[arr1[i]] == null)
                        {
                            ht[arr1[i]] = "";
                        }
                        Util.SetControlValue(this.sname.Parent.FindControl(arr1[i]), ht[arr1[i]]);
                    }
                }
                else
                {
                    Response.Redirect("~/Error.aspx?info=错误信息:此用户不存在!", true);
                }
            }
            else
            {
                Response.Redirect("~/Error.aspx", true);
            }


            if (this.sname.Text != String.Empty)
            {
                U_UserNameBU user1 = new U_UserNameBU();
                this.leader1.Text = user1.GetOtherReader(this.sname.Text.Trim());
            }
        }
    }