Exemplo n.º 1
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     //判断是否选中数据
     if (dgvList.SelectedRows.Count > 0)
     {
         DialogResult result = MessageBox.Show("确定是否删除", "提示", MessageBoxButtons.OKCancel);
         if (result == DialogResult.Cancel)
         {
             return;
         }
         if (miBll.RemoveManagerInfo(Convert.ToInt32(dgvList.SelectedRows[0].Cells[0].Value)))
         {
             LoadList();
         }
         else
         {
             MessageBox.Show("删除失败");
         }
     }
 }