/// <summary> /// Gets the Recent Report [Mentains the Session Scope] /// </summary> private void GetRecentReport() { // Set to Selected Product if (Session["SelectedProduct"] != null) { if (Session["IsReportOnDateRange"] != null) { if ((bool)Session["IsReportOnDateRange"]) { RadioButtonDateRange.Checked = true; RadioButtonFilterOn.Checked = false; if (Session["FilterFrom"] != null) { TextBoxDateFrom.Text = Session["FilterFrom"].ToString(); } if (Session["FilterTo"] != null) { TextBoxDateTo.Text = Session["FilterTo"].ToString(); } TextBoxDateFrom.Focus(); } else { RadioButtonFilterOn.Checked = true; RadioButtonDateRange.Checked = false; DataController.SetAsSeletedValue(DropDownListFilterOn, Session["FilterOn"].ToString(), true); // To get recent Report if (Session["FilterValue"] != null) { TextBoxFilterValue.Text = Session["FilterValue"].ToString(); } TextBoxFilterValue.Focus(); } if (Session["ReportMode"].ToString() == "Onscreen") { RadioButtonOnscreen.Checked = true; RadioButtonCSV.Checked = false; } else { RadioButtonCSV.Checked = true; RadioButtonOnscreen.Checked = false; } // Generate Report GenerateReport(); } else { TextBoxDateFrom.Focus(); } } }
private void IniSearchControls() { new Thread(() => { UtilsNotification.StartLoadingAnimation(); TextBoxFilterValue.Dispatcher.BeginInvoke((Action)(() => TextBoxFilterValue.Clear())); //Load data var competitionList = competitionService.GetCompetitions(); ObservableCollection <CompetitionComboModel> compsBox = new ObservableCollection <CompetitionComboModel>(); compsBox.Add(new CompetitionComboModel() { CompetitionId = 0, CompetitionName = "" }); foreach (var item in competitionList) { compsBox.Add(new CompetitionComboModel() { CompetitionId = item.CompetitionId, CompetitionName = item.Name + " - " + competitionService.GetCompetitionSeasonName(item.CompetitionId) }); } ComboBoxFilterCompetition.Dispatcher.BeginInvoke((Action)(() => ComboBoxFilterCompetition.ItemsSource = compsBox)); ComboBoxFilterCompetition.Dispatcher.BeginInvoke((Action)(() => ComboBoxFilterCompetition.SelectedValue = compsBox.FirstOrDefault())); CheckBoxFilterIsFavoriteYes.Dispatcher.BeginInvoke((Action)(() => CheckBoxFilterIsFavoriteYes.IsChecked = false)); CheckBoxFilterIsFavoriteNo.Dispatcher.BeginInvoke((Action)(() => CheckBoxFilterIsFavoriteNo.IsChecked = false)); UtilsNotification.StopLoadingAnimation(); }).Start(); }