private void textBox1_TextChanged(object sender, EventArgs e) { string store_name = textBox1.Text; StoreServiceReference.StoreServiceClient proxy = new StoreServiceReference.StoreServiceClient("BasicHttpBinding_IStoreService"); DataSet ds = proxy.GetStoresByName(store_name); DataTable dt = ds.Tables["Stores"]; dataGridView1.DataSource = dt; proxy.Close(); }
private void category_list_SelectedIndexChanged(object sender, EventArgs e) { string store_cat = category_list.SelectedItem.ToString(); StoreServiceReference.StoreServiceClient proxy = new StoreServiceReference.StoreServiceClient("BasicHttpBinding_IStoreService"); DataSet ds = proxy.GetStoresByCategory(store_cat); DataTable dt = ds.Tables["Stores"]; dataGridView1.DataSource = dt; proxy.Close(); }
private void StoreForm_Load(object sender, EventArgs e) { welcome_label.Text += LoginForm.userid; StoreServiceReference.StoreServiceClient proxy = new StoreServiceReference.StoreServiceClient("BasicHttpBinding_IStoreService"); DataSet ds = proxy.GetStores(); DataTable dt = ds.Tables["Stores"]; dataGridView1.DataSource = dt; proxy.Close(); }