protected void btn_Submit_Click(object sender, EventArgs e) { string password = Utils.MD5Encrypt32(Utils.MD5Encrypt32(Utils.MD5Encrypt32(txtpassword.Text))); AdminUser User = new AdminUser(); User.UserName = Filter.AllFilter(txtuserName.Text.Trim()); User.UserPwd = password; User.LastLoginTime = DateTime.Now; if (Id == 0) { //添加 int UserID = AdminUserBiz.AddAdminUser(User); if (UserID > 0) { AdminUserBiz.AddUserRole(string.Empty, UserID); Response.Write("<script>self.parent.tb_remove();</script>"); } else { Response.Write("<script>self.parent.tb_remove();</script>"); } } else { if (txtpassword.Text != string.Empty) { AdminUserBiz.UpdateUser(Id, password, true); } Response.Write("<script>self.parent.tb_remove();</script>"); } }