示例#1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("是否删除该部门?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         if (db.DeleteDepartment(int.Parse(lbDepartment.SelectedValue.ToString())) == -1)
         {
             MessageBox.Show("删除失败,该部门已被使用!");
             return;
         }
         FormSetting_Load(sender, e);
     }
 }