Beispiel #1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     ServiceReference1.NORTHWNDEntities proxy =
         new ServiceReference1.NORTHWNDEntities
             (new Uri("http://localhost:53519/lab6/WcfDataService.svc/"));
     this.customersBindingSource.DataSource = proxy.Customers;
 }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            ServiceReference1.NORTHWNDEntities proxy =
                new ServiceReference1.NORTHWNDEntities(
                    new Uri("http://localhost:53519/lab6/WcfDataService.svc/"));
            string city = textBox1.Text;

            if (city != "")
            {
                this.customersBindingSource.DataSource =
                    from c in proxy.Customers where c.City == city select c;
            }
        }