private void comboBox3_SelectedIndexChanged(object sender, EventArgs e) { WebServiceP.DetailsCountry.country test = new WebServiceP.DetailsCountry.country(); string m = test.GetCurrencyByCountry(Convert.ToString(comboBox3.SelectedItem)); m = m.Replace("<NewDataSet>", ""); m = m.Replace("<Table>", "§"); m = m.Replace("</Table>", ""); m = m.Replace("</NewDataSet>", ""); m = m.Replace("<Name>", ""); m = m.Replace("</Name>", ""); m = m.Replace("<CountryCode>", "§"); m = m.Replace("</CountryCode>", ""); m = m.Replace("<Currency>", "§"); m = m.Replace("</Currency>", ""); m = m.Replace("<CurrencyCode>", "§"); m = m.Replace("</CurrencyCode>", ""); m = m.Replace("<CurrencyCode />", "§"); m = m.Replace("<Currency />", "§"); m = m.Replace("\n", ""); m = m.Replace(" ", ""); string[] moneda = m.Split('§'); textBox1.Text = moneda[1]; textBox2.Text = moneda[2]; textBox3.Text = moneda[3]; textBox4.Text = moneda[4]; }
private void button1_Click(object sender, EventArgs e) { WebServiceP.DetailsCountry.country test = new WebServiceP.DetailsCountry.country(); string ts = test.GetCountries(); ts = ts.Replace("<NewDataSet>", ""); ts = ts.Replace("<Table>", ""); ts = ts.Replace("</Table>", ""); ts = ts.Replace("</NewDataSet>", ""); ts = ts.Replace("<Name>", ""); ts = ts.Replace("</Name>", "~"); ts = ts.Replace("\n", ""); ts = ts.Replace(" ", ""); string[] tester = ts.Split('~'); for (int i = 0; i < tester.Length; i++) { comboBox3.Items.Add(tester[i]); //comboBox3.DataSource = Enum.GetValues(typeof(tes)); } //string mon = test.GetCurrencies(); //mon = mon.Replace("<NewDataSet>", ""); //mon = mon.Replace("<Table>", ""); //mon = mon.Replace("</Table>", ""); //mon = mon.Replace("</NewDataSet>", ""); //mon = mon.Replace("<Name>", "~"); //mon = mon.Replace("</Name>", ""); //mon = mon.Replace("<CountryCode>", ""); //mon = mon.Replace("</CountryCode>", "§"); //mon = mon.Replace("<Currency>", ""); //mon = mon.Replace("</Currency>", "§"); //mon = mon.Replace("<CurrencyCode>", ""); //mon = mon.Replace("</CurrencyCode>", "§"); //mon = mon.Replace("<CurrencyCode />", "§"); //mon = mon.Replace("<Currency />", "§"); //mon = mon.Replace("\n", ""); //mon = mon.Replace(" ", ""); //string[] moneda = mon.Split('~'); //for (int i = 1; i < moneda.Length; i++) //{ // string[] valores = moneda[i].Split('§'); // comboBox4.Items.Add(valores[0]); // comboBox5.Items.Add(valores[1]); // comboBox6.Items.Add(valores[2]); // comboBox7.Items.Add(valores[3]); //} }
private void Form1_Load(object sender, EventArgs e) { WebServiceP.DetailsCountry.country test = new WebServiceP.DetailsCountry.country(); string ts = test.GetCountries(); //comboBox2.DataSource = Enum.GetValues(typeof()); //comboBox2.SelectedItem = ; }
public Form1() { InitializeComponent(); WebServiceP.DetailsCountry.country test = new WebServiceP.DetailsCountry.country(); }