//submit data protected void Button1_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); for (int i = 0; i < arr1.Length; i++) { ht.Add(arr1[i], Util.GetControlValue(this.depart.Parent.FindControl(arr1[i]))); } U_UserNameBU user1 = new U_UserNameBU(); bool result = user1.EditUserData(Request["id"], ht); user1.Close(); //更新其他读者的数据 user1.SetOthersReaders(this.sname.Text, this.leader1.Text); if (result) { Response.Redirect("UserMng.aspx", true); } else { Util.alert(this.Page, "错误提示:修改数据错误!"); } }
//reset password protected void Button3_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht.Add("password", "1234"); U_UserNameBU user1 = new U_UserNameBU(); bool result = user1.EditUserData(Request["id"], ht); user1.Close(); if (result) { Comm.ShowInfo("提示:成功地重新设置登录密码为1234", Request.RawUrl); } else { Util.alert(this.Page, "提示:重新设置登录密码失败!"); } }