예제 #1
0
        private void showDialog_Closed(object sender, EventArgs e)
        {
            ShowArchiveContent showArchive = (ShowArchiveContent)sender;

            if (showArchive.DialogResult != DialogResult.OK)
            {
                return;
            }
            int selectedCount = lsvOrgApply.SelectedItems.Count;

            if (selectedCount <= 0)
            {
                MessageBox.Show("没有选中的申请!", "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            List <ListViewItem> permitItems = new List <ListViewItem>();

            try
            {
                if (showArchive.SelectedNode == null || showArchive.SelectedNode.Tag == null)
                {
                    return;
                }
                foreach (ListViewItem item in lsvOrgApply.SelectedItems)
                {
                    permitItems.Add(item);
                    _currentUser.PermitApply((int)item.Tag, (int)showArchive.SelectedNode.Tag);
                }
                if (selectedCount > 0)
                {
                    MessageBox.Show("您选择的项目已批准!", "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    LoadOrgApp();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("系统错误:" + ex.Message, "文档管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }