//修改 private void btnMod_Click(object sender, EventArgs e) { DGVSelect(); if (tboxTypeId.Text.Trim() == "" || tboxCorName.Text.Trim() == "" || tboxCreTime.Text.Trim() == "" || tboxPeo.Text.Trim() == "" || tboxIntro.Text.Trim() == "") { MessageBox.Show("信息不能为空!"); return; } Cor c = new Cor(id, int.Parse(tboxTypeId.Text.Trim()), tboxCorName.Text.Trim(), tboxCreTime.Text, int.Parse(tboxPeo.Text.Trim()), tboxIntro.Text.Trim()); if (AdminManage.ModCorMes(c)) { MessageBox.Show("修改成功!"); btnNew_Click(sender, e); } else { MessageBox.Show("修改失败!"); } }