private void 注册_5_Click(object sender, EventArgs e) { if (SetTextToUser()) { userBLL.Insert(new_user); dt = UserAdmin.GetUser(); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i][1].ToString() == new_user.Name) { MessageBox.Show("状态:注册成功!\n新用户编号为:" + dt.Rows[i][0].ToString()); } } } Clear_5(); }