/// <summary> /// Dashboards the view model view records clicked. /// </summary> /// <param name="searchModel">The search model.</param> private void DashboardViewModel_ViewRecordsClicked(MessageSearchModel searchModel) { if (ReportViewModel == null) { ReportViewModel = new EcommerceReportViewModel(localSql, searchModel); } else { ReportViewModel.LoadDataWithFilters(searchModel); } SelectedTab = 1; }
/// <summary> /// Loads the data. /// </summary> private void LoadData() { switch (SelectedTab) { default: if (DashboardViewModel == null) { DashboardViewModel = new EcommerceDashboardViewModel(localSql); DashboardViewModel.ViewRecordsClicked += DashboardViewModel_ViewRecordsClicked; } break; case 1: if (ReportViewModel == null) { ReportViewModel = new EcommerceReportViewModel(localSql); } break; } }