/// <summary> /// 删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnRemove_Click(object sender, EventArgs e) { var row = dgvList.SelectedRows[0]; mi.Memid = Convert.ToInt32(row.Cells[0].Value); if (mtib.DeleteMysql(mi)) { MessageBox.Show("删除成功"); } else { MessageBox.Show("删除失败"); } ClearBox(); }