Пример #1
0
 private void cms_DIDelete_Click(object sender, EventArgs e)
 {
     if (dgvDI.SelectedRows.Count == 1)
     {
         int    mIndex = dgvDI.CurrentRow.Index;
         String mName  = dgvDI.Rows[mIndex].Cells[1].Value.ToString();
         int    rtn    = mWDataToolClass.DeleteDI(mName);
         if (rtn == 0)
         {
             //刷新轴数据
             mWDataToolClass.SelectShowDI(ref dgvDI);
             MessageBox.Show("删除成功");
         }
         else
         {
             MessageBox.Show("删除失败");
         }
     }
     else
     {
         MessageBox.Show("当前未选中数据");
     }
 }