예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var svc      = new NorthwindServices.CustomerServiceClient();
            var customer = svc.GetById(textBox1.Text);

            textBox2.Text = customer.CompanyName;
            textBox3.Text = customer.ContactName;
            MessageBox.Show("OK");
        }
예제 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            var svc      = new NorthwindServices.CustomerServiceClient();
            var customer = new NorthwindServices.Customer
            {
                CustomerID  = textBox1.Text,
                CompanyName = textBox2.Text,
                ContactName = textBox3.Text
            };

            customer = svc.Save(customer);

            MessageBox.Show("OK");
        }