public static ReportViewModel CreateDesignInstance(bool hasWarnings = false, bool hasErrors = false) { var reportName = SynchronizationReportName.Create(Guid.NewGuid(), new DateTime(2000, 10, 10), hasWarnings, hasErrors); var proxy = new ReportProxy(reportName, () => SynchronizationReportDesignInstance, "The profile name"); return(new ReportViewModel(proxy, NullSynchronizationReportRepository.Instance, NullReportViewModelParent.Instance)); }
public ReportViewModel(ReportProxy reportProxy, ISynchronizationReportRepository reportRepository, IReportViewModelParent parent) { _reportRepository = reportRepository; _parent = parent; _reportProxy = reportProxy; OpenAEntityCommand = new DelegateCommand(parameter => { OpenAEntity((EntitySynchronizationReport)parameter); }); OpenBEntityCommand = new DelegateCommand(parameter => { OpenBEntity((EntitySynchronizationReport)parameter); }); OpenEntityWithLoadErrorCommand = new DelegateCommand(parameter => { OpenEntityWithLoadError((LoadError)parameter); }); }
public ReportViewModel (ReportProxy reportProxy, ISynchronizationReportRepository reportRepository, IReportViewModelParent parent) { _reportRepository = reportRepository; _parent = parent; _reportProxy = reportProxy; OpenAEntityCommand = new DelegateCommand (parameter => { OpenAEntity ((EntitySynchronizationReport) parameter); }); OpenBEntityCommand = new DelegateCommand (parameter => { OpenBEntity ((EntitySynchronizationReport) parameter); }); OpenEntityWithLoadErrorCommand = new DelegateCommand (parameter => { OpenEntityWithLoadError ((LoadError) parameter); }); }
private void AddReportViewModel(SynchronizationReportName reportName) { string profileName; if (!_currentProfileNamesById.TryGetValue(reportName.SyncronizationProfileId, out profileName)) { profileName = "<Not existing anymore>"; } var reportProxy = new ReportProxy(reportName, () => _reportRepository.GetReport(reportName), profileName); var reportViewModel = new ReportViewModel(reportProxy, _reportRepository, this); _reports.Add(reportViewModel); }
private void AddReportViewModel (SynchronizationReportName reportName, SynchronizationReport report) { string profileName; if (!_currentProfileNamesById.TryGetValue (reportName.SyncronizationProfileId, out profileName)) profileName = "<Not existing anymore>"; var reportProxy = new ReportProxy (reportName, () => report, profileName); var reportViewModel = new ReportViewModel (reportProxy, _reportRepository, this); _reports.Add (reportViewModel); }
public static ReportViewModel CreateDesignInstance (bool hasWarnings = false, bool hasErrors = false) { var reportName = SynchronizationReportName.Create (Guid.NewGuid(), new DateTime (2000, 10, 10), hasWarnings, hasErrors); var proxy = new ReportProxy (reportName, () => SynchronizationReportDesignInstance, "The profile name"); return new ReportViewModel (proxy, NullSynchronizationReportRepository.Instance, NullReportViewModelParent.Instance); }