public void GetPlanDetails_Click(object sender, RoutedEventArgs e) { try { if (int.TryParse(TxtPlanId.Text, out _planId)) { TvMtm.Items.Clear(); MtmInteraction.Getwpfsuitetree(_planId, TvMtm, true); var tester = MtmInteraction.GetTester(); tester.Sort(); TesterName.ItemsSource = tester; } else { MessageBox.Show("Invalid PlanId"); } } catch (Exception exp) { MessageBox.Show( "It seems something has gone wrong. Please send us the below information so that we can resolve the issue." + Environment.NewLine + exp.Message, "OOPS!", MessageBoxButton.OK, MessageBoxImage.Warning); DataGetter.Diagnostic.AppendLine("Error while exporting to Excel: " + exp.Message); } }
public QueryFilter() { DataContext = this; InitializeComponent(); try { var actions = new List <string> { "Assign Tester", "Playlist", "Result Update" }; TesterAction.ItemsSource = actions; TesterAction.SelectedIndex = 0; var automationStatus = new List <string> { "Both", "Automated", "Manual" }; CmbAutomationStaus.ItemsSource = automationStatus; var priorities = new List <string> { "All", "1", "2", "3", "4" }; CmbPriority.ItemsSource = priorities; var outcomes = new List <string> { "All", "Active", "Blocked", "Failed", "Passed", "In progress" }; CmbOutcome.ItemsSource = outcomes; //Valid Outcomes are used for result update. var validOutcomes = outcomes; validOutcomes.Remove("All"); Resultoptions.ItemsSource = validOutcomes; MtmInteraction.Getwpfsuitetree(int.Parse(ConfigurationManager.AppSettings["TestPlanID"]), TvMtm, true); var tester = MtmInteraction.GetTester(); tester.Sort(); TesterName.ItemsSource = tester; } catch (Exception exp) { MessageBox.Show( "It seems something has gone wrong. Please send us the below information so that we can resolve the issue." + Environment.NewLine + exp.Message, "OOPS!", MessageBoxButton.OK, MessageBoxImage.Warning); } TxtPlanId.Text = ConfigurationManager.AppSettings["TestPlanID"]; }