12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using _08_2_WsClient.ServiceReference1;
- using _Log;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace _08_2_WsClient
- {
- public partial class Form1 : Form
- {
- Log log;
- public Form1()
- {
- InitializeComponent();
- log = new Log(textBox1);
- }
- MyWSSoapClient client = new MyWSSoapClient();
- private void button1_Click(object sender, EventArgs e)
- {
- label1.Text = client.HelloWorld();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- double[] doublesy = client.HelloDoubles();
- foreach (double d in doublesy)
- log.l($"{d}");
- }
- private void button3_Click(object sender, EventArgs e)
- {
- Document document = client.HelloDocument();
- log.l($"Name: {document.Name}");
- log.l($"Author: {document.Author}");
- log.l($"DataWydania: {document.DataWydania}");
- log.l($"Doublesy: {string.Join(", ", document.Doublesy)}");
- log.l($"Stron: {document.Stron}");
- }
- private void button4_Click(object sender, EventArgs e)
- {
- DataTable t = client.HelloDataTable();
- dataGridView1.DataSource = t;
- }
- private void button5_Click(object sender, EventArgs e)
- {
- DataTable t = dataGridView1.DataSource as DataTable;
- label1.Text = client.UpdateDataTable(t);
- }
- }
- }
|