Exemplo n.º 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (0 == DataGridViwShow.RowCount || null == DataGridViwShow.CurrentRow)
            {
                MessageBox.Show("请选择需要删除的部门", "提示");
                return;
            }

            DialogResult result = MessageBox.Show("确认要删除吗?", "提示", MessageBoxButtons.OKCancel);

            if (result == DialogResult.Cancel)
            {
                return;
            }

            string departmentID = DataGridViwShow.CurrentRow.Cells[0].Value.ToString();

            objDepartmentService.DeleteDepartmentByID(departmentID);

            FrmInitialization();
        }