private void shareList_SelectedIndexChanged(object sender, EventArgs e) { readBox.Checked = false; writeBox.Checked = false; if (shareList.SelectedItems.Count == 1) { ListViewItem item = shareList.SelectedItems[0]; try { CUserEntity user = (CUserEntity)(item.Tag); List <CACLEntity> acls = user.GetUserACLs(); foreach (CACLEntity acl in acls) { if (acl.Acl_Resource != _resourceId) { continue; } if (acl.Acl_Operation == (int)ACLOPERATION.READ) { readBox.Checked = true; } else if (acl.Acl_Operation == (int)ACLOPERATION.WRITE) { writeBox.Checked = true; } } } catch (Exception ex) { MessageBox.Show("共享数据已发生变化:" + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }