public PopupReportView(IPopupReportViewModel popupReportViewModel) { _popupReportViewModel = popupReportViewModel; popupReportViewModel.PropertyChanged += (s, e) => { if (e.PropertyName == "Report") { _popupReportViewModel.Report.PropertyChanged += (s1, e1) => { if (_popupReportViewModel.Report.State == ViewModelState.Loaded) { RenderPopup(); } if (_popupReportViewModel.Report.State == ViewModelState.Error) { HtmlPage.Window.Alert(_popupReportViewModel.Report.ErrorMessage); } }; } }; }
public PopupReportView(IPopupReportViewModel popupReportViewModel) { _popupReportViewModel = popupReportViewModel; popupReportViewModel.PropertyChanged += (s, e) => { if(e.PropertyName == "Report") { _popupReportViewModel.Report.PropertyChanged += (s1, e1) => { if (_popupReportViewModel.Report.State == ViewModelState.Loaded) { RenderPopup(); } if (_popupReportViewModel.Report.State == ViewModelState.Error) { HtmlPage.Window.Alert(_popupReportViewModel.Report.ErrorMessage); } }; } }; }