static void testHistoryClient(ServerOps.ServerOpsClient proxy, int IDClient) { Stock[] stocks = proxy.GetAllStocksByClient(IDClient); Console.WriteLine("Stocks from user: " + IDClient); foreach (Stock s in stocks) { Console.WriteLine(s); } }
private void btnSearch_Click(object sender, EventArgs e) { if (txtSearch.Text != "") { Stock[] stocks = proxy.GetAllStocksByClient(Convert.ToInt32(txtSearch.Text)); foreach (Stock s in stocks) { lbSearch.Items.Add(s.ToString()); } } else { MessageBox.Show("All fields must be filled!", "Field is empty!", MessageBoxButtons.OK); } }