private void button1_Click(object sender, EventArgs e) { string cyType = comboBox1.Text; using (CustomerMgntRef.CustomerMgntClient client = new CustomerMgntRef.CustomerMgntClient()) { var result = client.GetCustomers(cyType); label5.Text = result.Count().ToString(); dataGridView1.DataSource = result; } }
private void CustomerRegister_Load(object sender, EventArgs e) { Location = new System.Drawing.Point(-7, 50); int w = SystemInformation.VirtualScreen.Width + 14; int h = SystemInformation.VirtualScreen.Height - 43; Size = new Size(w, h); using (CustomerMgntRef.CustomerMgntClient client = new CustomerMgntRef.CustomerMgntClient()) { string[] installs = client.GetCustomersTypes().Distinct().ToArray(); comboBox1.Items.Add(""); comboBox1.Items.AddRange(installs); } }