private void buttonModify_Click(object sender, EventArgs e) { string projectName = this.textBoxProjectName.Text.Trim(); if (projectName == "") { MessageBox.Show("请将工作量信息填写完整!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } else if (projectName == this.m_project.Project) { MessageBox.Show("你未修改任何信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this.m_project.Project = projectName; try { string result = _sc.ModifyProject(this.m_project); if (result == Response.MODIFY_PROJECT_SUCCESS.ToString()) { MessageBox.Show("修改工作量信息成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (result == "服务器连接中断") { MessageBox.Show("服务器连接中断,修改员工信息失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { MessageBox.Show("修改工作量信息失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } this.DialogResult = DialogResult.OK; } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }