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); } }
private void btnGenerateTree_Click(object sender, RoutedEventArgs e) { try { var planId = int.Parse(TxtPlanId.Text); PlanName.Text = MtmInteraction.GetPlanName(planId); if (PlanName.Text == null) { MessageBox.Show("Invalid planId. Retry!"); } if (int.TryParse(TxtPlanId.Text, out planId)) { TvMtm.Items.Clear(); MtmInteraction.Getwpfsuitetree(planId, TvMtm, true); } else { MessageBox.Show("Invalid planid.You can get the planid from MTM in the Select Test Plan Window.", "OOPS!", MessageBoxButton.OK, MessageBoxImage.Warning); } } 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); } }
public Home() { InitializeComponent(); try { if (string.IsNullOrEmpty(MtmInteraction.SelectedPlanName)) { MtmInteraction.InitializeVstfConnection(new Uri(ConfigurationManager.AppSettings["TFSUrl"]), ConfigurationManager.AppSettings["TeamProject"], int.Parse(ConfigurationManager.AppSettings["TestPlanID"])); DataGetter.Diagnostic.AppendLine("TFS URL: " + ConfigurationManager.AppSettings["TFSUrl"]); DataGetter.Diagnostic.AppendLine("Team Project: " + ConfigurationManager.AppSettings["TeamProject"]); DataGetter.Diagnostic.AppendLine("---------------------------------------------------"); } MtmInteraction.Getwpfsuitetree(int.Parse(ConfigurationManager.AppSettings["TestPlanID"]), TvMtm, true); } 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"]; List <string> reports = new List <string> { "Summary", "Module", "Tester", "Automation", "TestList" }; CmbReportSelection.ItemsSource = reports; CmbReportSelection.SelectedIndex = 0; List <string> automationStatus = new List <string> { "Both", "Automated", "Manual" }; CmbAutomationStaus.ItemsSource = automationStatus; int planid = 0; if (int.TryParse(ConfigurationManager.AppSettings["TestPlanID"], out planid)) { if (planid != 0) { PlanName.Text = MtmInteraction.GetPlanName(planid); } } }
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"]; }