private void Menu_commit_Click(object sender, EventArgs e) { var username = this.radGridView1.CurrentRow.Cells[1].Value; if (username == null) { MessageBox.Show("请选择要修改的用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } var userID = serviceClient.GetUserID(username.ToString()); ModifyPwd modifyPwd = new ModifyPwd(userID, username.ToString()); modifyPwd.ShowDialog(); }