private async void FTE_Reports_EscalationThread_Loaded(object sender, RoutedEventArgs e) { FTEEscalationReportViewModel = await FTEEscalationReportViewModel.GetFTEEscalationReportViewModel(); AllMyPlatform = FTEEscalationReportViewModel.AllPratfromList; PlatformComboBox.DataContext = AllMyPlatform; QueryButton_Click(sender, e); }
public FTE_Reports_EscalationThread() { this.InitializeComponent(); this.EndDatePicker.Date = DateTime.Today; int date = DateTime.Today.Day; this.StartDatePicker.Date = DateTime.Today.AddDays(-(date - 1)); FTEEscalationReportViewModel = new FTEEscalationReportViewModel(); AllMyPlatform = new ProductWithSelectedItem(); this.SizeChanged += FTE_Reports_EscalationThread_SizeChanged; this.Loaded += FTE_Reports_EscalationThread_Loaded; }
private async void QueryButton_Click(object sender, RoutedEventArgs e) { MyProgressRing.IsActive = true; DataGrid.ItemsSource = null; DateTime startDate = DateTime.Parse(StartDatePicker.Date.ToString()); string startDatestring = startDate.ToString("MM-dd-yyyy"); DateTime endDate = DateTime.Parse(EndDatePicker.Date.ToString()); string endDatestring = endDate.ToString("MM-dd-yyyy"); AllMyReport = await FTEEscalationReportViewModel.QueryAllEscalationReport(AllMyPlatform, startDatestring, endDatestring); DataGrid.ItemsSource = AllMyReport; await Task.Delay(new TimeSpan(3)); MyProgressRing.IsActive = false; }