Advertisement
Guest User

Untitled

a guest
May 4th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Windows.Forms;
  4. using Economics.SlimClient;
  5. using Reuters.EcoWin.Falcon.Data;
  6. using TR.Economics.Hawk.Contracts;
  7.  
  8. namespace SlimSeriesview_v1._1
  9. {
  10. public partial class Form1 : Form
  11. {
  12. public Form1()
  13. {
  14. InitializeComponent();
  15. }
  16.  
  17. private void GO_Click(object sender, EventArgs e)
  18. {
  19. TimeSeries timeSeries;
  20. List<string> result = new List<string>();
  21. Client ppeClient = new Client(@"http://ppe.ecowin.reuters.com/LoginEdgeService/LoginEdgeService.asmx", @"http://ppe.ecowin.reuters.com/edgewebservice/Service.asmx");
  22. ppeClient.Username = ".......";
  23. ppeClient.Password = "......";
  24. string seriesId = txtbSeriesId.Text;
  25. List<Suspect> suspect = new List<Suspect>();
  26.  
  27. var resultTimeSeries = ppeClient.GetTimeSeriesList(new List<string> { seriesId });
  28. if (resultTimeSeries.Success)
  29. {
  30. foreach (TimeSeriesResult seriesOB in resultTimeSeries.Value)
  31. {
  32. timeSeries = seriesOB.Series;
  33. DataGridViewRow row = new DataGridViewRow();
  34. Rule ruleContext = new Rule();
  35. AlpacaScript alpaca = new AlpacaScript(ruleContext);
  36.  
  37. suspect = alpaca.Inspect(timeSeries);
  38.  
  39.  
  40. for (int i = 0; i < suspect.Count; i++)
  41. {
  42. row = (DataGridViewRow)dataGridErrors.Rows[i].Clone();
  43. row.Cells[0].Value = suspect[i].Comment;
  44. row.Cells[1].Value = suspect[i].SeriesId;
  45. dataGridErrors.Rows.Add(row);
  46. }
  47. }
  48.  
  49. }
  50. }
  51.  
  52. private void txtbSeriesId_TextChanged(object sender, EventArgs e)
  53. {
  54.  
  55. }
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement