/* * private void menuCutFile_Click(object sender, EventArgs e) * { * try * { * List<int> resources = new List<int>(); * foreach (ListViewItem item in FileListView.SelectedItems) * { * resources.Add((int)item.Tag); * } * if (resources.Count == 0) * { * MessageBox.Show("请选择文件!", "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error); * return; * } * ResourceClip clipBoard = (ResourceClip)Context.Session["ResourceClipBoard"]; * clipBoard.Cut(_currentUser, resources); * } * catch (Exception ex) * { * MessageBox.Show("系统错误: " + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error); * } * } */ void menuBookDoc_Click(object sender, EventArgs e) { int selectedCount = fileListView.SelectedItems.Count; if (selectedCount <= 0) { MessageBox.Show("没有选中的文件!", "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } try { foreach (ListViewItem item in fileListView.SelectedItems) { _currentUser.BookRead((int)item.Tag); } if (selectedCount > 0) { MessageBox.Show("您已订阅选中的文件!", "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("系统错误:" + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error); } }