コード例 #1
0
        public ExportControl(ExportControlParameters exportControlParameters)
        {
            InitializeComponent();

            IsBusyIndicator.DisplayAfter = new TimeSpan(0, 0, 0); //Display after 0 second

            var viewModel = new ExportControlViewModel(exportControlParameters);

            viewModel.ShowBusyIndicator += viewModel_ShowBusyIndicator;

            DataContext = viewModel;
        }
コード例 #2
0
        public ExportControl(Tab tab, CommonUtils.AttachmentObject typeCode, bool showDocumentDownload = false, string appendage = "")
        {
            InitializeComponent();

            IsBusyIndicator.DisplayAfter = new TimeSpan(0, 0, 0); //Display after 0 second

            ExportControlParameters exportControlParameters = new ExportControlParameters
            {Tab = tab, TypeCode = typeCode, ShowAttachmentDownload = showDocumentDownload, Appendage = appendage};

               // var viewModel = new ExportControlViewModel(tab, reportUserControl, typeCode, appendage) { ShowAttachmentDownload = showDocumentDownload };
            var viewModel = new ExportControlViewModel(exportControlParameters);

            viewModel.ShowBusyIndicator += viewModel_ShowBusyIndicator;

            DataContext = viewModel;
        }
コード例 #3
0
        //public ExportControlViewModel(Tab tab, ReportsUserControl reportUserControl,
        //    CommonUtils.SecurityObject securityObjectType, string appendage = "")
        public ExportControlViewModel(ExportControlParameters exportControlParameters)
        {
            mExportControlParameters = exportControlParameters;
            mTab = exportControlParameters.Tab;
            mAppendage = exportControlParameters.Appendage;
            mAttachmentObject = exportControlParameters.TypeCode;
            ShowAttachmentsDownload = exportControlParameters.ShowAttachmentDownload;
            //mReportUserControl = reportUserControl;

            //SetReportControlPriviledges();
            if (ShowAttachmentsDownload &&
                (mAttachmentObject == CommonUtils.AttachmentObject.Document ||
                 mAttachmentObject == CommonUtils.AttachmentObject.DocumentVersion))
            {
                ShowDocumentDownload = true;
            }

            OpenReportCommand = new DelegateCommand<object>(OpenReportHandler, CanClick);
            ExportAttachmentsCommand = new DelegateCommand<object>(ExportAttachmentsLinkHandler, CanClick);
            ExportDocumentsCommand = new DelegateCommand<object>(ExportDocumentsLinkHandler, CanClick);

            CMS.Cache.ReportLinks.CollectionChanged += (s, e) => RaisePropertyChanged("ReportLinks");
        }