private void ok_Click(object sender, EventArgs e) { bool flag = false; Account acc = new Account(); flag = acc.updateInfomation(globleId, "repair_level", "level_name", text_name.Text); if (flag) { MessageBox.Show("数据保存成功!"); this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show("数据保存失败,请检查网络连接!"); } }