/// <summary>
 /// 删除数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripMenuItem_DataGridViewRowDelete_Click(object sender, EventArgs e)
 {
     if (Class_BlackList.ExistAndCanDeleteAndDelete((int)this.dataGridView_Data.CurrentRow.Cells["BlackListID"].Value, Enum_zwjKindofUpdate.CanDelete))
     {
         if (MessageBox.Show("确认删除吗?", "确认窗口", MessageBoxButtons.OKCancel) == DialogResult.OK)
         {
             Class_BlackList.ExistAndCanDeleteAndDelete((int)this.dataGridView_Data.CurrentRow.Cells["BlackListID"].Value, Enum_zwjKindofUpdate.Delete);
             this.RefreshData(false);
         }
     }
     else
     {
         MessageBox.Show("不能删除!");
     }
 }
Пример #2
0
 private void Form_BlackList_Update_Load(object sender, EventArgs e)
 {
     if (!(this.bool_Add || Class_BlackList.ExistAndCanDeleteAndDelete(myClass_BlackList.BlackListID, Enum_zwjKindofUpdate.Exist)))
     {
         MessageBox.Show("不存在该项,可能已删除!");
         this.DialogResult = DialogResult.Cancel;
         this.Close();
         return;
     }
     this.label_ErrMessage.Text = "";
     if (!Class_zwjPublic.myBackColor.IsEmpty)
     {
         this.BackColor = Class_zwjPublic.myBackColor;
     }
     this.userControl_BlackListBase1.InitControl(this.myClass_BlackList, this.bool_Add);
 }