예제 #1
0
        private void FormFileAidRptLinkedFiles_Load(object sender, EventArgs e)
        {
            BindingList <LinkedFilesItem> myFiles = new BindingList <LinkedFilesItem>();

            foreach (ListViewItem item in reportItems)
            {
                LinkedFilesItem file = new LinkedFilesItem();
                file.Filename     = item.SubItems[0].Text;
                file.Extension    = item.SubItems[1].Text;
                file.Path         = item.SubItems[2].Text;
                file.Size         = item.SubItems[3].Text;
                file.DateModified = item.SubItems[4].Text;
                file.Inactive     = item.SubItems[5].Text;
                myFiles.Add(file);
            }
            LinkedFilesContextBindingSource.DataSource = context;
            LinkedFilesItemBindingSource.DataSource    = myFiles;
            this.reportViewer1.RefreshReport();
        }
예제 #2
0
        private void FormFileAidRptReminderDetails_Load(object sender, EventArgs e)
        {
            BindingList <LinkedFilesItem> myFiles = new BindingList <LinkedFilesItem>();

            foreach (ListViewItem item in reportItems)
            {
                // Using LinkedFilesItem because Report Wizard has problem with ReminderDetailsItem
                LinkedFilesItem file = new LinkedFilesItem();
                file.Filename     = item.SubItems[0].Text;
                file.Extension    = item.SubItems[1].Text;
                file.Path         = item.SubItems[2].Text;
                file.Size         = item.SubItems[3].Text;
                file.DateModified = item.SubItems[4].Text;
                file.Inactive     = item.SubItems[5].Text;
                myFiles.Add(file);
            }
            // binding contexts
            ReminderContextBindingSource.DataSource = context;
            LinkedFilesItemBindingSource.DataSource = myFiles;
            this.reportViewer1.RefreshReport();
        }